diff options
author | ed <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
commit | 8927c19a5ed03bef55dac4b623688387bcc794dc (patch) | |
tree | b6403365e77095a79062d3379c9e6aea0df5f088 /lib/Lex/TokenConcatenation.cpp | |
parent | b8e7410b22fa573fb0078712439f343bc69208dd (diff) | |
download | FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.zip FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.tar.gz |
Update Clang sources to r73879.
Diffstat (limited to 'lib/Lex/TokenConcatenation.cpp')
-rw-r--r-- | lib/Lex/TokenConcatenation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Lex/TokenConcatenation.cpp b/lib/Lex/TokenConcatenation.cpp index ab989ca..be13b27 100644 --- a/lib/Lex/TokenConcatenation.cpp +++ b/lib/Lex/TokenConcatenation.cpp @@ -192,7 +192,8 @@ 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 == '*'; + return FirstChar == '.' || isdigit(FirstChar) || + (PP.getLangOptions().CPlusPlus && FirstChar == '*'); case tok::amp: // && return FirstChar == '&'; case tok::plus: // ++ @@ -210,10 +211,11 @@ bool TokenConcatenation::AvoidConcat(const Token &PrevTok, case tok::percent: // %>, %: return FirstChar == '>' || FirstChar == ':'; case tok::colon: // ::, :> - return FirstChar == ':' ||FirstChar == '>'; + return FirstChar == '>' || + (PP.getLangOptions().CPlusPlus && FirstChar == ':'); case tok::hash: // ##, #@, %:%: return FirstChar == '#' || FirstChar == '@' || FirstChar == '%'; case tok::arrow: // ->* - return FirstChar == '*'; + return PP.getLangOptions().CPlusPlus && FirstChar == '*'; } } |