diff options
| author | 2018-04-06 14:26:03 +0000 | |
|---|---|---|
| committer | 2018-04-06 14:26:03 +0000 | |
| commit | bdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch) | |
| tree | c50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp | |
| parent | Print a 'p' flag for file descriptors that were opened after pledge(2). (diff) | |
| download | wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip | |
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp b/gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp index d1facd9c687..ec73479cb54 100644 --- a/gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp +++ b/gnu/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp @@ -99,10 +99,14 @@ TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) { TokenInfo[tok::utf32_char_constant ] |= aci_custom; } - // These tokens have custom code in C++1z mode. - if (PP.getLangOpts().CPlusPlus1z) + // These tokens have custom code in C++17 mode. + if (PP.getLangOpts().CPlusPlus17) 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 == '>'; } } |
