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 | 98dbc1c79a9e3cd3054bb54f8ced9c4ca30992ed (patch) | |
| tree | 9ba2d42085e6d58a7b2a80fb0982ae38afc3c590 /clang | |
| parent | 5068f77ac7bc4fd898d2abb38d2cd1956c4e2a6f (diff) | |
| download | bcm5719-llvm-98dbc1c79a9e3cd3054bb54f8ced9c4ca30992ed.tar.gz bcm5719-llvm-98dbc1c79a9e3cd3054bb54f8ced9c4ca30992ed.zip | |
Don't vary token concatenation based on the language options; this
behavior is more likely to be confusing than useful.
llvm-svn: 72499
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Lex/TokenConcatenation.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Lex/TokenConcatenation.cpp b/clang/lib/Lex/TokenConcatenation.cpp index 15637996b41..ab989cafc15 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: // ->* |

