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. Regards, Filipe
clang-__VA_ARGS__-pch-fix.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
