[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [PATCH] Fix crash when both Parser::ExpectAndConsume and ConsumeAnyToken throw a diagnostic
From:       Aaron Ballman <aaron () aaronballman ! com>
Date:       2014-02-22 18:39:31
Message-ID: CAAt6xTudLrfJ_yWtJibzpu9FN+GbSNf0Bj+L18yYa-m7+FD+Mg () mail ! gmail ! com
[Download RAW message or body]

On Sat, Feb 22, 2014 at 1:31 PM, Alp Toker <alp@nuanti.com> wrote:
>
> On 22/02/2014 14:08, Olivier Goffart wrote:
>>
>> Hi,
>>
>> I believe this is a regression from r198270
>>
>
> Indeed the lifetime of the DiagnosticBuilder shouldn't have overlapped the
> call to ConsumeAnyToken().
>
>> --- /dev/null
>> +++ b/test/Parser/diag-crash.c
>> @@ -0,0 +1,5 @@
>> +// RUN: %clang_cc1 -fsyntax-only -verify %s
>> +
>> +// Don't crash if the preprocessor is throwing a diagnostic from
>> Parser::ExceptAndConsume
>
>
> Typo in the comment.
>
>> +int foo: // expected-error {{expected ';' after top level declarator}}
>> +#endif   // expected-error {{#endif without #if}}
>> \ No newline at end of file

I'd like for there to be a newline at the end of the file, but that's
a very minor nit indeed.

~Aaron
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic