diff options
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index ced65f689d7..e7b48917c63 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -1597,7 +1597,7 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && getLangOpts().CPlusPlus1y) { + if (C == '\'' && getLangOpts().CPlusPlus14) { unsigned NextSize; char Next = getCharAndSizeNoWarn(CurPtr + Size, NextSize, getLangOpts()); if (isIdentifierBody(Next)) { @@ -1660,7 +1660,7 @@ const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, bool IsUDSuffix = false; if (C == '_') IsUDSuffix = true; - else if (IsStringLiteral && getLangOpts().CPlusPlus1y) { + else if (IsStringLiteral && getLangOpts().CPlusPlus14) { // In C++1y, we need to look ahead a few characters to see if this is a // valid suffix for a string literal or a numeric literal (this could be // the 'operator""if' defining a numeric literal operator). diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 6417d0f0f5f..096805c3cf5 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -656,7 +656,7 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, } } // "i", "if", and "il" are user-defined suffixes in C++1y. - if (PP.getLangOpts().CPlusPlus1y && *s == 'i') + if (PP.getLangOpts().CPlusPlus14 && *s == 'i') break; // fall through. case 'j': @@ -716,7 +716,7 @@ bool NumericLiteralParser::isValidUDSuffix(const LangOptions &LangOpts, return true; // In C++11, there are no library suffixes. - if (!LangOpts.CPlusPlus1y) + if (!LangOpts.CPlusPlus14) return false; // In C++1y, "s", "h", "min", "ms", "us", and "ns" are used in the library. @@ -813,10 +813,10 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { if ((c1 == 'b' || c1 == 'B') && (c2 == '0' || c2 == '1')) { // 0b101010 is a C++1y / GCC extension. PP.Diag(TokLoc, - PP.getLangOpts().CPlusPlus1y + PP.getLangOpts().CPlusPlus14 ? diag::warn_cxx11_compat_binary_literal : PP.getLangOpts().CPlusPlus - ? diag::ext_binary_literal_cxx1y + ? diag::ext_binary_literal_cxx14 : diag::ext_binary_literal); ++s; radix = 2; diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 2d7c6d4b522..62d2da56ba9 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -950,15 +950,15 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) { .Case("cxx_user_literals", LangOpts.CPlusPlus11) .Case("cxx_variadic_templates", LangOpts.CPlusPlus11) // C++1y features - .Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus1y) - .Case("cxx_binary_literals", LangOpts.CPlusPlus1y) - .Case("cxx_contextual_conversions", LangOpts.CPlusPlus1y) - .Case("cxx_decltype_auto", LangOpts.CPlusPlus1y) - .Case("cxx_generic_lambdas", LangOpts.CPlusPlus1y) - .Case("cxx_init_captures", LangOpts.CPlusPlus1y) - .Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus1y) - .Case("cxx_return_type_deduction", LangOpts.CPlusPlus1y) - .Case("cxx_variable_templates", LangOpts.CPlusPlus1y) + .Case("cxx_aggregate_nsdmi", LangOpts.CPlusPlus14) + .Case("cxx_binary_literals", LangOpts.CPlusPlus14) + .Case("cxx_contextual_conversions", LangOpts.CPlusPlus14) + .Case("cxx_decltype_auto", LangOpts.CPlusPlus14) + .Case("cxx_generic_lambdas", LangOpts.CPlusPlus14) + .Case("cxx_init_captures", LangOpts.CPlusPlus14) + .Case("cxx_relaxed_constexpr", LangOpts.CPlusPlus14) + .Case("cxx_return_type_deduction", LangOpts.CPlusPlus14) + .Case("cxx_variable_templates", LangOpts.CPlusPlus14) // C++ TSes //.Case("cxx_runtime_arrays", LangOpts.CPlusPlusTSArrays) //.Case("cxx_concepts", LangOpts.CPlusPlusTSConcepts) |