summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/TokenConcatenation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/TokenConcatenation.cpp')
-rw-r--r--clang/lib/Lex/TokenConcatenation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Lex/TokenConcatenation.cpp b/clang/lib/Lex/TokenConcatenation.cpp
index d1facd9c687..c1ee28dcc18 100644
--- a/clang/lib/Lex/TokenConcatenation.cpp
+++ b/clang/lib/Lex/TokenConcatenation.cpp
@@ -103,6 +103,10 @@ TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) {
if (PP.getLangOpts().CPlusPlus1z)
TokenInfo[tok::utf8_char_constant] |= aci_custom;
+ // These tokens have custom code in C++2a mode.
+ if (PP.getLangOpts().CPlusPlus2a)
+ TokenInfo[tok::lessequal ] |= aci_custom_firstchar;
+
// These tokens change behavior if followed by an '='.
TokenInfo[tok::amp ] |= aci_avoid_equal; // &=
TokenInfo[tok::plus ] |= aci_avoid_equal; // +=
@@ -283,5 +287,7 @@ bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok,
return FirstChar == '#' || FirstChar == '@' || FirstChar == '%';
case tok::arrow: // ->*
return PP.getLangOpts().CPlusPlus && FirstChar == '*';
+ case tok::lessequal: // <=> (C++2a)
+ return PP.getLangOpts().CPlusPlus2a && FirstChar == '>';
}
}
OpenPOWER on IntegriCloud