Don't vary token concatenation based on the language options; this
behavior is more likely to be confusing than useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72499 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/TokenConcatenation.cpp b/lib/Lex/TokenConcatenation.cpp
index 1563799..ab989ca 100644
--- a/lib/Lex/TokenConcatenation.cpp
+++ b/lib/Lex/TokenConcatenation.cpp
@@ -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: // ->*