Thanks! Filipe
On Friday, June 29, 2012 at 7:29 PM, Douglas Gregor wrote: > > On Jun 25, 2012, at 3:22 PM, Filipe Cabecinhas <[email protected] > (mailto:[email protected])> wrote: > > > Hi all, > > > > C99 variadic macros aren't working when we use precompiled headers (either > > that or I made several mistakes when trying to use them). > > > > Attached is a patch with a test-case that is not working on current clang. > > > > I'm doing special __VA_ARGS__ handling in > > Preprocessor::HandleIdentifier(Token &Identifier). > > > > What's happening: > > __VA_ARGS__ is being serialized in the precompiled header and is being read > > when Preprocessor::HandleIdentifier calls updateOutOfDateIdentifier(II) > > with the recently read __VA_ARGS__ II. > > The Preprocessor had set Ident__VA_ARGS__->isPoisoned to false because > > we're defining a C99 variadic macro, but when ASTReader updates the > > __VA_ARGS__ token, it sets it to what it was when writing the pch file: > > true. > > > > It seemed that handling it here was better than to handle it when writing > > or reading the pch file. > > This seems reasonable. I simplified the condition so that it checks the > address of the IdentifierInfos (since they are uniqued by the identifier > table), and committed as r159446. Thanks! > > - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
