[cfe-commits] r72499 - /cfe/trunk/lib/Lex/TokenConcatenation.cpp

Eli Friedman eli.friedman at gmail.com
Wed May 27 15:33:07 PDT 2009


Author: efriedma
Date: Wed May 27 17:33:06 2009
New Revision: 72499

URL: http://llvm.org/viewvc/llvm-project?rev=72499&view=rev
Log:
Don't vary token concatenation based on the language options; this 
behavior is more likely to be confusing than useful.


Modified:
    cfe/trunk/lib/Lex/TokenConcatenation.cpp

Modified: cfe/trunk/lib/Lex/TokenConcatenation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenConcatenation.cpp?rev=72499&r1=72498&r2=72499&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/TokenConcatenation.cpp (original)
+++ cfe/trunk/lib/Lex/TokenConcatenation.cpp Wed May 27 17:33:06 2009
@@ -192,8 +192,7 @@
     return isalnum(FirstChar) || Tok.is(tok::numeric_constant) ||
     FirstChar == '+' || FirstChar == '-' || FirstChar == '.';
   case tok::period:          // ..., .*, .1234
-    return FirstChar == '.' || isdigit(FirstChar) ||
-    (FirstChar == '*' && PP.getLangOptions().CPlusPlus);
+    return FirstChar == '.' || isdigit(FirstChar) || FirstChar == '*';
   case tok::amp:             // &&
     return FirstChar == '&';
   case tok::plus:            // ++
@@ -209,11 +208,9 @@
   case tok::pipe:            // ||
     return FirstChar == '|';
   case tok::percent:         // %>, %:
-    return (FirstChar == '>' || FirstChar == ':') &&
-    PP.getLangOptions().Digraphs;
+    return FirstChar == '>' || FirstChar == ':';
   case tok::colon:           // ::, :>
-    return (FirstChar == ':' && PP.getLangOptions().CPlusPlus) ||
-    (FirstChar == '>' && PP.getLangOptions().Digraphs);
+    return FirstChar == ':' ||FirstChar == '>';
   case tok::hash:            // ##, #@, %:%:
     return FirstChar == '#' || FirstChar == '@' || FirstChar == '%';
   case tok::arrow:           // ->*





More information about the cfe-commits mailing list