From 98dbc1c79a9e3cd3054bb54f8ced9c4ca30992ed Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 27 May 2009 22:33:06 +0000 Subject: [PATCH] Don't vary token concatenation based on the language options; this behavior is more likely to be confusing than useful. llvm-svn: 72499 --- clang/lib/Lex/TokenConcatenation.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/clang/lib/Lex/TokenConcatenation.cpp b/clang/lib/Lex/TokenConcatenation.cpp index 15637996b414..ab989cafc156 100644 --- a/clang/lib/Lex/TokenConcatenation.cpp +++ b/clang/lib/Lex/TokenConcatenation.cpp @@ -192,8 +192,7 @@ bool TokenConcatenation::AvoidConcat(const Token &PrevTok, 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 @@ bool TokenConcatenation::AvoidConcat(const Token &PrevTok, 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: // ->*