diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-05-27 22:33:06 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-05-27 22:33:06 +0000 |
commit | 896ccf83eb1a575d596fe757a9b259429ce7ab16 (patch) | |
tree | bfdf6090441f19775c1931dd325996b91ee6572e /lib/Lex/TokenConcatenation.cpp | |
parent | 465226e23a3008bd68973513dda1f9e3cd27dbdd (diff) |
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
Diffstat (limited to 'lib/Lex/TokenConcatenation.cpp')
-rw-r--r-- | lib/Lex/TokenConcatenation.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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: // ->* |