From: Eli Friedman Date: Wed, 27 May 2009 22:33:06 +0000 (+0000) Subject: Don't vary token concatenation based on the language options; this X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=896ccf83eb1a575d596fe757a9b259429ce7ab16;p=clang 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 15637996b4..ab989cafc1 100644 --- a/lib/Lex/TokenConcatenation.cpp +++ b/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: // ->*