From cfe-commits Sat Feb 22 18:44:40 2014 From: Olivier Goffart Date: Sat, 22 Feb 2014 18:44:40 +0000 To: cfe-commits Subject: Re: [PATCH] Fix crash when both Parser::ExpectAndConsume and ConsumeAnyToken throw a diagnostic Message-Id: <1939680.Nz8pWLAV7T () finn> X-MARC-Message: https://marc.info/?l=cfe-commits&m=139309482717262 On Saturday 22 February 2014 18:31:34 Alp Toker 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 > > Looks good otherwise, do you have commit access? No, I don't have commit access. -- Olivier _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits