From 0018aec614ff892c8996c77e2345c3d7731d2539 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 13 Aug 2017 23:37:29 +0000 Subject: [PATCH] Rename cxx1z -> cxx17 across all diagnostic IDs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310805 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticLexKinds.td | 2 +- include/clang/Basic/DiagnosticParseKinds.td | 6 +++--- include/clang/Basic/DiagnosticSemaKinds.td | 6 +++--- include/clang/Basic/LangOptions.def | 2 +- include/clang/Basic/TokenKinds.def | 2 +- lib/Lex/LiteralSupport.cpp | 2 +- lib/Parse/ParseDeclCXX.cpp | 4 ++-- lib/Parse/ParseExprCXX.cpp | 2 +- lib/Sema/SemaDecl.cpp | 2 +- lib/Sema/SemaDeclAttr.cpp | 4 ++-- lib/Sema/SemaLambda.cpp | 2 +- lib/Sema/SemaStmtAttr.cpp | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 9cc55fb52c..7facf4f3d0 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -182,7 +182,7 @@ def ext_hex_constant_invalid : Extension< "hexadecimal floating constants are a C99 feature">, InGroup; def ext_hex_literal_invalid : Extension< "hexadecimal floating literals are a C++17 feature">, InGroup; -def warn_cxx1z_hex_literal : Warning< +def warn_cxx17_hex_literal : Warning< "hexadecimal floating literals are incompatible with " "C++ standards before C++17">, InGroup, DefaultIgnore; diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 7346997c4e..077e6b01d3 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -752,13 +752,13 @@ def err_alias_declaration_pack_expansion : Error< def ext_multi_using_declaration : ExtWarn< "use of multiple declarators in a single using declaration is " "a C++17 extension">, InGroup; -def warn_cxx1z_compat_multi_using_declaration : Warning< +def warn_cxx17_compat_multi_using_declaration : Warning< "use of multiple declarators in a single using declaration is " "incompatible with C++ standards before C++17">, InGroup, DefaultIgnore; def ext_using_declaration_pack : ExtWarn< "pack expansion of using declaration is a C++17 extension">, InGroup; -def warn_cxx1z_compat_using_declaration_pack : Warning< +def warn_cxx17_compat_using_declaration_pack : Warning< "pack expansion using declaration is incompatible with C++ standards " "before C++17">, InGroup, DefaultIgnore; @@ -819,7 +819,7 @@ def err_expected_star_this_capture : Error< def warn_cxx14_compat_constexpr_on_lambda : Warning< "constexpr on lambda expressions is incompatible with C++ standards before C++17">, InGroup, DefaultIgnore; -def ext_constexpr_on_lambda_cxx1z : ExtWarn< +def ext_constexpr_on_lambda_cxx17 : ExtWarn< "'constexpr' on lambda expressions is a C++17 extension">, InGroup; // Availability attribute diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 946b1ef14e..25bc6508e1 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -507,7 +507,7 @@ def warn_deprecated_copy_operation : Warning< "for %0 is deprecated because it has a user-declared " "%select{copy %select{assignment operator|constructor}1|destructor}2">, InGroup, DefaultIgnore; -def warn_cxx1z_compat_exception_spec_in_signature : Warning< +def warn_cxx17_compat_exception_spec_in_signature : Warning< "mangled name of %0 will change in C++17 due to non-throwing exception " "specification in function signature">, InGroup; @@ -6556,7 +6556,7 @@ let CategoryName = "Lambda Issue" in { def warn_cxx14_compat_star_this_lambda_capture : Warning< "by value capture of '*this' is incompatible with C++ standards before C++17">, InGroup, DefaultIgnore; - def ext_star_this_lambda_capture_cxx1z : ExtWarn< + def ext_star_this_lambda_capture_cxx17 : ExtWarn< "capture of '*this' by copy is a C++17 extension">, InGroup; } @@ -7229,7 +7229,7 @@ def warn_unused_volatile : Warning< def ext_cxx14_attr : Extension< "use of the %0 attribute is a C++14 extension">, InGroup; -def ext_cxx1z_attr : Extension< +def ext_cxx17_attr : Extension< "use of the %0 attribute is a C++17 extension">, InGroup; def warn_unused_comparison : Warning< diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index c9230e0aaa..67e8dc4619 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -89,7 +89,7 @@ LANGOPT(Borland , 1, 0, "Borland extensions") LANGOPT(CPlusPlus , 1, 0, "C++") LANGOPT(CPlusPlus11 , 1, 0, "C++11") LANGOPT(CPlusPlus14 , 1, 0, "C++14") -LANGOPT(CPlusPlus1z , 1, 0, "C++1z") +LANGOPT(CPlusPlus1z , 1, 0, "C++17") LANGOPT(CPlusPlus2a , 1, 0, "C++2a") LANGOPT(ObjC1 , 1, 0, "Objective-C 1") LANGOPT(ObjC2 , 1, 0, "Objective-C 2") diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index 79e6abf391..61c5687730 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -145,7 +145,7 @@ TOK(numeric_constant) // 0x123 TOK(char_constant) // 'a' TOK(wide_char_constant) // L'b' -// C++1z Character Constants +// C++17 Character Constants TOK(utf8_char_constant) // u8'a' // C++11 Character Constants diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index 3cc45cea97..f1738483f0 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -847,7 +847,7 @@ void NumericLiteralParser::ParseNumberStartingWithZero(SourceLocation TokLoc) { ? diag::ext_hex_literal_invalid : diag::ext_hex_constant_invalid); else if (PP.getLangOpts().CPlusPlus1z) - PP.Diag(TokLoc, diag::warn_cxx1z_hex_literal); + PP.Diag(TokLoc, diag::warn_cxx17_hex_literal); } else if (saw_period) { PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin), diag::err_hex_constant_requires) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 2301284b7f..dcba364d05 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -605,7 +605,7 @@ bool Parser::ParseUsingDeclarator(unsigned Context, UsingDeclarator &D) { if (TryConsumeToken(tok::ellipsis, D.EllipsisLoc)) Diag(Tok.getLocation(), getLangOpts().CPlusPlus1z ? - diag::warn_cxx1z_compat_using_declaration_pack : + diag::warn_cxx17_compat_using_declaration_pack : diag::ext_using_declaration_pack); return false; @@ -723,7 +723,7 @@ Parser::ParseUsingDeclaration(unsigned Context, if (DeclsInGroup.size() > 1) Diag(Tok.getLocation(), getLangOpts().CPlusPlus1z ? - diag::warn_cxx1z_compat_multi_using_declaration : + diag::warn_cxx17_compat_multi_using_declaration : diag::ext_multi_using_declaration); // Eat ';'. diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index 56b0327995..b95506294b 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -1054,7 +1054,7 @@ addConstexprToLambdaDeclSpecifier(Parser &P, SourceLocation ConstexprLoc, DeclSpec &DS) { if (ConstexprLoc.isValid()) { P.Diag(ConstexprLoc, !P.getLangOpts().CPlusPlus1z - ? diag::ext_constexpr_on_lambda_cxx1z + ? diag::ext_constexpr_on_lambda_cxx17 : diag::warn_cxx14_compat_constexpr_on_lambda); const char *PrevSpec = nullptr; unsigned DiagID = 0; diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 0879e78a9a..667eddec1e 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -9536,7 +9536,7 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, AnyNoexcept |= HasNoexcept(T); if (AnyNoexcept) Diag(NewFD->getLocation(), - diag::warn_cxx1z_compat_exception_spec_in_signature) + diag::warn_cxx17_compat_exception_spec_in_signature) << NewFD; } diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index f1e47291da..0086e643c1 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -2151,7 +2151,7 @@ static void handleUnusedAttr(Sema &S, Decl *D, const AttributeList &Attr) { // If this is spelled as the standard C++1z attribute, but not in C++1z, warn // about using it as an extension. if (!S.getLangOpts().CPlusPlus1z && IsCXX1zAttr) - S.Diag(Attr.getLoc(), diag::ext_cxx1z_attr) << Attr.getName(); + S.Diag(Attr.getLoc(), diag::ext_cxx17_attr) << Attr.getName(); D->addAttr(::new (S.Context) UnusedAttr( Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); @@ -2849,7 +2849,7 @@ static void handleWarnUnusedResult(Sema &S, Decl *D, const AttributeList &Attr) // about using it as an extension. if (!S.getLangOpts().CPlusPlus1z && Attr.isCXX11Attribute() && !Attr.getScopeName()) - S.Diag(Attr.getLoc(), diag::ext_cxx1z_attr) << Attr.getName(); + S.Diag(Attr.getLoc(), diag::ext_cxx17_attr) << Attr.getName(); D->addAttr(::new (S.Context) WarnUnusedResultAttr(Attr.getRange(), S.Context, diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 46f2ba3760..97575587c3 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -934,7 +934,7 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, if (C->Kind == LCK_This || C->Kind == LCK_StarThis) { if (C->Kind == LCK_StarThis) Diag(C->Loc, !getLangOpts().CPlusPlus1z - ? diag::ext_star_this_lambda_capture_cxx1z + ? diag::ext_star_this_lambda_capture_cxx17 : diag::warn_cxx14_compat_star_this_lambda_capture); // C++11 [expr.prim.lambda]p8: diff --git a/lib/Sema/SemaStmtAttr.cpp b/lib/Sema/SemaStmtAttr.cpp index ad82a44b30..d43c8c38f6 100644 --- a/lib/Sema/SemaStmtAttr.cpp +++ b/lib/Sema/SemaStmtAttr.cpp @@ -47,7 +47,7 @@ static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const AttributeList &A, // about using it as an extension. if (!S.getLangOpts().CPlusPlus1z && A.isCXX11Attribute() && !A.getScopeName()) - S.Diag(A.getLoc(), diag::ext_cxx1z_attr) << A.getName(); + S.Diag(A.getLoc(), diag::ext_cxx17_attr) << A.getName(); FnScope->setHasFallthroughStmt(); return ::new (S.Context) auto(Attr); -- 2.50.1