forked from OSchip/llvm-project
Rename cxx1z -> cxx17 across all diagnostic IDs.
llvm-svn: 310805
This commit is contained in:
parent
cbaaa295f0
commit
b115e5dda2
|
@ -182,7 +182,7 @@ def ext_hex_constant_invalid : Extension<
|
|||
"hexadecimal floating constants are a C99 feature">, InGroup<C99>;
|
||||
def ext_hex_literal_invalid : Extension<
|
||||
"hexadecimal floating literals are a C++17 feature">, InGroup<CXX17>;
|
||||
def warn_cxx1z_hex_literal : Warning<
|
||||
def warn_cxx17_hex_literal : Warning<
|
||||
"hexadecimal floating literals are incompatible with "
|
||||
"C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompatPedantic>, DefaultIgnore;
|
||||
|
|
|
@ -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<CXX17>;
|
||||
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<CXXPre1zCompat>, DefaultIgnore;
|
||||
def ext_using_declaration_pack : ExtWarn<
|
||||
"pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>;
|
||||
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<CXXPre1zCompat>, 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<CXXPre1zCompat>, 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<CXX17>;
|
||||
|
||||
// Availability attribute
|
||||
|
|
|
@ -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<Deprecated>, 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<CXX17CompatMangling>;
|
||||
|
||||
|
@ -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<CXXPre1zCompat>, 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<CXX17>;
|
||||
}
|
||||
|
||||
|
@ -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<CXX14>;
|
||||
def ext_cxx1z_attr : Extension<
|
||||
def ext_cxx17_attr : Extension<
|
||||
"use of the %0 attribute is a C++17 extension">, InGroup<CXX17>;
|
||||
|
||||
def warn_unused_comparison : Warning<
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 ';'.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue