[cfe-commits] r38795 - /cfe/cfe/trunk/Lex/Preprocessor.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:42 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:42 2007
New Revision: 38795
URL: http://llvm.org/viewvc/llvm-project?rev=38795&view=rev
Log:
The optimized case has to treat __VA_ARGS__ as an argument. This fixes
test/Preprocessor/macro_rescan_varargs.c
Modified:
cfe/cfe/trunk/Lex/Preprocessor.cpp
Modified: cfe/cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Lex/Preprocessor.cpp?rev=38795&r1=38794&r2=38795&view=diff
==============================================================================
--- cfe/cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/cfe/trunk/Lex/Preprocessor.cpp Wed Jul 11 11:24:42 2007
@@ -542,6 +542,11 @@
I != E; ++I)
if (*I == II)
return false; // Identifier is a macro argument.
+
+ // If the argument is the __VA_ARGS__ token, we can't fast expand it.
+ if (!strcmp(II->getName(), "__VA_ARGS__"))
+ return false; // Identifier is macro argument.
+
return true;
}
More information about the cfe-commits
mailing list