[cfe-commits] r38581 - /cfe/cfe/trunk/Lex/Preprocessor.cpp

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:22:54 PDT 2007


Author: sabre
Date: Wed Jul 11 11:22:54 2007
New Revision: 38581

URL: http://llvm.org/viewvc/llvm-project?rev=38581&view=rev
Log:
Allow expansion to single token identifiers if they are not macros

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=38581&r1=38580&r2=38581&view=diff

==============================================================================
--- cfe/cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/cfe/trunk/Lex/Preprocessor.cpp Wed Jul 11 11:22:54 2007
@@ -452,9 +452,9 @@
         return;
         
       } else if (MI->getNumTokens() == 1 &&
-                 // Don't handle identifiers, which might need recursive
-                 // expansion.
-                 MI->getReplacementToken(0).getIdentifierInfo() == 0) {
+                 // Don't handle identifiers if they need recursive expansion.
+                 (MI->getReplacementToken(0).getIdentifierInfo() == 0 ||
+             !MI->getReplacementToken(0).getIdentifierInfo()->getMacroInfo())) {
         // FIXME: Function-style macros only if no arguments?
 
         // Otherwise, if this macro expands into a single trivially-expanded





More information about the cfe-commits mailing list