llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

This changes the wording of a few diagnostic messages to be more canonical. 
Otherwise this should be NFC.

---

Patch is 105.64 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/216693.diff


38 Files Affected:

- (modified) clang/include/clang/Basic/DiagnosticCommonKinds.td (+5-11) 
- (modified) clang/include/clang/Basic/DiagnosticLexKinds.td (+11-25) 
- (modified) clang/include/clang/Basic/DiagnosticParseKinds.td (+80-252) 
- (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+22-82) 
- (modified) clang/include/clang/Lex/Lexer.h (+2) 
- (modified) clang/include/clang/Lex/Preprocessor.h (+9) 
- (modified) clang/lib/Lex/Lexer.cpp (+6-3) 
- (modified) clang/lib/Lex/PPDirectives.cpp (+6-16) 
- (modified) clang/lib/Lex/PPExpressions.cpp (+7-6) 
- (modified) clang/lib/Parse/ParseCXXInlineMethods.cpp (+6-12) 
- (modified) clang/lib/Parse/ParseDecl.cpp (+12-27) 
- (modified) clang/lib/Parse/ParseDeclCXX.cpp (+22-66) 
- (modified) clang/lib/Parse/ParseExpr.cpp (+7-10) 
- (modified) clang/lib/Parse/ParseExprCXX.cpp (+7-20) 
- (modified) clang/lib/Parse/ParseObjc.cpp (+1-1) 
- (modified) clang/lib/Parse/ParseOpenMP.cpp (+1-1) 
- (modified) clang/lib/Parse/ParseStmt.cpp (+12-30) 
- (modified) clang/lib/Parse/ParseTemplate.cpp (+4-12) 
- (modified) clang/lib/Parse/Parser.cpp (+2-6) 
- (modified) clang/lib/Sema/SemaDeclCXX.cpp (+6-18) 
- (modified) clang/lib/Sema/SemaExpr.cpp (+7-10) 
- (modified) clang/lib/Sema/SemaLambda.cpp (+4-12) 
- (modified) clang/lib/Sema/SemaStmt.cpp (+1-3) 
- (modified) clang/lib/Sema/SemaTemplate.cpp (+4-10) 
- (modified) clang/lib/Sema/SemaTemplateVariadic.cpp (+1-3) 
- (modified) clang/lib/Sema/SemaType.cpp (+2-6) 
- (modified) 
clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp 
(+3-3) 
- (modified) clang/test/CXX/drs/cwg0xx.cpp (+5-5) 
- (modified) clang/test/CXX/drs/cwg4xx.cpp (+3-3) 
- (modified) clang/test/CXX/stmt.stmt/stmt.select/p3.cpp (+6-6) 
- (modified) clang/test/Lexer/cxx2c-raw-strings.cpp (+4-4) 
- (modified) clang/test/Parser/cxx0x-in-cxx98.cpp (+1-1) 
- (modified) clang/test/Parser/cxx0x-lambda-expressions.cpp (+1-1) 
- (modified) clang/test/Parser/cxx11-user-defined-literals.cpp (+1-1) 
- (modified) clang/test/Parser/cxx1z-nested-namespace-definition.cpp (+1-1) 
- (modified) clang/test/Sema/static-assert.c (+1-1) 
- (modified) clang/test/SemaCXX/cxx98-compat.cpp (+2-2) 
- (modified) clang/test/SemaCXX/static-assert-ext.cpp (+2-2) 


``````````diff
diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td 
b/clang/include/clang/Basic/DiagnosticCommonKinds.td
index 192fdf9299eb4..2c9ad1d324f28 100644
--- a/clang/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td
@@ -11,6 +11,11 @@
 
//===----------------------------------------------------------------------===//
 
 let Component = "Common" in {
+// C++11 compatibility with C++98.
+defm variadic_templates : CXX11Compat<"variadic templates are">;
+
+// C++23 compatibility with C++20 and earlier.
+defm size_t_suffix : CXX23Compat<"'size_t' suffix for literals is">;
 
 // Substitutions.
 
@@ -91,11 +96,6 @@ def warn_method_param_declaration : Warning<"redeclaration 
of method parameter %
 def err_invalid_storage_class_in_func_decl : Error<
   "invalid storage class specifier in function declarator">;
 def err_expected_namespace_name : Error<"expected namespace name">;
-def ext_variadic_templates : ExtWarn<
-  "variadic templates are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_variadic_templates :
-  Warning<"variadic templates are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
 def err_default_special_members : Error<
   "only special member functions %select{|and comparison operators }0"
   "may be defaulted">;
@@ -223,12 +223,6 @@ def ext_cxx11_longlong : Extension<
 def warn_cxx98_compat_longlong : Warning<
   "'long long' is incompatible with C++98">,
   InGroup<CXX98CompatPedantic>, DefaultIgnore;
-def ext_cxx23_size_t_suffix : ExtWarn<
-  "'size_t' suffix for literals is a C++23 extension">,
-  InGroup<CXX23>;
-def warn_cxx20_compat_size_t_suffix : Warning<
-  "'size_t' suffix for literals is incompatible with C++ standards before "
-  "C++23">, InGroup<CXXPre23Compat>, DefaultIgnore;
 def err_cxx23_size_t_suffix: Error<
   "'size_t' suffix for literals is a C++23 feature">;
 def err_size_t_literal_too_large: Error<
diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td 
b/clang/include/clang/Basic/DiagnosticLexKinds.td
index f0791ed486a74..bb2800e0cdbc1 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -11,6 +11,17 @@
 
//===----------------------------------------------------------------------===//
 
 let Component = "Lex", CategoryName = "Lexical or Preprocessor Issue" in {
+// C23 compatibility with C17 and earlier.
+defm c23_pp_directive : C23Compat<
+  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive is", 
/*ext_warn*/true>;
+
+// C++23 compatibility with C++20 and earlier.
+defm cxx23_pp_directive : CXX23Compat<
+  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive is">;
+
+// C++26 compatibility with C++23 and earlier.
+defm raw_string_literal_character_set : CXX26Compat<
+  " '%0' in a raw string literal delimiter is", /*ext_warn*/false>;
 
 def null_in_char_or_string : Warning<
   "null character(s) preserved in %select{char|string}0 literal">,
@@ -113,14 +124,6 @@ def warn_cxx98_compat_raw_string_literal : Warning<
   "raw string literals are incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
 
-def warn_cxx26_compat_raw_string_literal_character_set : Warning<
-  " '%0' in a raw string literal delimiter is incompatible "
-  "with standards before C++2c">,
-  InGroup<CXXPre26Compat>, DefaultIgnore;
-def ext_cxx26_raw_string_literal_character_set : Extension<
-  " '%0' in a raw string literal delimiter is a C++2c extension">,
-  InGroup<CXX26>, DefaultIgnore;
-
 def warn_multichar_character_literal : Warning<
   "multi-character character constant">, InGroup<MultiChar>;
 def warn_four_char_character_literal : Warning<
@@ -836,23 +839,6 @@ def warn_cxx98_compat_pp_line_too_big : Warning<
   "#line number greater than 32767 is incompatible with C++98">,
   InGroup<CXX98CompatPedantic>, DefaultIgnore;
 
-def warn_c23_compat_pp_directive : Warning<
-  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive "
-  "is incompatible with C standards before C23">,
-  InGroup<CPre23Compat>, DefaultIgnore;
-def ext_c23_pp_directive : ExtWarn<
-  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive "
-  "is a C23 extension">,
-  InGroup<C23>;
-def warn_cxx23_compat_pp_directive : Warning<
-  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive "
-  "is incompatible with C++ standards before C++23">,
-  InGroup<CXXPre23Compat>, DefaultIgnore;
-def ext_cxx23_pp_directive : ExtWarn<
-  "use of a '#%select{<BUG IF SEEN>|elifdef|elifndef}0' directive "
-  "is a C++23 extension">,
-  InGroup<CXX23>;
-
 def err_pp_visibility_non_macro : Error<"no macro named %0">;
 
 def err_pp_arc_cf_code_audited_syntax : Error<"expected 'begin' or 'end'">;
diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td 
b/clang/include/clang/Basic/DiagnosticParseKinds.td
index 6a48d74079f4e..60ba00e431208 100644
--- a/clang/include/clang/Basic/DiagnosticParseKinds.td
+++ b/clang/include/clang/Basic/DiagnosticParseKinds.td
@@ -12,15 +12,93 @@
 
 let Component = "Parse" in {
 let CategoryName = "Parse Issue" in {
-// C2y compatibility with C89.
+// C23 compatibility with C17 and earlier.
+defm c_label_at_end_of_compound_statement : C23Compat<
+  "label at end of compound statement is", /*ext_warn*/true>;
+defm c_static_assert_no_message : C23Compat<
+  "'_Static_assert' with no message is", /*ext_warn*/true>;
+defm c23_attributes : C23Compat<"[[]] attributes are">;
+defm c_enum_fixed_underlying_type : C23Compat<
+  "enumeration types with a fixed underlying type are">;
+defm label_followed_by_declaration : C23Compat<
+  "label followed by a declaration is">;
+
+// C2y compatibility with C23 and earlier.
 defm decl_statement : C2yCompat<"'%select{if|switch}0' declaration statements 
are">;
+defm generic_with_type_arg : C2yCompat<
+  "passing a type argument as the first operand to '_Generic' is">;
 
 // C++11 compatibility with C++98.
-defm enum_fixed_underlying_type : CXX11Compat<
+defm cxx_enum_fixed_underlying_type : CXX11Compat<
   "enumeration types with a fixed underlying type are",
   /*ext_warn=*/false>;
+defm for_range : CXX11Compat<"range-based for loop is">;
+defm scoped_enum : CXX11Compat<"scoped enumerations are">;
+defm rvalue_reference : CXX11Compat<"rvalue references are">;
+defm ref_qualifier : CXX11Compat<"reference qualifiers on functions are">;
+defm generalized_initializer_lists : CXX11Compat<
+  "generalized initializer lists are">;
+defm cxx11_attributes : CXX11Compat<"[[]] attributes are", /*ext_warn*/false>;
+defm defaulted_deleted_function : CXX11Compat<
+  "%select{defaulted|deleted}0 function definitions are">;
+defm nonstatic_member_init : CXX11Compat<
+  "default member initializer for non-static data member is">;
+defm alias_declaration : CXX11Compat<"alias declarations are">;
+defm override_control_keyword : CXX11Compat<"'%0' keyword is">;
+defm inline_namespace : CXX11Compat<"inline namespaces are">;
+
+// C++14 compatibility with C++11 and earlier.
+defm decltype_auto_type_specifier : CXX14Compat<
+  "'decltype(auto)' type specifier is">;
 }
 
+// C++17 compatibility with C++14 and earlier.
+defm cxx_static_assert_no_message : CXX17Compat<
+  "'static_assert' with no message is">;
+defm constexpr_if : CXX17Compat<"constexpr if is">;
+defm init_statement : CXX17Compat<
+  "'%select{if|switch}0' initialization statements are">;
+defm ns_enum_attribute : CXX17Compat<
+  "attributes on %select{a namespace|an enumerator}0 declaration are",
+  /*ext_warn*/false>;
+defm using_attribute_ns : CXX17Compat<
+  "default scope specifier for attributes is">;
+defm template_template_param_typename : CXX17Compat<
+  "template template parameter using 'typename' is">;
+defm fold_expression : CXX17Compat<"pack fold expression is">;
+defm multi_using_declaration : CXX17Compat<
+  "use of multiple declarators in a single using declaration is">;
+defm using_declaration_pack : CXX17Compat<
+  "pack expansion of using declaration is">;
+defm constexpr_on_lambda : CXX17Compat<"'constexpr' on lambda expressions is">;
+
+// C++20 compatibility with C++17 and earlier.
+defm using_enum_declaration : CXX20Compat<"using enum declaration is">;
+defm for_range_init_stmt : CXX20Compat<
+  "range-based for loop initialization statements are">;
+defm explicit_bool : CXX20Compat<"explicit(bool) is">;
+defm bitfield_member_init : CXX20Compat<
+  "default member initializer for bit-field is">;
+defm lambda_template_parameter_list : CXX20Compat<
+  "explicit template parameter list for lambdas is">;
+
+// C++23 compatibility with C++20 and earlier.
+defm cxx_label_at_end_of_compound_statement : CXX23Compat<
+  "label at end of compound statement is">;
+defm alias_in_init_statement : CXX23Compat<
+  "alias declaration in this context is">;
+defm consteval_if : CXX23Compat<"consteval if is">;
+defm static_lambda : CXX23Compat<"static lambdas are">;
+
+// C++26 compatibility with C++23 and earlier.
+defm static_assert_user_generated_message : CXX26Compat<
+  "'static_assert' with a user-generated message is">;
+defm attrs_on_binding : CXX26Compat<
+  "an attribute specifier sequence attached to a structured binding 
declaration is">;
+defm delete_with_message : CXX26Compat<"'= delete' with a message is", 
/*ext_warn*/false>;
+defm variadic_friends : CXX26Compat<"variadic 'friend' declarations are">;
+defm binding_pack : CXX26Compat<"structured binding packs are">;
+
 def err_asm_qualifier_ignored : Error<
   "expected 'volatile', 'inline', 'goto', or '('">, CatInlineAsm;
 def err_global_asm_qualifier_ignored : Error<
@@ -122,12 +200,6 @@ def ext_ms_c_enum_fixed_underlying_type : Extension<
 def ext_ms_c_empty_enum_type : Extension<
   "empty enumeration types are a Microsoft extension">,
   InGroup<MicrosoftEmptyEnum>;
-def ext_c23_enum_fixed_underlying_type : Extension<
-  "enumeration types with a fixed underlying type are a C23 extension">,
-  InGroup<C23>;
-def warn_c17_compat_enum_fixed_underlying_type : Warning<
-  "enumeration types with a fixed underlying type are incompatible with C 
standards before C23">,
-  DefaultIgnore, InGroup<CPre23Compat>;
 def ext_enum_base_in_type_specifier : ExtWarn<
   "non-defining declaration of enumeration with a fixed underlying type is "
   "only permitted as a standalone declaration"
@@ -138,11 +210,6 @@ def ext_elaborated_enum_class : ExtWarn<
   InGroup<DiagGroup<"elaborated-enum-class">>, DefaultError;
 def err_scoped_enum_missing_identifier : Error<
   "scoped enumeration requires a name">;
-def ext_scoped_enum : ExtWarn<
-  "scoped enumerations are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_scoped_enum : Warning<
-  "scoped enumerations are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
 def err_anonymous_enum_bitfield : Error<
   "ISO C++ only allows ':' in member enumeration declaration to introduce "
   "a fixed underlying type, not an anonymous bit-field">;
@@ -166,12 +233,6 @@ def err_duplicate_default_assoc : Error<
   "duplicate default generic association">;
 def note_previous_default_assoc : Note<
   "previous default generic association is here">;
-def ext_c2y_generic_with_type_arg : Extension<
-  "passing a type argument as the first operand to '_Generic' is a C2y "
-  "extension">, InGroup<C2y>;
-def warn_c2y_compat_generic_with_type_arg : Warning<
-  "passing a type argument as the first operand to '_Generic' is incompatible "
-  "with C standards before C2y">, InGroup<CPre2yCompat>, DefaultIgnore;
 
 def ext_c99_feature : Extension<
   "'%0' is a C99 extension">, InGroup<C99>;
@@ -334,24 +395,6 @@ def note_missing_selector_name : Note<
 def note_force_empty_selector_name : Note<
   "or insert whitespace before ':' to use %0 as parameter name "
   "and have an empty entry in the selector">;
-def ext_c_label_followed_by_declaration : ExtWarn<
-  "label followed by a declaration is a C23 extension">,
-  InGroup<C23>;
-def warn_c23_compat_label_followed_by_declaration : Warning<
-  "label followed by a declaration is incompatible with C standards before "
-  "C23">, InGroup<CPre23Compat>, DefaultIgnore;
-def ext_c_label_end_of_compound_statement : ExtWarn<
-  "label at end of compound statement is a C23 extension">,
-   InGroup<C23>;
-def ext_cxx_label_end_of_compound_statement : ExtWarn<
-  "label at end of compound statement is a C++23 extension">,
-   InGroup<CXX23>;
-def warn_c23_compat_label_end_of_compound_statement : Warning<
-  "label at end of compound statement is incompatible with C standards before 
C23">,
-  InGroup<CPre23Compat>, DefaultIgnore;
-def warn_cxx20_compat_label_end_of_compound_statement : Warning<
-  "label at end of compound statement is incompatible with C++ standards 
before C++23">,
-  InGroup<CXXPre23Compat>, DefaultIgnore;
 def err_address_of_label_outside_fn : Error<
   "use of address-of-label extension outside of a function body">;
 def err_asm_operand_wide_string_literal : Error<
@@ -378,27 +421,6 @@ def err_invalid_reference_qualifier_application : Error<
   "'%0' qualifier may not be applied to a reference">;
 def err_illegal_decl_reference_to_reference : Error<
   "%0 declared as a reference to a reference">;
-def ext_rvalue_reference : ExtWarn<
-  "rvalue references are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_rvalue_reference : Warning<
-  "rvalue references are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
-def ext_ref_qualifier : ExtWarn<
-  "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_ref_qualifier : Warning<
-  "reference qualifiers on functions are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
-def ext_inline_namespace : ExtWarn<
-  "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
-def warn_cxx98_compat_inline_namespace : Warning<
-  "inline namespaces are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
-def ext_generalized_initializer_lists : ExtWarn<
-  "generalized initializer lists are a C++11 extension">,
-  InGroup<CXX11>;
-def warn_cxx98_compat_generalized_initializer_lists : Warning<
-  "generalized initializer lists are incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
 def err_init_list_bin_op : Error<"initializer list cannot be used on the "
   "%select{left|right}0 hand side of operator '%1'">;
 def warn_cxx98_compat_trailing_return_type : Warning<
@@ -413,19 +435,9 @@ def err_requires_clause_inside_parens : Error<
 def ext_auto_storage_class : ExtWarn<
   "'auto' storage class specifier is not permitted in C++11, and will not "
   "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
-def ext_decltype_auto_type_specifier : ExtWarn<
-  "'decltype(auto)' type specifier is a C++14 extension">, InGroup<CXX14>;
-def warn_cxx11_compat_decltype_auto_type_specifier : Warning<
-  "'decltype(auto)' type specifier is incompatible with C++ standards before "
-  "C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
 def ext_auto_type : Extension<
   "'__auto_type' is a GNU extension">,
   InGroup<GNUAutoType>;
-def ext_for_range : ExtWarn<
-  "range-based for loop is a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_for_range : Warning<
-  "range-based for loop is incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
 def err_for_range_identifier : Error<
   "%select{range-based for loop|expansion statement}0 requires "
   "type for %select{loop|expansion}0 variable">;
@@ -503,24 +515,6 @@ def err_bool_redeclaration : Error<
 def warn_cxx98_compat_static_assert : Warning<
   "'static_assert' declarations are incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
-def ext_cxx_static_assert_no_message : ExtWarn<
-  "'static_assert' with no message is a C++17 extension">, InGroup<CXX17>;
-def ext_c_static_assert_no_message : ExtWarn<
-  "'_Static_assert' with no message is a C23 extension">, InGroup<C23>;
-def warn_cxx14_compat_static_assert_no_message : Warning<
-  "'static_assert' with no message is incompatible with C++ standards before "
-  "C++17">,
-  DefaultIgnore, InGroup<CXXPre17Compat>;
-def warn_c17_compat_static_assert_no_message : Warning<
-  "'_Static_assert' with no message is incompatible with C standards before "
-  "C23">,
-  DefaultIgnore, InGroup<CPre23Compat>;
-def ext_cxx_static_assert_user_generated_message : ExtWarn<
-  "'static_assert' with a user-generated message is a C++26 extension">,
-  InGroup<CXX26>;
-def warn_cxx20_compat_static_assert_user_generated_message : Warning<
-  "'static_assert' with a user-generated message is incompatible with "
-  "C++ standards before C++26">, DefaultIgnore, InGroup<CXXPre26Compat>;
 def err_function_definition_not_allowed : Error<
   "function definition is not allowed here">;
 def err_expected_end_of_enumerator : Error<
@@ -535,15 +529,6 @@ def ext_decomp_decl_empty : ExtWarn<
 def err_function_parameter_limit_exceeded : Error<
   "too many function parameters; subsequent parameters will be ignored">;
 
-// C++26 structured bindings
-def ext_decl_attrs_on_binding : ExtWarn<
-  "an attribute specifier sequence attached to a structured binding 
declaration "
-  "is a C++2c extension">, InGroup<CXX26>;
-def warn_cxx23_compat_decl_attrs_on_binding : Warning<
-  "an attribute specifier sequence attached to a structured binding 
declaration "
-  "is incompatible with C++ standards before C++2c">,
-  InGroup<CXXPre26Compat>, DefaultIgnore;
-
 /// Objective-C parser diagnostics
 def err_expected_minus_or_plus : Error<
   "method type specifier must start with '-' or '+'">;
@@ -645,12 +630,6 @@ def err_expected_init_in_condition_lparen : Error<
   "variable declaration in condition cannot have a parenthesized initializer">;
 def err_extraneous_rparen_in_condition : Error<
   "extraneous ')' after condition, expected a statement">;
-def ext_alias_in_init_statement : ExtWarn<
-  "alias declaration in this context is a C++23 extension">,
-  InGroup<CXX23>;
-def warn_cxx20_alias_in_init_statement  : Warning<
-  "alias declaration in this context is incompatible with C++ standards before 
C++23">,
-  DefaultIgnore, InGroup<CXXPre23Compat>;
 def warn_dangling_else : Warning<
   "add explicit braces to avoid dangling else">,
   InGroup<DanglingElse>;
@@ -682,12 +661,6 @@ def warn_cxx98_compat_noexcept_decl : Warning<
 def err_expected_catch : Error<"expected catch">;
 def err_using_namespace_in_class : Error<
   "'using namespace' is not allowed in classes">;
-def warn_cxx17_compat_using_enum_declaration : Warning<
-  "using enum declaration is incompatible with C++ standards before C++20">,
-  InGroup<CXXPre20Compat>, DefaultIgnore;
-def ext_using_enum_declaration : ExtWarn<
-  "using enum declaration is a C++20 extension">,
-  InGroup<CXX20>;
 def err_using_enum_expect_identifier : Error<
   "using enum %select{requires an enum or typedef name|"
   "does not permit an elaborated enum specifier}0">;
@@ -726,30 +699,7 @@ def err_function_is_not_record : Error<
   "unexpected %0 in function call; perhaps remove the %0?">;
 def err_super_in_using_declaration : Error<
   "'__super' cannot be used with a using declaration">;
-def ext_constexpr_if : ExtWarn<
-  "constexpr if is a C++17 extension">, InGroup<CXX17>;
-def warn_cxx14_compat_constexpr_if : Warning<
-  "constexpr if is incompatible with C++ standards before C++17">,
-  DefaultIgnore, InGroup<CXXPre17Compat>;
-def ext_consteval_if : ExtWarn<
-  "consteval if is a C++23 extension">,
-   InGroup<CXX23>;
-def warn_cxx20_compat_consteval_if : Warning<
-  "consteval if is incompatible with C++ standards before C++23">,
-  InGroup<CXXPre23Compat>, DefaultIgnore;
 
-def ext_init_statement : ExtWarn<
-  "'%select{if|switch}0' initialization statements are a C++17 extension">,
-  InGroup<CXX17>;
-def warn_cxx14_compat_init_statement : Warning<
-  "%select{if|switch}0 initialization statements are incompatible with "
-  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>;
-def ext_for_range_init_stmt : ExtWarn<
-  "range-based for loop initialization statements are a C++20 extension">,
-  InGroup<CXX20>;
-def warn_cxx17_compat_for_range_init_stmt : Warning<
-  "range-based for loop initialization statements are incompatible with "
-  "C++ standards before C++20">, DefaultIgnore, InGroup<CXXPre20Compat>;
 def warn_empty_init_statement : Warning<
   "empty initialization statement of '%select{if|switch|range-based for}0' ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/216693
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to