diff options
Diffstat (limited to 'clang/include/clang/Basic/DiagnosticSemaKinds.td')
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 1005 | 
1 files changed, 788 insertions, 217 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 7d8231d140e4..aa4de2812312 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -171,8 +171,9 @@ def err_field_designator_unknown : Error<  def err_field_designator_nonfield : Error<    "field designator %0 does not refer to a non-static data member">;  def note_field_designator_found : Note<"field designator refers here">; -def err_designator_for_scalar_init : Error< -  "designator in initializer for scalar type %0">; +def err_designator_for_scalar_or_sizeless_init : Error< +  "designator in initializer for %select{scalar|indivisible sizeless}0 " +  "type %1">;  def warn_initializer_overrides : Warning<    "initializer %select{partially |}0overrides prior initialization of "    "this subobject">, InGroup<InitializerOverrides>; @@ -193,10 +194,10 @@ def ext_flexible_array_init : Extension<  // C++20 designated initializers  def ext_cxx_designated_init : Extension< -  "designated initializers are a C++20 extension">, InGroup<CXX2aDesignator>; +  "designated initializers are a C++20 extension">, InGroup<CXX20Designator>;  def warn_cxx17_compat_designated_init : Warning<    "designated initializers are incompatible with C++ standards before C++20">, -  InGroup<CXXPre2aCompatPedantic>, DefaultIgnore; +  InGroup<CXXPre20CompatPedantic>, DefaultIgnore;  def ext_designated_init_mixed : ExtWarn<    "mixture of designated and non-designated initializers in the same "    "initializer list is a C99 extension">, InGroup<C99Designator>; @@ -258,6 +259,9 @@ def err_invalid_vector_float_decl_spec : Error<  def err_invalid_vector_double_decl_spec : Error <    "use of 'double' with '__vector' requires VSX support to be enabled "    "(available on POWER7 or later)">; +def err_invalid_vector_bool_int128_decl_spec : Error < +  "use of '__int128' with '__vector bool' requires VSX support enabled (on " +  "POWER10 or later)">;  def err_invalid_vector_long_long_decl_spec : Error <    "use of 'long long' with '__vector bool' requires VSX support (available on "    "POWER7 or later) or extended Altivec support (available on POWER8 or later) " @@ -275,7 +279,9 @@ def err_bad_parameter_name : Error<    "%0 cannot be the name of a parameter">;  def err_bad_parameter_name_template_id : Error<    "parameter name cannot have template arguments">; -def err_parameter_name_omitted : Error<"parameter name omitted">; +def ext_parameter_name_omitted_c2x : ExtWarn< +  "omitting the parameter name in a function definition is a C2x extension">, +  InGroup<C2x>;  def err_anyx86_interrupt_attribute : Error<    "%select{x86|x86-64}0 'interrupt' attribute only applies to functions that "    "have %select{a 'void' return type|" @@ -444,13 +450,13 @@ def err_decomp_decl_spec : Error<    "%plural{1:'%1'|:with '%1' specifiers}0">;  def ext_decomp_decl_spec : ExtWarn<    "decomposition declaration declared " -  "%plural{1:'%1'|:with '%1' specifiers}0 is a C++2a extension">, -  InGroup<CXX2a>; +  "%plural{1:'%1'|:with '%1' specifiers}0 is a C++20 extension">, +  InGroup<CXX20>;  def warn_cxx17_compat_decomp_decl_spec : Warning<    "decomposition declaration declared "    "%plural{1:'%1'|:with '%1' specifiers}0 " -  "is incompatible with C++ standards before C++2a">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  "is incompatible with C++ standards before C++20">, +  InGroup<CXXPre20Compat>, DefaultIgnore;  def err_decomp_decl_type : Error<    "decomposition declaration cannot be declared with type %0; "    "declared type must be 'auto' or reference to 'auto'">; @@ -639,6 +645,8 @@ def warn_redecl_library_builtin : Warning<  def err_builtin_definition : Error<"definition of builtin function %0">;  def err_builtin_redeclare : Error<"cannot redeclare builtin function %0">;  def err_arm_invalid_specialreg : Error<"invalid special register for builtin">; +def err_arm_invalid_coproc : Error<"coprocessor %0 must be configured as " +  "%select{GCP|CDE}1">;  def err_invalid_cpu_supports : Error<"invalid cpu feature string for builtin">;  def err_invalid_cpu_is : Error<"invalid cpu name for builtin">;  def err_invalid_cpu_specific_dispatch_value : Error< @@ -741,6 +749,12 @@ def warn_fortify_source_size_mismatch : Warning<    "'%0' size argument is too large; destination buffer has size %1,"    " but size argument is %2">, InGroup<FortifySource>; +def warn_fortify_source_format_overflow : Warning< +  "'%0' will always overflow; destination buffer has size %1," +  " but format string expands to at least %2">, +  InGroup<FortifySource>; + +  /// main()  // static main() is not an error in C, just in C++.  def warn_static_main : Warning<"'main' should not be declared static">, @@ -782,10 +796,27 @@ def ext_no_declarators : ExtWarn<"declaration does not declare anything">,  def ext_typedef_without_a_name : ExtWarn<"typedef requires a name">,    InGroup<MissingDeclarations>;  def err_typedef_not_identifier : Error<"typedef name must be an identifier">; -def err_typedef_changes_linkage : Error<"unsupported: typedef changes linkage" -  " of anonymous type, but linkage was already computed">; -def note_typedef_changes_linkage : Note<"use a tag name here to establish " -  "linkage prior to definition">; + +def ext_non_c_like_anon_struct_in_typedef : ExtWarn< +  "anonymous non-C-compatible type given name for linkage purposes " +  "by %select{typedef|alias}0 declaration; " +  "add a tag name here">, InGroup<DiagGroup<"non-c-typedef-for-linkage">>; +def err_non_c_like_anon_struct_in_typedef : Error< +  "anonymous non-C-compatible type given name for linkage purposes " +  "by %select{typedef|alias}0 declaration after its linkage was computed; " +  "add a tag name here to establish linkage prior to definition">; +def err_typedef_changes_linkage : Error< +  "unsupported: anonymous type given name for linkage purposes " +  "by %select{typedef|alias}0 declaration after its linkage was computed; " +  "add a tag name here to establish linkage prior to definition">; +def note_non_c_like_anon_struct : Note< +  "type is not C-compatible due to this " +  "%select{base class|default member initializer|lambda expression|" +  "friend declaration|member declaration}0">; +def note_typedef_for_linkage_here : Note< +  "type is given name %0 for linkage purposes by this " +  "%select{typedef|alias}1 declaration">; +  def err_statically_allocated_object : Error<    "interface type cannot be statically allocated">;  def err_object_cannot_be_passed_returned_by_value : Error< @@ -799,8 +830,8 @@ def err_opencl_half_load_store : Error<  def err_opencl_cast_to_half : Error<"casting to type %0 is not allowed">;  def err_opencl_half_declaration : Error<    "declaring variable of type %0 is not allowed">; -def err_opencl_half_param : Error< -  "declaring function parameter of type %0 is not allowed; did you forget * ?">; +def err_opencl_invalid_param : Error< +  "declaring function parameter of type %0 is not allowed%select{; did you forget * ?|}1">;  def err_opencl_invalid_return : Error<    "declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1">;  def warn_enum_value_overflow : Warning<"overflow in enumeration value">; @@ -831,6 +862,16 @@ def warn_pragma_pack_pop_identifier_and_alignment : Warning<    "specifying both a name and alignment to 'pop' is undefined">;  def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,    InGroup<IgnoredPragmas>; +def err_pragma_fc_pp_scope : Error< +  "'#pragma float_control push/pop' can only appear at file scope or namespace scope">; +def err_pragma_fc_noprecise_requires_nofenv : Error< +  "'#pragma float_control(precise, off)' is illegal when fenv_access is enabled">; +def err_pragma_fc_except_requires_precise : Error< +  "'#pragma float_control(except, on)' is illegal when precise is disabled">; +def err_pragma_fc_noprecise_requires_noexcept : Error< +  "'#pragma float_control(precise, off)' is illegal when except is enabled">; +def err_pragma_fenv_requires_precise : Error< +  "'#pragma STDC FENV_ACCESS ON' is illegal when precise is disabled">;  def warn_cxx_ms_struct :    Warning<"ms_struct may not produce Microsoft-compatible layouts for classes "            "with base classes or virtual functions">, @@ -996,8 +1037,8 @@ def err_objc_direct_on_protocol : Error<    "'objc_direct' attribute cannot be applied to %select{methods|properties}0 "    "declared in an Objective-C protocol">;  def err_objc_direct_duplicate_decl : Error< -  "%select{|direct }0method declaration conflicts " -  "with previous %select{|direct }1declaration of method %2">; +  "%select{|direct }0%select{method|property}1 declaration conflicts " +  "with previous %select{|direct }2declaration of %select{method|property}1 %3">;  def err_objc_direct_impl_decl_mismatch : Error<    "direct method was declared in %select{the primary interface|an extension|a category}0 "    "but is implemented in %select{the primary interface|a category|a different category}1">; @@ -1013,6 +1054,8 @@ def warn_objc_direct_ignored : Warning<  def warn_objc_direct_property_ignored : Warning<    "direct attribute on property %0 ignored (not implemented by this Objective-C runtime)">,    InGroup<IgnoredAttributes>; +def err_objc_direct_dynamic_property : Error< +  "direct property cannot be @dynamic">;  def warn_conflicting_overriding_ret_types : Warning<    "conflicting return type in " @@ -1335,8 +1378,14 @@ def warn_multiple_selectors: Warning<    "several methods with selector %0 of mismatched types are found "    "for the @selector expression">,    InGroup<SelectorTypeMismatch>, DefaultIgnore; -def err_direct_selector_expression: Error< +def err_direct_selector_expression : Error<    "@selector expression formed with direct selector %0">; +def warn_potentially_direct_selector_expression : Warning< +  "@selector expression formed with potentially direct selector %0">, +  InGroup<ObjCPotentiallyDirectSelector>; +def warn_strict_potentially_direct_selector_expression : Warning< +  warn_potentially_direct_selector_expression.Text>, +  InGroup<ObjCStrictPotentiallyDirectSelector>, DefaultIgnore;  def err_objc_kindof_nonobject : Error<    "'__kindof' specifier cannot be applied to non-object type %0">; @@ -1371,7 +1420,8 @@ def warn_cxx14_compat_inline_variable : Warning<    DefaultIgnore, InGroup<CXXPre17Compat>;  def warn_inline_namespace_reopened_noninline : Warning< -  "inline namespace reopened as a non-inline namespace">; +  "inline namespace reopened as a non-inline namespace">, +  InGroup<InlineNamespaceReopenedNoninline>;  def err_inline_namespace_mismatch : Error<    "non-inline namespace cannot be reopened as inline">; @@ -1449,8 +1499,8 @@ def err_throw_abstract_type : Error<  def err_array_of_abstract_type : Error<"array of abstract class type %0">;  def err_capture_of_abstract_type : Error<    "by-copy capture of value of abstract type %0">; -def err_capture_of_incomplete_type : Error< -  "by-copy capture of variable %0 with incomplete type %1">; +def err_capture_of_incomplete_or_sizeless_type : Error< +  "by-copy capture of variable %0 with %select{incomplete|sizeless}1 type %2">;  def err_capture_default_non_local : Error<    "non-local lambda expression cannot have a capture-default">; @@ -1482,9 +1532,12 @@ def err_deleted_decl_not_first : Error<  def err_deleted_override : Error<    "deleted function %0 cannot override a non-deleted function">; -  def err_non_deleted_override : Error<    "non-deleted function %0 cannot override a deleted function">; +def err_consteval_override : Error< +  "consteval function %0 cannot override a non-consteval function">; +def err_non_consteval_override : Error< +  "non-consteval function %0 cannot override a consteval function">;  def warn_weak_vtable : Warning<    "%0 has no out-of-line virtual method definitions; its vtable will be " @@ -1507,6 +1560,9 @@ def err_distant_exception_spec : Error<  def err_incomplete_in_exception_spec : Error<    "%select{|pointer to |reference to }0incomplete type %1 is not allowed "    "in exception specification">; +def err_sizeless_in_exception_spec : Error< +  "%select{|reference to }0sizeless type %1 is not allowed " +  "in exception specification">;  def ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Text>,    InGroup<MicrosoftExceptionSpec>;  def err_rref_in_exception_spec : Error< @@ -1544,6 +1600,9 @@ def err_exception_spec_cycle : Error<    "exception specification of %0 uses itself">;  def err_exception_spec_incomplete_type : Error<    "exception specification needed for member of incomplete class %0">; +def warn_wasm_dynamic_exception_spec_ignored : ExtWarn< +  "dynamic exception specifications with types are currently ignored in wasm">, +  InGroup<WebAssemblyExceptionSpec>;  // C++ access checking  def err_class_redeclared_with_different_access : Error< @@ -1755,6 +1814,11 @@ def note_due_to_dllexported_class : Note<  def err_illegal_union_or_anon_struct_member : Error<    "%select{anonymous struct|union}0 member %1 has a non-trivial "    "%sub{select_special_member_kind}2">; + +def warn_frame_address : Warning< +  "calling '%0' with a nonzero argument is unsafe">, +  InGroup<FrameAddress>, DefaultIgnore; +  def warn_cxx98_compat_nontrivial_union_or_anon_struct_member : Warning<    "%select{anonymous struct|union}0 member %1 with a non-trivial "    "%sub{select_special_member_kind}2 is incompatible with C++98">, @@ -1790,8 +1854,13 @@ def note_nontrivial_objc_ownership : Note<    "because type %0 has a member with %select{no|no|__strong|__weak|"    "__autoreleasing}1 ownership">; +/// Selector for a TagTypeKind value. +def select_tag_type_kind : TextSubstitution< +  "%select{struct|interface|union|class|enum}0">; +  def err_static_data_member_not_allowed_in_anon_struct : Error< -  "static data member %0 not allowed in anonymous struct">; +  "static data member %0 not allowed in anonymous " +  "%sub{select_tag_type_kind}1">;  def ext_static_data_member_in_union : ExtWarn<    "static data member %0 in union is a C++11 extension">, InGroup<CXX11>;  def warn_cxx98_compat_static_data_member_in_union : Warning< @@ -1881,19 +1950,36 @@ def err_destructor_return_type : Error<"destructor cannot have a return type">;  def err_destructor_redeclared : Error<"destructor cannot be redeclared">;  def err_destructor_with_params : Error<"destructor cannot have any parameters">;  def err_destructor_variadic : Error<"destructor cannot be variadic">; -def err_destructor_typedef_name : Error< -  "destructor cannot be declared using a %select{typedef|type alias}1 %0 of the class name">; +def ext_destructor_typedef_name : ExtWarn< +  "destructor cannot be declared using a %select{typedef|type alias}1 %0 " +  "of the class name">, DefaultError, InGroup<DiagGroup<"dtor-typedef">>; +def err_undeclared_destructor_name : Error< +  "undeclared identifier %0 in destructor name">;  def err_destructor_name : Error<    "expected the class name after '~' to name the enclosing class">; -def err_destructor_class_name : Error< -  "expected the class name after '~' to name a destructor">; -def err_ident_in_dtor_not_a_type : Error< +def err_destructor_name_nontype : Error< +  "identifier %0 after '~' in destructor name does not name a type">; +def err_destructor_expr_mismatch : Error< +  "identifier %0 in object destruction expression does not name the type " +  "%1 of the object being destroyed">; +def err_destructor_expr_nontype : Error<    "identifier %0 in object destruction expression does not name a type">;  def err_destructor_expr_type_mismatch : Error<    "destructor type %0 in object destruction expression does not match the "    "type %1 of the object being destroyed">;  def note_destructor_type_here : Note< -  "type %0 is declared here">; +  "type %0 found by destructor name lookup">; +def note_destructor_nontype_here : Note< +  "non-type declaration found by destructor name lookup">; +def ext_dtor_named_in_wrong_scope : Extension< +  "ISO C++ requires the name after '::~' to be found in the same scope as " +  "the name before '::~'">, InGroup<DtorName>; +def ext_qualified_dtor_named_in_lexical_scope : ExtWarn< +  "qualified destructor name only found in lexical scope; omit the qualifier " +  "to find this type name by unqualified lookup">, InGroup<DtorName>; +def ext_dtor_name_ambiguous : Extension< +  "ISO C++ considers this destructor name lookup to be ambiguous">, +  InGroup<DtorName>;  def err_destroy_attr_on_non_static_var : Error<    "%select{no_destroy|always_destroy}0 attribute can only be applied to a" @@ -1947,15 +2033,17 @@ def err_reference_bind_init_list : Error<  def err_init_list_bad_dest_type : Error<    "%select{|non-aggregate }0type %1 cannot be initialized with an initializer "    "list">; -def warn_cxx2a_compat_aggregate_init_with_ctors : Warning< +def warn_cxx20_compat_aggregate_init_with_ctors : Warning<    "aggregate initialization of type %0 with user-declared constructors " -  "is incompatible with C++2a">, DefaultIgnore, InGroup<CXX2aCompat>; +  "is incompatible with C++20">, DefaultIgnore, InGroup<CXX20Compat>;  def err_reference_bind_to_bitfield : Error<    "%select{non-const|volatile}0 reference cannot bind to "    "bit-field%select{| %1}2">;  def err_reference_bind_to_vector_element : Error<    "%select{non-const|volatile}0 reference cannot bind to vector element">; +def err_reference_bind_to_matrix_element : Error< +  "%select{non-const|volatile}0 reference cannot bind to matrix element">;  def err_reference_var_requires_init : Error<    "declaration of reference variable %0 requires an initializer">;  def err_reference_without_init : Error< @@ -2033,6 +2121,10 @@ def err_list_init_in_parens : Error<    "cannot initialize %select{non-class|reference}0 type %1 with a "    "parenthesized initializer list">; +def warn_uninit_const_reference : Warning< +  "variable %0 is uninitialized when passed as a const reference argument " +  "here">, InGroup<UninitializedConstReference>, DefaultIgnore; +  def warn_unsequenced_mod_mod : Warning<    "multiple unsequenced modifications to %0">, InGroup<Unsequenced>;  def warn_unsequenced_mod_use : Warning< @@ -2102,12 +2194,18 @@ def err_auto_not_allowed : Error<    "|in template argument|in typedef|in type alias|in function return type"    "|in conversion function type|here|in lambda parameter"    "|in type allocated by 'new'|in K&R-style function parameter" -  "|in template parameter|in friend declaration}1">; +  "|in template parameter|in friend declaration|in function prototype that is " +  "not a function declaration|in requires expression parameter}1">;  def err_dependent_deduced_tst : Error<    "typename specifier refers to "    "%select{class template|function template|variable template|alias template|"    "template template parameter|template}0 member in %1; "    "argument deduction not allowed here">; +def err_deduced_tst : Error< +  "typename specifier refers to " +  "%select{class template|function template|variable template|alias template|" +  "template template parameter|template}0; argument deduction not allowed " +  "here">;  def err_auto_not_allowed_var_inst : Error<    "'auto' variable template instantiation is not allowed">;  def err_auto_var_requires_init : Error< @@ -2269,12 +2367,22 @@ def override_keyword_hides_virtual_member_function : Error<    "%select{function|functions}1">;  def err_function_marked_override_not_overriding : Error<    "%0 marked 'override' but does not override any member functions">; -def warn_destructor_marked_not_override_overriding : Warning < -  "%0 overrides a destructor but is not marked 'override'">, -  InGroup<CXX11WarnOverrideDestructor>, DefaultIgnore; -def warn_function_marked_not_override_overriding : Warning < -  "%0 overrides a member function but is not marked 'override'">, -  InGroup<CXX11WarnOverrideMethod>; +def warn_destructor_marked_not_override_overriding : TextSubstitution < +  "%0 overrides a destructor but is not marked 'override'">; +def warn_function_marked_not_override_overriding : TextSubstitution < +  "%0 overrides a member function but is not marked 'override'">; +def warn_inconsistent_destructor_marked_not_override_overriding : Warning < +  "%sub{warn_destructor_marked_not_override_overriding}0">, +  InGroup<CXX11WarnInconsistentOverrideDestructor>, DefaultIgnore; +def warn_inconsistent_function_marked_not_override_overriding : Warning < +  "%sub{warn_function_marked_not_override_overriding}0">, +  InGroup<CXX11WarnInconsistentOverrideMethod>; +def warn_suggest_destructor_marked_not_override_overriding : Warning < +  "%sub{warn_destructor_marked_not_override_overriding}0">, +  InGroup<CXX11WarnSuggestOverrideDestructor>, DefaultIgnore; +def warn_suggest_function_marked_not_override_overriding : Warning < +  "%sub{warn_function_marked_not_override_overriding}0">, +  InGroup<CXX11WarnSuggestOverride>, DefaultIgnore;  def err_class_marked_final_used_as_base : Error<    "base %0 is marked '%select{final|sealed}1'">;  def warn_abstract_final_class : Warning< @@ -2308,9 +2416,6 @@ def err_enum_redeclare_fixed_mismatch : Error<    "enumeration previously declared with %select{non|}0fixed underlying type">;  def err_enum_redeclare_scoped_mismatch : Error<    "enumeration previously declared as %select{un|}0scoped">; -def err_enum_class_reference : Error< -  "reference to %select{|scoped }0enumeration must use 'enum' " -  "not 'enum class'">;  def err_only_enums_have_underlying_types : Error<    "only enumeration types have underlying types">;  def err_underlying_type_of_incomplete_enum : Error< @@ -2368,21 +2473,20 @@ def note_for_range_invalid_iterator : Note <    "in implicit call to 'operator%select{!=|*|++}0' for iterator of type %1">;  def note_for_range_begin_end : Note<    "selected '%select{begin|end}0' %select{function|template }1%2 with iterator type %3">; -def warn_for_range_const_reference_copy : Warning< +def warn_for_range_const_ref_binds_temp_built_from_ref : Warning<    "loop variable %0 " -  "%diff{has type $ but is initialized with type $" -  "| is initialized with a value of a different type}1,2 resulting in a copy">, -  InGroup<RangeLoopAnalysis>, DefaultIgnore; +  "%diff{of type $ binds to a temporary constructed from type $" +  "|binds to a temporary constructed from a different type}1,2">, +  InGroup<RangeLoopConstruct>, DefaultIgnore;  def note_use_type_or_non_reference : Note< -  "use non-reference type %0 to keep the copy or type %1 to prevent copying">; -def warn_for_range_variable_always_copy : Warning< -  "loop variable %0 is always a copy because the range of type %1 does not " -  "return a reference">, -  InGroup<RangeLoopAnalysis>, DefaultIgnore; +  "use non-reference type %0 to make construction explicit or type %1 to prevent copying">; +def warn_for_range_ref_binds_ret_temp : Warning< +  "loop variable %0 binds to a temporary value produced by a range of type %1">, +  InGroup<RangeLoopBindReference>, DefaultIgnore;  def note_use_non_reference_type : Note<"use non-reference type %0">;  def warn_for_range_copy : Warning< -  "loop variable %0 of type %1 creates a copy from type %2">, -  InGroup<RangeLoopAnalysis>, DefaultIgnore; +  "loop variable %0 creates a copy from type %1">, +  InGroup<RangeLoopConstruct>, DefaultIgnore;  def note_use_reference_type : Note<"use reference type %0 to prevent copying">;  def err_objc_for_range_init_stmt : Error<    "initialization statement is not supported when iterating over Objective-C " @@ -2397,6 +2501,13 @@ def warn_cxx14_compat_constexpr_not_const : Warning<    "'constexpr' non-static member function will not be implicitly 'const' "    "in C++14; add 'const' to avoid a change in behavior">,    InGroup<DiagGroup<"constexpr-not-const">>; +def err_invalid_consteval_take_address : Error< +  "cannot take address of consteval function %0 outside" +  " of an immediate invocation">; +def err_invalid_consteval_call : Error< +  "call to consteval function %q0 is not a constant expression">; +def err_invalid_consteval_decl_kind : Error< +  "%0 cannot be declared consteval">;  def err_invalid_constexpr : Error<    "%select{function parameter|typedef}0 "    "cannot be %sub{select_constexpr_spec_kind}1">; @@ -2432,7 +2543,7 @@ def err_constexpr_redecl_mismatch : Error<  def err_constexpr_virtual : Error<"virtual function cannot be constexpr">;  def warn_cxx17_compat_constexpr_virtual : Warning<    "virtual constexpr functions are incompatible with " -  "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; +  "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;  def err_constexpr_virtual_base : Error<    "constexpr %select{member function|constructor}0 not allowed in "    "%select{struct|interface|class}1 with virtual base " @@ -2456,13 +2567,13 @@ def warn_cxx11_compat_constexpr_body_invalid_stmt : Warning<    "use of this statement in a constexpr %select{function|constructor}0 "    "is incompatible with C++ standards before C++14">,    InGroup<CXXPre14Compat>, DefaultIgnore; -def ext_constexpr_body_invalid_stmt_cxx2a : ExtWarn< +def ext_constexpr_body_invalid_stmt_cxx20 : ExtWarn<    "use of this statement in a constexpr %select{function|constructor}0 " -  "is a C++2a extension">, InGroup<CXX2a>; +  "is a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_constexpr_body_invalid_stmt : Warning<    "use of this statement in a constexpr %select{function|constructor}0 " -  "is incompatible with C++ standards before C++2a">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  "is incompatible with C++ standards before C++20">, +  InGroup<CXXPre20Compat>, DefaultIgnore;  def ext_constexpr_type_definition : ExtWarn<    "type definition in a constexpr %select{function|constructor}0 "    "is a C++14 extension">, InGroup<CXX14>; @@ -2488,13 +2599,13 @@ def err_constexpr_local_var_non_literal_type : Error<    "%select{function|constructor}0">;  def ext_constexpr_local_var_no_init : ExtWarn<    "uninitialized variable in a constexpr %select{function|constructor}0 " -  "is a C++20 extension">, InGroup<CXX2a>; +  "is a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_constexpr_local_var_no_init : Warning<    "uninitialized variable in a constexpr %select{function|constructor}0 "    "is incompatible with C++ standards before C++20">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  InGroup<CXXPre20Compat>, DefaultIgnore;  def ext_constexpr_function_never_constant_expr : ExtWarn< -  "constexpr %select{function|constructor}0 never produces a " +  "%select{constexpr|consteval}1 %select{function|constructor}0 never produces a "    "constant expression">, InGroup<DiagGroup<"invalid-constexpr">>, DefaultError;  def err_attr_cond_never_constant_expr : Error<    "%0 attribute expression never produces a constant expression">; @@ -2518,29 +2629,29 @@ def warn_cxx11_compat_constexpr_body_multiple_return : Warning<  def note_constexpr_body_previous_return : Note<    "previous return statement is here">; -// C++2a function try blocks in constexpr -def ext_constexpr_function_try_block_cxx2a : ExtWarn< +// C++20 function try blocks in constexpr +def ext_constexpr_function_try_block_cxx20 : ExtWarn<    "function try block in constexpr %select{function|constructor}0 is " -  "a C++2a extension">, InGroup<CXX2a>; +  "a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_constexpr_function_try_block : Warning<    "function try block in constexpr %select{function|constructor}0 is " -  "incompatible with C++ standards before C++2a">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  "incompatible with C++ standards before C++20">, +  InGroup<CXXPre20Compat>, DefaultIgnore;  def ext_constexpr_union_ctor_no_init : ExtWarn<    "constexpr union constructor that does not initialize any member " -  "is a C++20 extension">, InGroup<CXX2a>; +  "is a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_constexpr_union_ctor_no_init : Warning<    "constexpr union constructor that does not initialize any member "    "is incompatible with C++ standards before C++20">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  InGroup<CXXPre20Compat>, DefaultIgnore;  def ext_constexpr_ctor_missing_init : ExtWarn<    "constexpr constructor that does not initialize all members " -  "is a C++20 extension">, InGroup<CXX2a>; +  "is a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_constexpr_ctor_missing_init : Warning<    "constexpr constructor that does not initialize all members "    "is incompatible with C++ standards before C++20">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  InGroup<CXXPre20Compat>, DefaultIgnore;  def note_constexpr_ctor_missing_init : Note<    "member not initialized by constructor">;  def note_non_literal_no_constexpr_ctors : Note< @@ -2575,8 +2686,6 @@ def err_concept_extra_headers : Error<    "extraneous template parameter list in concept definition">;  def err_concept_no_associated_constraints : Error<    "concept cannot have associated constraints">; -def err_concept_not_implemented : Error< -  "sorry, unimplemented concepts feature %0 used">;  def err_non_constant_constraint_expression : Error<    "substitution into constraint expression resulted in a non-constant "    "expression">; @@ -2585,30 +2694,57 @@ def err_non_bool_atomic_constraint : Error<  def err_template_arg_list_constraints_not_satisfied : Error<    "constraints not satisfied for %select{class template|function template|variable template|alias template|"    "template template parameter|template}0 %1%2">; -def note_constraints_not_satisfied : Note< -  "constraints not satisfied">;  def note_substituted_constraint_expr_is_ill_formed : Note<    "because substituted constraint expression is ill-formed%0">;  def note_atomic_constraint_evaluated_to_false : Note< -  "%select{and |because }0'%1' evaluated to false">; +  "%select{and|because}0 '%1' evaluated to false">;  def note_concept_specialization_constraint_evaluated_to_false : Note< -  "%select{and |because }0'%1' evaluated to false">; +  "%select{and|because}0 '%1' evaluated to false">;  def note_single_arg_concept_specialization_constraint_evaluated_to_false : Note< -  "%select{and |because }0%1 does not satisfy %2">; +  "%select{and|because}0 %1 does not satisfy %2">;  def note_atomic_constraint_evaluated_to_false_elaborated : Note< -  "%select{and |because }0'%1' (%2 %3 %4) evaluated to false">; +  "%select{and|because}0 '%1' (%2 %3 %4) evaluated to false">;  def err_constrained_virtual_method : Error<    "virtual function cannot have a requires clause">;  def err_trailing_requires_clause_on_deduction_guide : Error<    "deduction guide cannot have a requires clause">;  def err_reference_to_function_with_unsatisfied_constraints : Error<    "invalid reference to function %0: constraints not satisfied">; +def err_requires_expr_local_parameter_default_argument : Error< +  "default arguments not allowed for parameters of a requires expression">; +def err_requires_expr_parameter_referenced_in_evaluated_context : Error< +  "constraint variable %0 cannot be used in an evaluated context">; +def note_expr_requirement_expr_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid: %2">; +def note_expr_requirement_expr_unknown_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid">; +def note_expr_requirement_noexcept_not_met : Note< +  "%select{and|because}0 '%1' may throw an exception">; +def note_expr_requirement_type_requirement_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid: %2">; +def note_expr_requirement_type_requirement_unknown_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid">; +def note_expr_requirement_constraints_not_satisfied : Note< +  "%select{and|because}0 type constraint '%1' was not satisfied:">; +def note_expr_requirement_constraints_not_satisfied_simple : Note< +  "%select{and|because}0 %1 does not satisfy %2:">; +def note_type_requirement_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid: %2">; +def note_type_requirement_unknown_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid">; +def note_nested_requirement_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid: %2">; +def note_nested_requirement_unknown_substitution_error : Note< +  "%select{and|because}0 '%1' would be invalid">;  def note_ambiguous_atomic_constraints : Note<    "similar constraint expressions not considered equivalent; constraint "    "expressions cannot be considered equivalent unless they originate from the "    "same concept">;  def note_ambiguous_atomic_constraints_similar_expression : Note<    "similar constraint expression here">; +def err_unsupported_placeholder_constraint : Error< +  "constrained placeholder types other than simple 'auto' on non-type template " +  "parameters not supported yet">;  def err_template_different_requires_clause : Error<    "requires clause differs in template redeclaration">; @@ -2623,6 +2759,8 @@ def err_type_constraint_non_type_concept : Error<  def err_type_constraint_missing_arguments : Error<    "%0 requires more than 1 template argument; provide the remaining arguments "    "explicitly to use it here">; +def err_placeholder_constraints_not_satisfied : Error< +  "deduced type %0 does not satisfy %1">;  // C++11 char16_t/char32_t  def warn_cxx98_compat_unicode_type : Warning< @@ -2630,7 +2768,7 @@ def warn_cxx98_compat_unicode_type : Warning<    InGroup<CXX98Compat>, DefaultIgnore;  def warn_cxx17_compat_unicode_type : Warning<    "'char8_t' type specifier is incompatible with C++ standards before C++20">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  InGroup<CXXPre20Compat>, DefaultIgnore;  // __make_integer_seq  def err_integer_sequence_negative_length : Error< @@ -2650,6 +2788,10 @@ def warn_auto_var_is_id : Warning<    InGroup<DiagGroup<"auto-var-id">>;  // Attributes +def warn_nomerge_attribute_ignored_in_stmt: Warning< +  "%0 attribute is ignored because there exists no call expression inside the " +  "statement">, +  InGroup<IgnoredAttributes>;  def err_nsobject_attribute : Error<    "'NSObject' attribute is for pointer types only">;  def err_attributes_are_not_compatible : Error< @@ -2665,6 +2807,7 @@ def err_attribute_too_many_arguments : Error<  def err_attribute_too_few_arguments : Error<    "%0 attribute takes at least %1 argument%s1">;  def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">; +def err_attribute_invalid_matrix_type : Error<"invalid matrix element type %0">;  def err_attribute_bad_neon_vector_size : Error<    "Neon vector size must be 64 or 128 bits">;  def err_attribute_requires_positive_integer : Error< @@ -2696,6 +2839,8 @@ def err_alignas_mismatch : Error<    "redeclaration has different alignment requirement (%1 vs %0)">;  def err_alignas_underaligned : Error<    "requested alignment is less than minimum alignment of %1 for type %0">; +def err_attribute_sizeless_type : Error< +  "%0 attribute cannot be applied to sizeless type %1">;  def err_attribute_argument_n_type : Error<    "%0 attribute requires parameter %1 to be %select{int or bool|an integer "    "constant|a string|an identifier}2">; @@ -2766,8 +2911,8 @@ def err_init_method_bad_return_type : Error<    "init methods must return an object pointer type, not %0">;  def err_attribute_invalid_size : Error<    "vector size not an integral multiple of component size">; -def err_attribute_zero_size : Error<"zero vector size">; -def err_attribute_size_too_large : Error<"vector size too large">; +def err_attribute_zero_size : Error<"zero %0 size">; +def err_attribute_size_too_large : Error<"%0 size too large">;  def err_typecheck_vector_not_convertable_implict_truncation : Error<     "cannot convert between %select{scalar|vector}0 type %1 and vector type"     " %2 as implicit conversion would cause truncation">; @@ -2793,6 +2938,10 @@ def err_attribute_address_multiple_qualifiers : Error<  def warn_attribute_address_multiple_identical_qualifiers : Warning<    "multiple identical address spaces specified for type">,    InGroup<DuplicateDeclSpecifier>; +def err_attribute_not_clinkage : Error< +  "function type with %0 attribute must have C linkage">; +def err_function_decl_cmse_ns_call : Error< +  "functions may not be declared with 'cmse_nonsecure_call' attribute">;  def err_attribute_address_function_type : Error<    "function type may not be qualified with an address space">;  def err_as_qualified_auto_decl : Error< @@ -2838,7 +2987,7 @@ def warn_objc_literal_comparison : Warning<    "a numeric literal|a boxed expression|}0 has undefined behavior">,    InGroup<ObjCLiteralComparison>;  def err_missing_atsign_prefix : Error< -  "string literal must be prefixed by '@' ">; +  "%select{string|numeric}0 literal must be prefixed by '@'">;  def warn_objc_string_literal_comparison : Warning<    "direct comparison of a string literal has undefined behavior">,    InGroup<ObjCStringComparison>; @@ -2852,6 +3001,11 @@ def warn_objc_collection_literal_element : Warning<    "object of type %0 is not compatible with "    "%select{array element type|dictionary key type|dictionary value type}1 %2">,    InGroup<ObjCLiteralConversion>; +def warn_nsdictionary_duplicate_key : Warning< +  "duplicate key in dictionary literal">, +  InGroup<DiagGroup<"objc-dictionary-duplicate-keys">>; +def note_nsdictionary_duplicate_key_here : Note< +  "previous equal key is here">;  def err_swift_param_attr_not_swiftcall : Error<    "'%0' parameter can only be used with swiftcall calling convention">;  def err_swift_indirect_result_not_first : Error< @@ -2931,6 +3085,9 @@ def err_alignment_too_big : Error<    "requested alignment must be %0 or smaller">;  def err_alignment_not_power_of_two : Error<    "requested alignment is not a power of 2">; +def warn_alignment_not_power_of_two : Warning< +  err_alignment_not_power_of_two.Text>, +  InGroup<DiagGroup<"non-power-of-two-alignment">>;  def err_alignment_dependent_typedef_name : Error<    "requested alignment is dependent but declaration is not dependent">; @@ -3010,6 +3167,13 @@ def warn_attribute_weak_on_local : Warning<    InGroup<IgnoredAttributes>;  def warn_weak_identifier_undeclared : Warning<    "weak identifier %0 never declared">; +def warn_attribute_cmse_entry_static : Warning< +  "'cmse_nonsecure_entry' cannot be applied to functions with internal linkage">, +  InGroup<IgnoredAttributes>; +def warn_cmse_nonsecure_union : Warning< +  "passing union across security boundary via %select{parameter %1|return value}0 " +  "may leak information">, +  InGroup<DiagGroup<"cmse-union-leak">>;  def err_attribute_weak_static : Error<    "weak declaration cannot have internal linkage">;  def err_attribute_selectany_non_extern_data : Error< @@ -3157,6 +3321,12 @@ def err_attribute_output_parameter : Error<  def ext_cannot_use_trivial_abi : ExtWarn<    "'trivial_abi' cannot be applied to %0">, InGroup<IgnoredAttributes>; +def note_cannot_use_trivial_abi_reason : Note< +  "'trivial_abi' is disallowed on %0 because %select{" +  "its copy constructors and move constructors are all deleted|" +  "it is polymorphic|" +  "it has a base of a non-trivial class type|it has a virtual base|" +  "it has a __weak field|it has a field of a non-trivial class type}1">;  // Availability attribute  def warn_availability_unknown_platform : Warning< @@ -3206,9 +3376,6 @@ def warn_at_available_unchecked_use : Warning<    InGroup<DiagGroup<"unsupported-availability-guard">>;  // Thread Safety Attributes -def warn_invalid_capability_name : Warning< -  "invalid capability name '%0'; capability name must be 'mutex' or 'role'">, -  InGroup<ThreadSafetyAttributes>, DefaultIgnore;  def warn_thread_attribute_ignored : Warning<    "ignoring %0 attribute because its argument is invalid">,    InGroup<ThreadSafetyAttributes>, DefaultIgnore; @@ -3226,7 +3393,7 @@ def warn_thread_attribute_argument_not_lockable : Warning<    InGroup<ThreadSafetyAttributes>, DefaultIgnore;  def warn_thread_attribute_decl_not_lockable : Warning<    "%0 attribute can only be applied in a context annotated " -  "with 'capability(\"mutex\")' attribute">, +  "with 'capability' attribute">,    InGroup<ThreadSafetyAttributes>, DefaultIgnore;  def warn_thread_attribute_decl_not_pointer : Warning<    "%0 only applies to pointer types; type here is %1">, @@ -3260,6 +3427,7 @@ def warn_expecting_lock_held_on_loop : Warning<    "expecting %0 '%1' to be held at start of each loop">,    InGroup<ThreadSafetyAnalysis>, DefaultIgnore;  def note_locked_here : Note<"%0 acquired here">; +def note_unlocked_here : Note<"%0 released here">;  def warn_lock_exclusive_and_shared : Warning<    "%0 '%1' is acquired exclusively and shared in the same scope">,    InGroup<ThreadSafetyAnalysis>, DefaultIgnore; @@ -3345,7 +3513,7 @@ def warn_use_of_temp_in_invalid_state : Warning<    "invalid invocation of method '%0' on a temporary object while it is in the "    "'%1' state">, InGroup<Consumed>, DefaultIgnore;  def warn_attr_on_unconsumable_class : Warning< -  "consumed analysis attribute is attached to member of class '%0' which isn't " +  "consumed analysis attribute is attached to member of class %0 which isn't "    "marked as consumable">, InGroup<Consumed>, DefaultIgnore;  def warn_return_typestate_for_unconsumable_type : Warning<    "return state set for an unconsumable type '%0'">, InGroup<Consumed>, @@ -3439,7 +3607,7 @@ def warn_impcast_integer_float_precision : Warning<    InGroup<ImplicitIntFloatConversion>, DefaultIgnore;  def warn_impcast_integer_float_precision_constant : Warning<    "implicit conversion from %2 to %3 changes value from %0 to %1">, -  InGroup<ImplicitIntFloatConversion>; +  InGroup<ImplicitConstIntFloatConversion>;  def warn_impcast_float_to_integer : Warning<    "implicit conversion from %0 to %1 changes value from %2 to %3">, @@ -3561,6 +3729,18 @@ def warn_int_to_pointer_cast : Warning<  def warn_int_to_void_pointer_cast : Warning<    "cast to %1 from smaller integer type %0">,    InGroup<IntToVoidPointerCast>; +def warn_pointer_to_int_cast : Warning< +  "cast to smaller integer type %1 from %0">, +  InGroup<PointerToIntCast>; +def warn_pointer_to_enum_cast : Warning< +  warn_pointer_to_int_cast.Text>, +  InGroup<PointerToEnumCast>; +def warn_void_pointer_to_int_cast : Warning< +  "cast to smaller integer type %1 from %0">, +  InGroup<VoidPointerToIntCast>; +def warn_void_pointer_to_enum_cast : Warning< +  warn_void_pointer_to_int_cast.Text>, +  InGroup<VoidPointerToEnumCast>;  def warn_attribute_ignored_for_field_of_type : Warning<    "%0 attribute ignored for field of type %1">, @@ -3832,6 +4012,8 @@ def err_use_of_default_argument_to_function_declared_later : Error<  def note_default_argument_declared_here : Note<    "default argument declared here">;  def err_recursive_default_argument : Error<"recursive evaluation of default argument">; +def note_recursive_default_argument_used_here : Note< +  "default argument used here">;  def ext_param_promoted_not_compatible_with_prototype : ExtWarn<    "%diff{promoted type $ of K&R function parameter is not compatible with the " @@ -4079,13 +4261,13 @@ def err_ovl_no_conversion_in_cast : Error<    "cannot convert %1 to %2 without a conversion operator">;  def err_ovl_no_viable_conversion_in_cast : Error<    "no matching conversion for %select{|static_cast|reinterpret_cast|" -  "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">; +  "dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2">;  def err_ovl_ambiguous_conversion_in_cast : Error<    "ambiguous conversion for %select{|static_cast|reinterpret_cast|" -  "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">; +  "dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2">;  def err_ovl_deleted_conversion_in_cast : Error<    "%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2 uses deleted function">; +  "functional-style cast|}0 from %1 to %2 uses deleted function">;  def err_ovl_ambiguous_init : Error<"call to constructor of %0 is ambiguous">;  def err_ref_init_ambiguous : Error<    "reference initialization of type %0 with initializer of type %1 is ambiguous">; @@ -4101,11 +4283,16 @@ def err_ovl_ambiguous_oper_binary : Error<    "use of overloaded operator '%0' is ambiguous (with operand types %1 and %2)">;  def ext_ovl_ambiguous_oper_binary_reversed : ExtWarn<    "ISO C++20 considers use of overloaded operator '%0' (with operand types %1 " -  "and %2) to be ambiguous despite there being a unique best viable function">, +  "and %2) to be ambiguous despite there being a unique best viable function" +  "%select{ with non-reversed arguments|}3">,    InGroup<DiagGroup<"ambiguous-reversed-operator">>, SFINAEFailure; -def note_ovl_ambiguous_oper_binary_reversed_candidate : Note< +def note_ovl_ambiguous_oper_binary_reversed_self : Note<    "ambiguity is between a regular call to this operator and a call with the "    "argument order reversed">; +def note_ovl_ambiguous_oper_binary_selected_candidate : Note< +  "candidate function with non-reversed arguments">; +def note_ovl_ambiguous_oper_binary_reversed_candidate : Note< +  "ambiguous candidate function with reversed arguments">;  def err_ovl_no_viable_oper : Error<"no viable overloaded '%0'">;  def note_assign_lhs_incomplete : Note<"type %0 is incomplete">;  def err_ovl_deleted_oper : Error< @@ -4119,6 +4306,10 @@ def err_ovl_deleted_comparison : Error<  def err_ovl_rewrite_equalequal_not_bool : Error<    "return type %0 of selected 'operator==' function for rewritten "    "'%1' comparison is not 'bool'">; +def ext_ovl_rewrite_equalequal_not_bool : ExtWarn< +  "ISO C++20 requires return type of selected 'operator==' function for " +  "rewritten '%1' comparison to be 'bool', not %0">, +  InGroup<DiagGroup<"rewrite-not-bool">>, SFINAEFailure;  def err_ovl_no_viable_subscript :      Error<"no viable overloaded operator[] for type %0">;  def err_ovl_no_oper : @@ -4162,7 +4353,7 @@ def err_ovl_no_viable_literal_operator : Error<  def err_template_param_shadow : Error<    "declaration of %0 shadows template parameter">;  def ext_template_param_shadow : ExtWarn< -  err_template_param_shadow.Text>, InGroup<MicrosoftTemplate>; +  err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow>;  def note_template_param_here : Note<"template parameter is declared here">;  def warn_template_export_unsupported : Warning<    "exported templates are unsupported">; @@ -4241,11 +4432,11 @@ def err_template_tag_noparams : Error<  def warn_cxx17_compat_adl_only_template_id : Warning<    "use of function template name with no prior function template "    "declaration in function call with explicit template arguments " -  "is incompatible with C++ standards before C++2a">, -  InGroup<CXXPre2aCompat>, DefaultIgnore; +  "is incompatible with C++ standards before C++20">, +  InGroup<CXXPre20Compat>, DefaultIgnore;  def ext_adl_only_template_id : ExtWarn<    "use of function template name with no prior declaration in function call " -  "with explicit template arguments is a C++2a extension">, InGroup<CXX2a>; +  "with explicit template arguments is a C++20 extension">, InGroup<CXX20>;  // C++ Template Argument Lists  def err_template_missing_args : Error< @@ -4387,12 +4578,12 @@ def err_pointer_to_member_oper_value_classify: Error<    "pointer-to-member function type %0 can only be called on an "    "%select{rvalue|lvalue}1">;  def ext_pointer_to_const_ref_member_on_rvalue : Extension< -  "invoking a pointer to a 'const &' member function on an rvalue is a C++2a extension">, -  InGroup<CXX2a>, SFINAEFailure; +  "invoking a pointer to a 'const &' member function on an rvalue is a C++20 extension">, +  InGroup<CXX20>, SFINAEFailure;  def warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue : Warning<    "invoking a pointer to a 'const &' member function on an rvalue is " -  "incompatible with C++ standards before C++2a">, -  InGroup<CXXPre2aCompatPedantic>, DefaultIgnore; +  "incompatible with C++ standards before C++20">, +  InGroup<CXXPre20CompatPedantic>, DefaultIgnore;  def ext_ms_deref_template_argument: ExtWarn<    "non-type template argument containing a dereference operation is a "    "Microsoft extension">, InGroup<MicrosoftTemplate>; @@ -4588,6 +4779,8 @@ def note_template_type_alias_instantiation_here : Note<    "in instantiation of template type alias %0 requested here">;  def note_template_exception_spec_instantiation_here : Note<    "in instantiation of exception specification for %0 requested here">; +def note_template_requirement_instantiation_here : Note< +  "in instantiation of requirement here">;  def warn_var_template_missing : Warning<"instantiation of variable %q0 "    "required here, but no definition is available">,    InGroup<UndefinedVarTemplate>; @@ -4623,6 +4816,8 @@ def note_template_default_arg_checking : Note<    "while checking a default template argument used here">;  def note_concept_specialization_here : Note<    "while checking the satisfaction of concept '%0' requested here">; +def note_nested_requirement_here : Note< +  "while checking the satisfaction of nested requirement requested here">;  def note_checking_constraints_for_template_id_here : Note<    "while checking constraint satisfaction for template '%0' required here">;  def note_checking_constraints_for_var_spec_id_here : Note< @@ -4631,6 +4826,8 @@ def note_checking_constraints_for_var_spec_id_here : Note<  def note_checking_constraints_for_class_spec_id_here : Note<    "while checking constraint satisfaction for class template partial "    "specialization '%0' required here">; +def note_checking_constraints_for_function_here : Note< +  "while checking constraint satisfaction for function '%0' required here">;  def note_constraint_substitution_here : Note<    "while substituting template arguments into constraint expression here">;  def note_constraint_normalization_here : Note< @@ -4756,8 +4953,12 @@ def err_typename_nested_not_found_requirement : Error<    "declaration">;  def err_typename_nested_not_type : Error<      "typename specifier refers to non-type member %0 in %1">; -def note_typename_refers_here : Note< +def err_typename_not_type : Error< +    "typename specifier refers to non-type %0">; +def note_typename_member_refers_here : Note<      "referenced member %0 is declared here">; +def note_typename_refers_here : Note< +    "referenced %0 is declared here">;  def err_typename_missing : Error<    "missing 'typename' prior to dependent type name '%0%1'">;  def err_typename_missing_template : Error< @@ -4777,9 +4978,13 @@ def note_using_value_decl_missing_typename : Note<    "add 'typename' to treat this using declaration as a type">;  def err_template_kw_refers_to_non_template : Error< -  "%0 following the 'template' keyword does not refer to a template">; +  "%0%select{| following the 'template' keyword}1 " +  "does not refer to a template">;  def note_template_kw_refers_to_non_template : Note<    "declared as a non-template here">; +def err_template_kw_refers_to_dependent_non_template : Error< +  "%0%select{| following the 'template' keyword}1 " +  "cannot refer to a dependent template">;  def err_template_kw_refers_to_class_template : Error<    "'%0%1' instantiated to a class template, not a function template">;  def note_referenced_class_template : Note< @@ -5200,9 +5405,6 @@ def ext_typecheck_zero_array_size : Extension<    "zero size arrays are an extension">, InGroup<ZeroLengthArray>;  def err_typecheck_zero_array_size : Error<    "zero-length arrays are not permitted in C++">; -def warn_typecheck_zero_static_array_size : Warning< -  "'static' has no effect on zero-length arrays">, -  InGroup<ArrayBounds>;  def err_array_size_non_int : Error<"size of array has non-integer type %0">;  def err_init_element_not_constant : Error<    "initializer element is not a compile-time constant">; @@ -5210,6 +5412,17 @@ def ext_aggregate_init_not_constant : Extension<    "initializer for aggregate is not a compile-time constant">, InGroup<C99>;  def err_local_cant_init : Error<    "'__local' variable cannot have an initializer">; +def err_loader_uninitialized_cant_init +    : Error<"variable with 'loader_uninitialized' attribute cannot have an " +            "initializer">; +def err_loader_uninitialized_trivial_ctor +    : Error<"variable with 'loader_uninitialized' attribute must have a " +            "trivial default constructor">; +def err_loader_uninitialized_redeclaration +    : Error<"redeclaration cannot add 'loader_uninitialized' attribute">; +def err_loader_uninitialized_extern_decl +    : Error<"variable %0 cannot be declared both 'extern' and with the " +            "'loader_uninitialized' attribute">;  def err_block_extern_cant_init : Error<    "'extern' variable cannot have an initializer">;  def warn_extern_init : Warning<"'extern' variable has an initializer">, @@ -5219,30 +5432,44 @@ def err_variable_object_no_init : Error<  def err_excess_initializers : Error<    "excess elements in %select{array|vector|scalar|union|struct}0 initializer">;  def ext_excess_initializers : ExtWarn< -  "excess elements in %select{array|vector|scalar|union|struct}0 initializer">; +  "excess elements in %select{array|vector|scalar|union|struct}0 initializer">, +  InGroup<ExcessInitializers>; +def err_excess_initializers_for_sizeless_type : Error< +  "excess elements in initializer for indivisible sizeless type %0">; +def ext_excess_initializers_for_sizeless_type : ExtWarn< +  "excess elements in initializer for indivisible sizeless type %0">, +  InGroup<ExcessInitializers>;  def err_excess_initializers_in_char_array_initializer : Error<    "excess elements in char array initializer">;  def ext_excess_initializers_in_char_array_initializer : ExtWarn< -  "excess elements in char array initializer">; +  "excess elements in char array initializer">, +  InGroup<ExcessInitializers>;  def err_initializer_string_for_char_array_too_long : Error<    "initializer-string for char array is too long">;  def ext_initializer_string_for_char_array_too_long : ExtWarn< -  "initializer-string for char array is too long">; +  "initializer-string for char array is too long">, +  InGroup<ExcessInitializers>;  def warn_missing_field_initializers : Warning<    "missing field %0 initializer">,    InGroup<MissingFieldInitializers>, DefaultIgnore; -def warn_braces_around_scalar_init : Warning< -  "braces around scalar initializer">, InGroup<DiagGroup<"braced-scalar-init">>; -def ext_many_braces_around_scalar_init : ExtWarn< -  "too many braces around scalar initializer">, +def warn_braces_around_init : Warning< +  "braces around %select{scalar |}0initializer">, +  InGroup<DiagGroup<"braced-scalar-init">>; +def ext_many_braces_around_init : ExtWarn< +  "too many braces around %select{scalar |}0initializer">,    InGroup<DiagGroup<"many-braces-around-scalar-init">>, SFINAEFailure;  def ext_complex_component_init : Extension<    "complex initialization specifying real and imaginary components "    "is an extension">, InGroup<DiagGroup<"complex-component-init">>;  def err_empty_scalar_initializer : Error<"scalar initializer cannot be empty">; +def err_empty_sizeless_initializer : Error< +  "initializer for sizeless type %0 cannot be empty">;  def warn_cxx98_compat_empty_scalar_initializer : Warning<    "scalar initialized from empty initializer list is incompatible with C++98">,    InGroup<CXX98Compat>, DefaultIgnore; +def warn_cxx98_compat_empty_sizeless_initializer : Warning< +  "initializing %0 from an empty initializer list is incompatible with C++98">, +  InGroup<CXX98Compat>, DefaultIgnore;  def warn_cxx98_compat_reference_list_init : Warning<    "reference initialized from initializer list is incompatible with C++98">,    InGroup<CXX98Compat>, DefaultIgnore; @@ -5292,6 +5519,8 @@ def err_bitfield_width_exceeds_type_width : Error<  def err_anon_bitfield_width_exceeds_type_width : Error<    "width of anonymous bit-field (%0 bits) exceeds %select{width|size}1 "    "of its type (%2 bit%s2)">; +def err_anon_bitfield_init : Error< +  "anonymous bit-field cannot have a default member initializer">;  def err_incorrect_number_of_vector_initializers : Error<    "number of elements must be either one or match the size of the vector">; @@ -5410,6 +5639,8 @@ def note_enters_block_captures_weak : Note<  def note_enters_block_captures_non_trivial_c_struct : Note<    "jump enters lifetime of block which captures a C struct that is non-trivial "    "to destroy">; +def note_enters_compound_literal_scope : Note< +  "jump enters lifetime of a compound literal that is non-trivial to destruct">;  def note_exits_cleanup : Note<    "jump exits scope of variable with __attribute__((cleanup))">; @@ -5453,6 +5684,8 @@ def note_exits_block_captures_weak : Note<  def note_exits_block_captures_non_trivial_c_struct : Note<    "jump exits lifetime of block which captures a C struct that is non-trivial "    "to destroy">; +def note_exits_compound_literal_scope : Note< +  "jump exits lifetime of a compound literal that is non-trivial to destruct">;  def err_func_returning_qualified_void : ExtWarn<    "function cannot return qualified void type %0">, @@ -5460,7 +5693,8 @@ def err_func_returning_qualified_void : ExtWarn<  def err_func_returning_array_function : Error<    "function cannot return %select{array|function}0 type %1">;  def err_field_declared_as_function : Error<"field %0 declared as a function">; -def err_field_incomplete : Error<"field has incomplete type %0">; +def err_field_incomplete_or_sizeless : Error< +  "field has %select{incomplete|sizeless}0 type %1">;  def ext_variable_sized_type_in_struct : ExtWarn<    "field %0 with variable sized type %1 not at the end of a struct or class is"    " a GNU extension">, InGroup<GNUVariableSizedTypeNotAtEnd>; @@ -5752,8 +5986,8 @@ def err_flexible_array_init_needs_braces : Error<    "flexible array requires brace-enclosed initializer">;  def err_illegal_decl_array_of_functions : Error<    "'%0' declared as array of functions of type %1">; -def err_illegal_decl_array_incomplete_type : Error< -  "array has incomplete element type %0">; +def err_array_incomplete_or_sizeless_type : Error< +  "array has %select{incomplete|sizeless}0 element type %1">;  def err_illegal_message_expr_incomplete_type : Error<    "Objective-C message has incomplete result type %0">;  def err_illegal_decl_array_of_references : Error< @@ -5784,30 +6018,24 @@ def err_block_return_missing_expr : Error<    "non-void block should return a value">;  def err_func_def_incomplete_result : Error<    "incomplete result type %0 in function definition">; -def err_atomic_specifier_bad_type : Error< -  "_Atomic cannot be applied to " -  "%select{incomplete |array |function |reference |atomic |qualified |}0type " -  "%1 %select{||||||which is not trivially copyable}0">; +def err_atomic_specifier_bad_type +    : Error<"_Atomic cannot be applied to " +            "%select{incomplete |array |function |reference |atomic |qualified " +            "|sizeless ||integer |integer }0type " +            "%1 %select{|||||||which is not trivially copyable|with less than " +            "1 byte of precision|with a non power of 2 precision}0">;  // Expressions. -def select_unary_expr_or_type_trait_kind : TextSubstitution< -  "%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align|" -  "__alignof}0">;  def ext_sizeof_alignof_function_type : Extension< -  "invalid application of '%sub{select_unary_expr_or_type_trait_kind}0' " -  "to a function type">, InGroup<PointerArith>; +  "invalid application of '%0' to a function type">, InGroup<PointerArith>;  def ext_sizeof_alignof_void_type : Extension< -  "invalid application of '%sub{select_unary_expr_or_type_trait_kind}0' " -  "to a void type">, InGroup<PointerArith>; +  "invalid application of '%0' to a void type">, InGroup<PointerArith>;  def err_opencl_sizeof_alignof_type : Error< -  "invalid application of '%sub{select_unary_expr_or_type_trait_kind}0' " -  "to a void type">; -def err_sizeof_alignof_incomplete_type : Error< -  "invalid application of '%sub{select_unary_expr_or_type_trait_kind}0' " -  "to an incomplete type %1">; +  "invalid application of '%0' to a void type">; +def err_sizeof_alignof_incomplete_or_sizeless_type : Error< +  "invalid application of '%0' to %select{an incomplete|sizeless}1 type %2">;  def err_sizeof_alignof_function_type : Error< -  "invalid application of '%sub{select_unary_expr_or_type_trait_kind}0' " -  "to a function type">; +  "invalid application of '%0' to a function type">;  def err_openmp_default_simd_align_expr : Error<    "invalid application of '__builtin_omp_required_simd_align' to an expression, only type is allowed">;  def err_sizeof_alignof_typeof_bitfield : Error< @@ -5983,8 +6211,8 @@ def err_typecheck_subscript_not_integer : Error<    "array subscript is not an integer">;  def err_subscript_function_type : Error<    "subscript of pointer to function type %0">; -def err_subscript_incomplete_type : Error< -  "subscript of pointer to incomplete type %0">; +def err_subscript_incomplete_or_sizeless_type : Error< +  "subscript of pointer to %select{incomplete|sizeless}0 type %1">;  def err_dereference_incomplete_type : Error<    "dereference of pointer to incomplete type %0">;  def ext_gnu_subscript_void_type : Extension< @@ -6094,8 +6322,8 @@ def err_typecheck_illegal_increment_decrement : Error<    "cannot %select{decrement|increment}1 value of type %0">;  def err_typecheck_expect_int : Error<    "used type %0 where integer is required">; -def err_typecheck_arithmetic_incomplete_type : Error< -  "arithmetic on a pointer to an incomplete type %0">; +def err_typecheck_arithmetic_incomplete_or_sizeless_type : Error< +  "arithmetic on a pointer to %select{an incomplete|sizeless}0 type %1">;  def err_typecheck_pointer_arith_function_type : Error<    "arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 "    "function type%select{|s}2 %1%select{| and %3}2">; @@ -6129,10 +6357,10 @@ def note_array_init_plain_string_into_char8_t : Note<  def err_array_init_utf8_string_into_char : Error<    "%select{|ISO C++20 does not permit }0initialization of char array with "    "UTF-8 string literal%select{ is not permitted by '-fchar8_t'|}0">; -def warn_cxx2a_compat_utf8_string : Warning< +def warn_cxx20_compat_utf8_string : Warning<    "type of UTF-8 string literal will change from array of const char to " -  "array of const char8_t in C++2a">, InGroup<CXX2aCompat>, DefaultIgnore; -def note_cxx2a_compat_utf8_string_remove_u8 : Note< +  "array of const char8_t in C++20">, InGroup<CXX20Compat>, DefaultIgnore; +def note_cxx20_compat_utf8_string_remove_u8 : Note<    "remove 'u8' prefix to avoid a change of behavior; "    "Clang encodes unprefixed narrow string literals as UTF-8">;  def err_array_init_different_type : Error< @@ -6169,7 +6397,7 @@ def err_typecheck_sclass_func : Error<"illegal storage class on function">;  def err_static_block_func : Error<    "function declared in block scope cannot have 'static' storage class">;  def err_typecheck_address_of : Error<"address of %select{bit-field" -  "|vector element|property expression|register variable}0 requested">; +  "|vector element|property expression|register variable|matrix element}0 requested">;  def ext_typecheck_addrof_void : Extension<    "ISO C forbids taking the address of an expression of type 'void'">;  def err_unqualified_pointer_member_function : Error< @@ -6235,6 +6463,12 @@ def err_typecheck_ordered_comparison_of_pointer_and_zero : Error<    "ordered comparison between pointer and zero (%0 and %1)">;  def err_typecheck_three_way_comparison_of_pointer_and_zero : Error<    "three-way comparison between pointer and zero">; +def ext_typecheck_compare_complete_incomplete_pointers : Extension< +  "pointer comparisons before C11 " +  "need to be between two complete or two incomplete types; " +  "%0 is %select{|in}2complete and " +  "%1 is %select{|in}3complete">, +  InGroup<C11>;  def ext_typecheck_ordered_comparison_of_function_pointers : ExtWarn<    "ordered comparison of function pointers (%0 and %1)">,    InGroup<DiagGroup<"ordered-compare-function-pointers">>; @@ -6273,7 +6507,7 @@ def warn_arith_conv_enum_float : Warning<    "%plural{2:with|4:from|:and}0 "    "%select{enumeration|floating-point}1 type %3">,    InGroup<EnumFloatConversion>, DefaultIgnore; -def warn_arith_conv_enum_float_cxx2a : Warning< +def warn_arith_conv_enum_float_cxx20 : Warning<    "%sub{select_arith_conv_kind}0 "    "%select{floating-point|enumeration}1 type %2 "    "%plural{2:with|4:from|:and}0 " @@ -6283,27 +6517,27 @@ def warn_arith_conv_mixed_enum_types : Warning<    "%sub{select_arith_conv_kind}0 "    "different enumeration types%diff{ ($ and $)|}1,2">,    InGroup<EnumEnumConversion>, DefaultIgnore; -def warn_arith_conv_mixed_enum_types_cxx2a : Warning< +def warn_arith_conv_mixed_enum_types_cxx20 : Warning<    "%sub{select_arith_conv_kind}0 "    "different enumeration types%diff{ ($ and $)|}1,2 is deprecated">,    InGroup<DeprecatedEnumEnumConversion>;  def warn_arith_conv_mixed_anon_enum_types : Warning<    warn_arith_conv_mixed_enum_types.Text>,    InGroup<AnonEnumEnumConversion>, DefaultIgnore; -def warn_arith_conv_mixed_anon_enum_types_cxx2a : Warning< -  warn_arith_conv_mixed_enum_types_cxx2a.Text>, +def warn_arith_conv_mixed_anon_enum_types_cxx20 : Warning< +  warn_arith_conv_mixed_enum_types_cxx20.Text>,    InGroup<DeprecatedAnonEnumEnumConversion>;  def warn_conditional_mixed_enum_types : Warning<    warn_arith_conv_mixed_enum_types.Text>,    InGroup<EnumCompareConditional>, DefaultIgnore; -def warn_conditional_mixed_enum_types_cxx2a : Warning< -  warn_arith_conv_mixed_enum_types_cxx2a.Text>, +def warn_conditional_mixed_enum_types_cxx20 : Warning< +  warn_arith_conv_mixed_enum_types_cxx20.Text>,    InGroup<DeprecatedEnumCompareConditional>;  def warn_comparison_mixed_enum_types : Warning<    warn_arith_conv_mixed_enum_types.Text>,    InGroup<EnumCompare>; -def warn_comparison_mixed_enum_types_cxx2a : Warning< -  warn_arith_conv_mixed_enum_types_cxx2a.Text>, +def warn_comparison_mixed_enum_types_cxx20 : Warning< +  warn_arith_conv_mixed_enum_types_cxx20.Text>,    InGroup<DeprecatedEnumCompare>;  def warn_comparison_of_mixed_enum_types_switch : Warning<    "comparison of different enumeration types in switch statement" @@ -6591,8 +6825,10 @@ def warn_objc_unsafe_perform_selector : Warning<    InGroup<DiagGroup<"objc-unsafe-perform-selector">>;  def note_objc_unsafe_perform_selector_method_declared_here :  Note<    "method %0 that returns %1 declared here">; -def err_attribute_arm_mve_alias : Error< -  "'__clang_arm_mve_alias' attribute can only be applied to an ARM MVE builtin">; +def err_attribute_arm_builtin_alias : Error< +  "'__clang_arm_builtin_alias' attribute can only be applied to an ARM builtin">; +def err_attribute_arm_mve_polymorphism : Error< +  "'__clang_arm_mve_strict_polymorphism' attribute can only be applied to an MVE/NEON vector type">;  def warn_setter_getter_impl_required : Warning<    "property %0 requires method %1 to be defined - " @@ -6642,34 +6878,34 @@ def err_bad_cstyle_cast_overload : Error<  def err_bad_cxx_cast_generic : Error< -  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2 is not allowed">; +  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|" +  "C-style cast|functional-style cast|addrspace_cast}0 from %1 to %2 is not allowed">;  def err_bad_cxx_cast_unrelated_class : Error<    "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2, which are not related by " +  "functional-style cast|}0 from %1 to %2, which are not related by "    "inheritance, is not allowed">;  def note_type_incomplete : Note<"%0 is incomplete">;  def err_bad_cxx_cast_rvalue : Error<    "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from rvalue to reference type %2">; +  "functional-style cast|addrspace_cast}0 from rvalue to reference type %2">;  def err_bad_cxx_cast_bitfield : Error<    "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from bit-field lvalue to reference type %2">; +  "functional-style cast|}0 from bit-field lvalue to reference type %2">;  def err_bad_cxx_cast_qualifiers_away : Error<    "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2 casts away qualifiers">; +  "functional-style cast|}0 from %1 to %2 casts away qualifiers">;  def err_bad_cxx_cast_addr_space_mismatch : Error< -  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2 converts between mismatching address" +  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|" +  "C-style cast|functional-style cast|addrspace_cast}0 from %1 to %2 converts between mismatching address"    " spaces">;  def ext_bad_cxx_cast_qualifiers_away_incoherent : ExtWarn<    "ISO C++ does not allow "    "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" -  "functional-style cast}0 from %1 to %2 because it casts away qualifiers, " +  "functional-style cast|}0 from %1 to %2 because it casts away qualifiers, "    "even though the source and destination types are unrelated">,    SFINAEFailure, InGroup<DiagGroup<"cast-qual-unrelated">>;  def err_bad_const_cast_dest : Error< -  "%select{const_cast||||C-style cast|functional-style cast}0 to %2, " +  "%select{const_cast||||C-style cast|functional-style cast|}0 to %2, "    "which is not a reference, pointer-to-object, or pointer-to-data-member">;  def ext_cast_fn_obj : Extension<    "cast between pointer-to-function and pointer-to-object is an extension">; @@ -6682,14 +6918,18 @@ def warn_cxx98_compat_cast_fn_obj : Warning<  def err_bad_reinterpret_cast_small_int : Error<    "cast from pointer to smaller type %2 loses information">;  def err_bad_cxx_cast_vector_to_scalar_different_size : Error< -  "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " +  "%select{||reinterpret_cast||C-style cast||}0 from vector %1 "    "to scalar %2 of different size">;  def err_bad_cxx_cast_scalar_to_vector_different_size : Error< -  "%select{||reinterpret_cast||C-style cast|}0 from scalar %1 " +  "%select{||reinterpret_cast||C-style cast||}0 from scalar %1 "    "to vector %2 of different size">;  def err_bad_cxx_cast_vector_to_vector_different_size : Error< -  "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " +  "%select{||reinterpret_cast||C-style cast||}0 from vector %1 "    "to vector %2 of different size">; +def warn_bad_cxx_cast_nested_pointer_addr_space : Warning< +  "%select{reinterpret_cast|C-style cast}0 from %1 to %2 " +  "changes address space of nested pointers">, +  InGroup<IncompatiblePointerTypesDiscardsQualifiers>;  def err_bad_lvalue_to_rvalue_cast : Error<    "cannot cast from lvalue of type %1 to rvalue reference type %2; types are "    "not compatible">; @@ -6701,7 +6941,7 @@ def err_bad_static_cast_pointer_nonpointer : Error<  def err_bad_static_cast_member_pointer_nonmp : Error<    "cannot cast from type %1 to member pointer type %2">;  def err_bad_cxx_cast_member_pointer_size : Error< -  "cannot %select{||reinterpret_cast||C-style cast|}0 from member pointer " +  "cannot %select{||reinterpret_cast||C-style cast||}0 from member pointer "    "type %1 to member pointer type %2 of different size">;  def err_bad_reinterpret_cast_reference : Error<    "reinterpret_cast of a %0 to %1 needs its address, which is not allowed">; @@ -6745,8 +6985,8 @@ def err_array_new_needs_size : Error<    "array size must be specified in new expression with no initializer">;  def err_bad_new_type : Error<    "cannot allocate %select{function|reference}1 type %0 with new">; -def err_new_incomplete_type : Error< -  "allocation of incomplete type %0">; +def err_new_incomplete_or_sizeless_type : Error< +  "allocation of %select{incomplete|sizeless}0 type %1">;  def err_new_array_nonconst : Error<    "only the first dimension of an allocated array may have dynamic size">;  def err_new_array_size_unknown_from_init : Error< @@ -6863,6 +7103,8 @@ def err_catch_incomplete_ptr : Error<  def err_catch_incomplete_ref : Error<    "cannot catch reference to incomplete type %0">;  def err_catch_incomplete : Error<"cannot catch incomplete type %0">; +def err_catch_sizeless : Error< +  "cannot catch %select{|reference to }0sizeless type %1">;  def err_catch_rvalue_ref : Error<"cannot catch exceptions by rvalue reference">;  def err_catch_variably_modified : Error<    "cannot catch variably modified type %0">; @@ -6968,6 +7210,8 @@ def err_throw_incomplete : Error<    "cannot throw object of incomplete type %0">;  def err_throw_incomplete_ptr : Error<    "cannot throw pointer to object of incomplete type %0">; +def err_throw_sizeless : Error< +  "cannot throw object of sizeless type %0">;  def warn_throw_underaligned_obj : Warning<    "underaligned exception object thrown">,    InGroup<UnderalignedExceptionObject>; @@ -7054,9 +7298,9 @@ let CategoryName = "Lambda Issue" in {      "cannot deduce type for lambda capture %0 from initializer list">;    def warn_cxx17_compat_init_capture_pack : Warning<      "initialized lambda capture packs are incompatible with C++ standards " -    "before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; +    "before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;    def ext_init_capture_pack : ExtWarn< -    "initialized lambda pack captures are a C++2a extension">, InGroup<CXX2a>; +    "initialized lambda pack captures are a C++20 extension">, InGroup<CXX20>;    // C++14 generic lambdas.    def warn_cxx11_compat_generic_lambda : Warning< @@ -7074,23 +7318,23 @@ let CategoryName = "Lambda Issue" in {    def err_parameter_shadow_capture : Error<      "a lambda parameter cannot shadow an explicitly captured entity">; -  // C++2a [=, this] captures. +  // C++20 [=, this] captures.    def warn_cxx17_compat_equals_this_lambda_capture : Warning<      "explicit capture of 'this' with a capture default of '=' is incompatible " -    "with C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; -  def ext_equals_this_lambda_capture_cxx2a : ExtWarn< +    "with C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; +  def ext_equals_this_lambda_capture_cxx20 : ExtWarn<      "explicit capture of 'this' with a capture default of '=' " -    "is a C++2a extension">, InGroup<CXX2a>; +    "is a C++20 extension">, InGroup<CXX20>;    def warn_deprecated_this_capture : Warning<      "implicit capture of 'this' with a capture default of '=' is deprecated">,      InGroup<DeprecatedThisCapture>, DefaultIgnore;    def note_deprecated_this_capture : Note<      "add an explicit capture of 'this' to capture '*this' by reference">; -  // C++2a default constructible / assignable lambdas. +  // C++20 default constructible / assignable lambdas.    def warn_cxx17_compat_lambda_def_ctor_assign : Warning<      "%select{default construction|assignment}0 of lambda is incompatible with " -    "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; +    "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;  }  def err_return_in_captured_stmt : Error< @@ -7240,6 +7484,21 @@ def warn_incompatible_qualified_id : Warning<    "sending type to parameter of incompatible type}0,1"    "|%diff{casting $ to incompatible type $|"    "casting type to incompatible type}0,1}2">; +def err_incompatible_qualified_id : Error< +  "%select{%diff{assigning to $ from incompatible type $|" +  "assigning to type from incompatible type}0,1" +  "|%diff{passing $ to parameter of incompatible type $|" +  "passing type to parameter of incompatible type}0,1" +  "|%diff{returning $ from a function with incompatible result type $|" +  "returning type from a function with incompatible result type}0,1" +  "|%diff{converting $ to incompatible type $|" +  "converting type to incompatible type}0,1" +  "|%diff{initializing $ with an expression of incompatible type $|" +  "initializing type with an expression of incompatible type}0,1" +  "|%diff{sending $ to parameter of incompatible type $|" +  "sending type to parameter of incompatible type}0,1" +  "|%diff{casting $ to incompatible type $|" +  "casting type to incompatible type}0,1}2">;  def ext_typecheck_convert_pointer_int : ExtWarn<    "incompatible pointer to integer conversion "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7258,6 +7517,23 @@ def ext_typecheck_convert_pointer_int : ExtWarn<    "; remove *|"    "; remove &}3">,    InGroup<IntConversion>; +def err_typecheck_convert_pointer_int : Error< +  "incompatible pointer to integer conversion " +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  "%select{|; dereference with *|" +  "; take the address with &|" +  "; remove *|" +  "; remove &}3">;  def ext_typecheck_convert_int_pointer : ExtWarn<    "incompatible integer to pointer conversion "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7276,6 +7552,23 @@ def ext_typecheck_convert_int_pointer : ExtWarn<    "; remove *|"    "; remove &}3">,    InGroup<IntConversion>, SFINAEFailure; +def err_typecheck_convert_int_pointer : Error< +  "incompatible integer to pointer conversion " +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  "%select{|; dereference with *|" +  "; take the address with &|" +  "; remove *|" +  "; remove &}3">;  def ext_typecheck_convert_pointer_void_func : Extension<    "%select{%diff{assigning to $ from $|assigning to different types}0,1"    "|%diff{passing $ to parameter of type $|" @@ -7289,6 +7582,19 @@ def ext_typecheck_convert_pointer_void_func : Extension<    "sending to parameter of different type}0,1"    "|%diff{casting $ to type $|casting between types}0,1}2"    " converts between void pointer and function pointer">; +def err_typecheck_convert_pointer_void_func : Error< +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  " converts between void pointer and function pointer">;  def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<    "%select{%diff{assigning to $ from $|assigning to different types}0,1"    "|%diff{passing $ to parameter of type $|" @@ -7303,6 +7609,19 @@ def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<    "|%diff{casting $ to type $|casting between types}0,1}2"    " converts between pointers to integer types with different sign">,    InGroup<DiagGroup<"pointer-sign">>; +def err_typecheck_convert_incompatible_pointer_sign : Error< +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  " converts between pointers to integer types with different sign">;  def ext_typecheck_convert_incompatible_pointer : ExtWarn<    "incompatible pointer types "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7321,6 +7640,23 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<    "; remove *|"    "; remove &}3">,    InGroup<IncompatiblePointerTypes>; +def err_typecheck_convert_incompatible_pointer : Error< +  "incompatible pointer types " +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  "%select{|; dereference with *|" +  "; take the address with &|" +  "; remove *|" +  "; remove &}3">;  def ext_typecheck_convert_incompatible_function_pointer : ExtWarn<    "incompatible function pointer types "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7339,6 +7675,23 @@ def ext_typecheck_convert_incompatible_function_pointer : ExtWarn<    "; remove *|"    "; remove &}3">,    InGroup<IncompatibleFunctionPointerTypes>; +def err_typecheck_convert_incompatible_function_pointer : Error< +  "incompatible function pointer types " +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  "%select{|; dereference with *|" +  "; take the address with &|" +  "; remove *|" +  "; remove &}3">;  def ext_typecheck_convert_discards_qualifiers : ExtWarn<    "%select{%diff{assigning to $ from $|assigning to different types}0,1"    "|%diff{passing $ to parameter of type $|" @@ -7353,6 +7706,19 @@ def ext_typecheck_convert_discards_qualifiers : ExtWarn<    "|%diff{casting $ to type $|casting between types}0,1}2"    " discards qualifiers">,    InGroup<IncompatiblePointerTypesDiscardsQualifiers>; +def err_typecheck_convert_discards_qualifiers : Error< +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  " discards qualifiers">;  def ext_nested_pointer_qualifier_mismatch : ExtWarn<    "%select{%diff{assigning to $ from $|assigning to different types}0,1"    "|%diff{passing $ to parameter of type $|" @@ -7367,6 +7733,19 @@ def ext_nested_pointer_qualifier_mismatch : ExtWarn<    "|%diff{casting $ to type $|casting between types}0,1}2"    " discards qualifiers in nested pointer types">,    InGroup<IncompatiblePointerTypesDiscardsQualifiers>; +def err_nested_pointer_qualifier_mismatch : Error< +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2" +  " discards qualifiers in nested pointer types">;  def warn_incompatible_vectors : Warning<    "incompatible vector types "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7381,6 +7760,19 @@ def warn_incompatible_vectors : Warning<    "sending to parameter of different type}0,1"    "|%diff{casting $ to type $|casting between types}0,1}2">,    InGroup<VectorConversion>, DefaultIgnore; +def err_incompatible_vectors : Error< +  "incompatible vector types " +  "%select{%diff{assigning to $ from $|assigning to different types}0,1" +  "|%diff{passing $ to parameter of type $|" +  "passing to parameter of different type}0,1" +  "|%diff{returning $ from a function with result type $|" +  "returning from function with different return type}0,1" +  "|%diff{converting $ to type $|converting between types}0,1" +  "|%diff{initializing $ with an expression of type $|" +  "initializing with expression of different type}0,1" +  "|%diff{sending $ to parameter of type $|" +  "sending to parameter of different type}0,1" +  "|%diff{casting $ to type $|casting between types}0,1}2">;  def err_int_to_block_pointer : Error<    "invalid block pointer conversion "    "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -7547,6 +7939,8 @@ def err_atomic_builtin_pointer_size : Error<  def err_atomic_exclusive_builtin_pointer_size : Error<    "address argument to load or store exclusive builtin must be a pointer to"    " 1,2,4 or 8 byte type (%0 invalid)">; +def err_atomic_builtin_ext_int_size : Error< +  "Atomic memory operand must have a power-of-two size">;  def err_atomic_op_needs_atomic : Error<    "address argument to atomic operation must be a pointer to _Atomic "    "type (%0 invalid)">; @@ -7579,6 +7973,9 @@ def err_overflow_builtin_must_be_int : Error<  def err_overflow_builtin_must_be_ptr_int : Error<    "result argument to overflow builtin must be a pointer "    "to a non-const integer (%0 invalid)">; +def err_overflow_builtin_ext_int_max_size : Error< +  "__builtin_mul_overflow does not support signed _ExtInt operands of more " +  "than %0 bits">;  def err_atomic_load_store_uses_lib : Error<    "atomic %select{load|store}0 requires runtime support that is not " @@ -7611,6 +8008,10 @@ def err_ref_bad_target : Error<  def err_ref_bad_target_global_initializer : Error<    "reference to %select{__device__|__global__|__host__|__host__ __device__}0 "    "function %1 in global initializer">; +def err_capture_bad_target : Error< +  "capture host variable %0 by reference in device or host device lambda function">; +def err_capture_bad_target_this_ptr : Error< +  "capture host side class data member by this pointer in device or host device lambda function">;  def warn_kern_is_method : Extension<    "kernel function %0 is a member function; this may not be accepted by nvcc">,    InGroup<CudaCompat>; @@ -7654,6 +8055,22 @@ def err_cuda_ovl_target : Error<  def note_cuda_ovl_candidate_target_mismatch : Note<      "candidate template ignored: target attributes do not match">; +def err_cuda_device_builtin_surftex_cls_template : Error< +    "illegal device builtin %select{surface|texture}0 reference " +    "class template %1 declared here">; +def note_cuda_device_builtin_surftex_cls_should_have_n_args : Note< +    "%0 needs to have exactly %1 template parameters">; +def note_cuda_device_builtin_surftex_cls_should_have_match_arg : Note< +    "the %select{1st|2nd|3rd}1 template parameter of %0 needs to be " +    "%select{a type|an integer or enum value}2">; + +def err_cuda_device_builtin_surftex_ref_decl : Error< +    "illegal device builtin %select{surface|texture}0 reference " +    "type %1 declared here">; +def note_cuda_device_builtin_surftex_should_be_template_class : Note< +    "%0 needs to be instantiated from a class template with proper " +    "template arguments">; +  def warn_non_pod_vararg_with_format_string : Warning<    "cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic "    "%select{function|block|method|constructor}2; expected type from format " @@ -7735,6 +8152,8 @@ def warn_bad_function_cast : Warning<    InGroup<BadFunctionCast>, DefaultIgnore;  def err_cast_pointer_to_non_pointer_int : Error<    "pointer cannot be cast to type %0">; +def err_cast_to_bfloat16 : Error<"cannot type-cast to __bf16">; +def err_cast_from_bfloat16 : Error<"cannot type-cast from __bf16">;  def err_typecheck_expect_scalar_operand : Error<    "operand of type %0 where arithmetic or pointer type is required">;  def err_typecheck_cond_incompatible_operands : Error< @@ -7790,8 +8209,8 @@ def ext_cxx14_attr : Extension<    "use of the %0 attribute is a C++14 extension">, InGroup<CXX14>;  def ext_cxx17_attr : Extension<    "use of the %0 attribute is a C++17 extension">, InGroup<CXX17>; -def ext_cxx2a_attr : Extension< -  "use of the %0 attribute is a C++2a extension">, InGroup<CXX2a>; +def ext_cxx20_attr : Extension< +  "use of the %0 attribute is a C++20 extension">, InGroup<CXX20>;  def warn_unused_comparison : Warning<    "%select{equality|inequality|relational|three-way}0 comparison result unused">, @@ -7805,7 +8224,7 @@ def err_incomplete_type_used_in_type_trait_expr : Error<  // C++20 constinit and require_constant_initialization attribute  def warn_cxx20_compat_constinit : Warning<    "'constinit' specifier is incompatible with C++ standards before C++20">, -  InGroup<CXX2aCompat>, DefaultIgnore; +  InGroup<CXX20Compat>, DefaultIgnore;  def err_constinit_local_variable : Error<    "local variable cannot be declared 'constinit'">;  def err_require_constant_init_failed : Error< @@ -8044,7 +8463,7 @@ def err_reference_to_local_in_enclosing_context : Error<    "%select{%3|block literal|lambda expression|context}2">;  def err_static_data_member_not_allowed_in_local_class : Error< -  "static data member %0 not allowed in local class %1">; +  "static data member %0 not allowed in local %sub{select_tag_type_kind}2 %1">;  // C++ derived classes  def err_base_clause_on_union : Error<"unions cannot have base classes">; @@ -8200,11 +8619,14 @@ def err_conv_function_with_complex_decl : Error<  def err_conv_function_redeclared : Error<    "conversion function cannot be redeclared">;  def warn_conv_to_self_not_used : Warning< -  "conversion function converting %0 to itself will never be used">; +  "conversion function converting %0 to itself will never be used">, +  InGroup<ClassConversion>;  def warn_conv_to_base_not_used : Warning< -  "conversion function converting %0 to its base class %1 will never be used">; +  "conversion function converting %0 to its base class %1 will never be used">, +  InGroup<ClassConversion>;  def warn_conv_to_void_not_used : Warning< -  "conversion function converting %0 to %1 will never be used">; +  "conversion function converting %0 to %1 will never be used">, +  InGroup<ClassConversion>;  def warn_not_compound_assign : Warning<    "use of unary operator that may be intended as compound assignment (%0=)">; @@ -8260,7 +8682,7 @@ def note_deleted_type_mismatch : Note<  def warn_cxx17_compat_defaulted_method_type_mismatch : Warning<    "explicitly defaulting this %sub{select_special_member_kind}0 with a type "    "different from the implicit type is incompatible with C++ standards before " -  "C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; +  "C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;  def warn_vbase_moved_multiple_times : Warning<    "defaulted move assignment operator of %0 will move assign virtual base "    "class %1 multiple times">, InGroup<DiagGroup<"multiple-move-vbase">>; @@ -8274,10 +8696,10 @@ def select_defaulted_comparison_kind : TextSubstitution<    "%select{<ERROR>|equality|three-way|equality|relational}0 comparison "    "operator">;  def ext_defaulted_comparison : ExtWarn< -  "defaulted comparison operators are a C++20 extension">, InGroup<CXX2a>; +  "defaulted comparison operators are a C++20 extension">, InGroup<CXX20>;  def warn_cxx17_compat_defaulted_comparison : Warning<    "defaulted comparison operators are incompatible with C++ standards " -  "before C++20">, InGroup<CXXPre2aCompat>, DefaultIgnore; +  "before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;  def err_defaulted_comparison_template : Error<    "comparison operator template cannot be defaulted">;  def err_defaulted_comparison_out_of_class : Error< @@ -8334,6 +8756,12 @@ def note_defaulted_comparison_cannot_deduce : Note<    "return type of defaulted 'operator<=>' cannot be deduced because "    "return type %2 of three-way comparison for %select{|member|base class}0 %1 "    "is not a standard comparison category type">; +def err_defaulted_comparison_cannot_deduce_undeduced_auto : Error< +  "return type of defaulted 'operator<=>' cannot be deduced because " +  "three-way comparison for %select{|member|base class}0 %1 " +  "has a deduced return type and is not yet defined">; +def note_defaulted_comparison_cannot_deduce_undeduced_auto : Note< +  "%select{|member|base class}0 %1 declared here">;  def note_defaulted_comparison_cannot_deduce_callee : Note<    "selected 'operator<=>' for %select{|member|base class}0 %1 declared here">;  def err_incorrect_defaulted_comparison_constexpr : Error< @@ -8846,6 +9274,8 @@ def err_block_on_nonlocal : Error<    "__block attribute not allowed, only allowed on local variables">;  def err_block_on_vm : Error<    "__block attribute not allowed on declaration with a variably modified type">; +def err_sizeless_nonlocal : Error< +  "non-local variable with sizeless type %0">;  def err_vec_builtin_non_vector : Error<   "first two arguments to %0 must be vectors">; @@ -8897,6 +9327,10 @@ def err_argument_not_shifted_byte : Error<    "argument should be an 8-bit value shifted by a multiple of 8 bits">;  def err_argument_not_shifted_byte_or_xxff : Error<    "argument should be an 8-bit value shifted by a multiple of 8 bits, or in the form 0x??FF">; +def err_rotation_argument_to_cadd +    : Error<"argument should be the value 90 or 270">; +def err_rotation_argument_to_cmla +    : Error<"argument should be the value 0, 90, 180 or 270">;  def warn_neon_vector_initializer_non_portable : Warning<    "vector initializers are not compatible with NEON intrinsics in big endian "    "mode">, InGroup<DiagGroup<"nonportable-vector-initialization">>; @@ -8927,12 +9361,8 @@ def err_x86_builtin_invalid_rounding : Error<    "invalid rounding argument">;  def err_x86_builtin_invalid_scale : Error<    "scale argument must be 1, 2, 4, or 8">; -def err_hexagon_builtin_unsupported_cpu : Error< -  "builtin is not supported on this CPU">; -def err_hexagon_builtin_requires_hvx : Error< -  "builtin requires HVX">; -def err_hexagon_builtin_unsupported_hvx : Error< -  "builtin is not supported on this version of HVX">; +def err_x86_builtin_tile_arg_duplicate : Error< +  "tile arguments must refer to different tiles">;  def err_builtin_target_unsupported : Error<    "builtin is not supported on this target">; @@ -9350,7 +9780,7 @@ def err_omp_expected_var_name_member_expr : Error<  def err_omp_expected_var_name_member_expr_or_array_item : Error<    "expected variable name%select{|, data member of current class}0, array element or array section">;  def err_omp_expected_addressable_lvalue_or_array_item : Error< -  "expected addressable lvalue expression, array element or array section">; +  "expected addressable lvalue expression, array element%select{ or array section|, array section or array shaping expression}0%select{| of non 'omp_depend_t' type}1">;  def err_omp_expected_named_var_member_or_array_expression: Error<    "expected expression containing only member accesses and/or array sections based on named variables">;  def err_omp_bit_fields_forbidden_in_clause : Error< @@ -9425,6 +9855,12 @@ def note_omp_conversion_here : Note<  def err_omp_ambiguous_conversion : Error<    "ambiguous conversion from type %0 to an integral or unscoped "    "enumeration type">; +def err_omp_iterator_not_integral_or_pointer : Error< +  "expected integral or pointer type as the iterator-type, not %0">; +def err_omp_iterator_step_not_integral : Error< +  "iterator step expression %0 is not the integral expression">; +def err_omp_iterator_step_constant_zero : Error< +  "iterator step expression %0 evaluates to 0">;  def err_omp_required_access : Error<    "%0 variable must be %1">;  def err_omp_const_variable : Error< @@ -9513,8 +9949,6 @@ def err_omp_reduction_in_task : Error<    "reduction variables may not be accessed in an explicit task">;  def err_omp_reduction_id_not_compatible : Error<    "list item of type %0 is not valid for specified reduction operation: unable to provide default initialization value">; -def err_omp_in_reduction_not_task_reduction : Error< -  "in_reduction variable must appear in a task_reduction clause">;  def err_omp_reduction_identifier_mismatch : Error<    "in_reduction variable must have the same reduction operation as in a task_reduction clause">;  def note_omp_previous_reduction_identifier : Note< @@ -9524,15 +9958,20 @@ def err_omp_prohibited_region : Error<    "%select{|; perhaps you forget to enclose 'omp %3' directive into a parallel region?|"    "; perhaps you forget to enclose 'omp %3' directive into a for or a parallel for region with 'ordered' clause?|"    "; perhaps you forget to enclose 'omp %3' directive into a target region?|" -  "; perhaps you forget to enclose 'omp %3' directive into a teams region?}2">; +  "; perhaps you forget to enclose 'omp %3' directive into a teams region?|" +  "; perhaps you forget to enclose 'omp %3' directive into a for, simd, for simd, parallel for, or parallel for simd region?}2">;  def err_omp_prohibited_region_simd : Error< -  "OpenMP constructs may not be nested inside a simd region%select{| except for ordered simd, simd or atomic directive}0">; +  "OpenMP constructs may not be nested inside a simd region%select{| except for ordered simd, simd, scan, or atomic directive}0">;  def err_omp_prohibited_region_atomic : Error<    "OpenMP constructs may not be nested inside an atomic region">;  def err_omp_prohibited_region_critical_same_name : Error<    "cannot nest 'critical' regions having the same name %0">;  def note_omp_previous_critical_region : Note<    "previous 'critical' region starts here">; +def err_omp_several_directives_in_region : Error< +  "exactly one '%0' directive must appear in the loop body of an enclosing directive">; +def note_omp_previous_directive : Note< +  "previous '%0' directive used here">;  def err_omp_sections_not_compound_stmt : Error<    "the statement for '#pragma omp sections' must be a compound statement">;  def err_omp_parallel_sections_not_compound_stmt : Error< @@ -9576,7 +10015,11 @@ def note_omp_atomic_capture: Note<    "%select{expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression}0">;  def err_omp_atomic_several_clauses : Error<    "directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">; -def note_omp_atomic_previous_clause : Note< +def err_omp_several_mem_order_clauses : Error< +  "directive '#pragma omp %0' cannot contain more than one %select{'seq_cst', 'relaxed', |}1'acq_rel', 'acquire' or 'release' clause">; +def err_omp_atomic_incompatible_mem_order_clause : Error< +  "directive '#pragma omp atomic%select{ %0|}1' cannot be used with '%2' clause">; +def note_omp_previous_mem_order_clause : Note<    "'%0' clause used here">;  def err_omp_target_contains_not_only_teams : Error<    "target construct with nested teams region contains statements outside of the teams construct">; @@ -9610,10 +10053,16 @@ def err_omp_declare_mapper_redefinition : Error<  def err_omp_invalid_mapper: Error<    "cannot find a valid user-defined mapper for type %0 with name %1">;  def err_omp_array_section_use : Error<"OpenMP array section is not allowed here">; +def err_omp_array_shaping_use : Error<"OpenMP array shaping operation is not allowed here">; +def err_omp_iterator_use : Error<"OpenMP iterator is not allowed here">;  def err_omp_typecheck_section_value : Error<    "subscripted value is not an array or pointer">;  def err_omp_typecheck_section_not_integer : Error<    "array section %select{lower bound|length}0 is not an integer">; +def err_omp_typecheck_shaping_not_integer : Error< +  "array shaping operation dimension is not an integer">; +def err_omp_shaping_dimension_not_positive : Error< +  "array shaping dimension is evaluated to a non-positive value %0">;  def err_omp_section_function_type : Error<    "section of pointer to function type %0">;  def warn_omp_section_is_char : Warning<"array section %select{lower bound|length}0 is of type 'char'">, @@ -9624,6 +10073,8 @@ def err_omp_section_not_subset_of_array : Error<    "array section must be a subset of the original array">;  def err_omp_section_length_negative : Error<    "section length is evaluated to a negative value %0">; +def err_omp_section_stride_non_positive : Error< +  "section stride is evaluated to a non-positive value %0">;  def err_omp_section_length_undefined : Error<    "section length is unspecified and cannot be inferred because subscripted value is %select{not an array|an array of unknown bound}0">;  def err_omp_wrong_linear_modifier : Error< @@ -9645,7 +10096,7 @@ def err_omp_ordered_directive_with_param : Error<  def err_omp_ordered_directive_without_param : Error<    "'ordered' directive with 'depend' clause cannot be closely nested inside ordered region without specified parameter">;  def note_omp_ordered_param : Note< -  "'ordered' clause with specified parameter">; +  "'ordered' clause%select{| with specified parameter}0">;  def err_omp_expected_base_var_name : Error<    "expected variable name as a base of the array %select{subscript|section}0">;  def err_omp_map_shared_storage : Error< @@ -9660,9 +10111,9 @@ def err_omp_wrong_ordered_loop_count : Error<    "the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause">;  def note_collapse_loop_count : Note<    "parameter of the 'collapse' clause">; -def err_omp_grainsize_num_tasks_mutually_exclusive : Error< +def err_omp_clauses_mutually_exclusive : Error<    "'%0' and '%1' clause are mutually exclusive and may not appear on the same directive">; -def note_omp_previous_grainsize_num_tasks : Note< +def note_omp_previous_clause : Note<    "'%0' clause is specified here">;  def err_omp_hint_clause_no_name : Error<    "the name of the construct must be specified in presence of 'hint' clause">; @@ -9684,14 +10135,18 @@ def err_omp_depend_sink_source_not_allowed : Error<    "'depend(%select{source|sink:vec}0)' clause%select{|s}0 cannot be mixed with 'depend(%select{sink:vec|source}0)' clause%select{s|}0">;  def err_omp_depend_zero_length_array_section_not_allowed : Error<    "zero-length array section is not allowed in 'depend' clause">; +def err_omp_depend_sink_source_with_modifier : Error< +  "depend modifier cannot be used with 'sink' or 'source' depend type">; +def err_omp_depend_modifier_not_iterator : Error< +  "expected iterator specification as depend modifier">;  def err_omp_linear_ordered : Error<    "'linear' clause cannot be specified along with 'ordered' clause with a parameter">;  def err_omp_unexpected_schedule_modifier : Error<    "modifier '%0' cannot be used along with modifier '%1'">;  def err_omp_schedule_nonmonotonic_static : Error<    "'nonmonotonic' modifier can only be specified with 'dynamic' or 'guided' schedule kind">; -def err_omp_schedule_nonmonotonic_ordered : Error< -  "'schedule' clause with 'nonmonotonic' modifier cannot be specified if an 'ordered' clause is specified">; +def err_omp_simple_clause_incompatible_with_ordered : Error< +  "'%0' clause with '%1' modifier cannot be specified if an 'ordered' clause is specified">;  def err_omp_ordered_simd : Error<    "'ordered' clause with a parameter can not be specified in '#pragma omp %0' directive">;  def err_omp_variable_in_given_clause_and_dsa : Error< @@ -9713,7 +10168,8 @@ def warn_omp_nesting_simd : Warning<    InGroup<SourceUsesOpenMP>;  def err_omp_orphaned_device_directive : Error<    "orphaned 'omp %0' directives are prohibited" -  "; perhaps you forget to enclose the directive into a %select{|||target |teams }1region?">; +  "; perhaps you forget to enclose the directive into a " +  "%select{|||target |teams|for, simd, for simd, parallel for, or parallel for simd }1region?">;  def err_omp_reduction_non_addressable_expression : Error<    "expected addressable reduction item for the task-based directives">;  def err_omp_reduction_with_nogroup : Error< @@ -9729,10 +10185,10 @@ def err_omp_requires_clause_redeclaration : Error <    "Only one %0 clause can appear on a requires directive in a single translation unit">;  def note_omp_requires_previous_clause : Note <    "%0 clause previously used here">; -def err_omp_target_before_requires : Error < -  "target region encountered before requires directive with '%0' clause">; -def note_omp_requires_encountered_target : Note < -  "target previously encountered here">; +def err_omp_directive_before_requires : Error < +  "'%0' region encountered before requires directive with '%1' clause">; +def note_omp_requires_encountered_directive : Note < +  "'%0' previously encountered here">;  def err_omp_invalid_scope : Error <    "'#pragma omp %0' directive must appear only in file scope">;  def note_omp_invalid_length_on_this_ptr_mapping : Note < @@ -9743,8 +10199,29 @@ def note_omp_invalid_subscript_on_this_ptr_map : Note <    "expected 'this' subscript expression on map clause to be 'this[0]'">;  def err_omp_invalid_map_this_expr : Error <    "invalid 'this' expression on 'map' clause">; -def err_implied_omp_allocator_handle_t_not_found : Error< -  "omp_allocator_handle_t type not found; include <omp.h>">; +def err_omp_implied_type_not_found : Error< +  "'%0' type not found; include <omp.h>">; +def err_omp_expected_omp_depend_t_lvalue : Error< +  "expected lvalue expression%select{ of 'omp_depend_t' type, not %1|}0">; +def err_omp_depobj_expected : Error< +  "expected depobj expression">; +def err_omp_depobj_single_clause_expected : Error< +  "exactly one of 'depend', 'destroy', or 'update' clauses is expected">; +def err_omp_scan_single_clause_expected : Error< +  "exactly one of 'inclusive' or 'exclusive' clauses is expected">; +def err_omp_inclusive_exclusive_not_reduction : Error< +  "the list item must appear in 'reduction' clause with the 'inscan' modifier " +  "of the parent directive">; +def err_omp_reduction_not_inclusive_exclusive : Error< +  "the inscan reduction list item must appear as a list item in an 'inclusive' or" +  " 'exclusive' clause on an inner 'omp scan' directive">; +def err_omp_wrong_inscan_reduction : Error< +  "'inscan' modifier can be used only in 'omp for', 'omp simd', 'omp for simd'," +  " 'omp parallel for', or 'omp parallel for simd' directive">; +def err_omp_inscan_reduction_expected : Error< +  "expected 'reduction' clause with the 'inscan' modifier">; +def note_omp_previous_inscan_reduction : Note< +  "'reduction' clause with 'inscan' modifier is used here">;  def err_omp_expected_predefined_allocator : Error<    "expected one of the predefined allocators for the variables with the static "    "storage: 'omp_default_mem_alloc', 'omp_large_cap_mem_alloc', " @@ -9773,8 +10250,8 @@ def err_omp_invariant_or_linear_dependency : Error<    "expected loop invariant expression or '<invariant1> * %0 + <invariant2>' kind of expression">;  def err_omp_wrong_dependency_iterator_type : Error<    "expected an integer or a pointer type of the outer loop counter '%0' for non-rectangular nests">; -def err_omp_unsupported_type : Error < -  "host requires %0 bit size %1 type support, but device '%2' does not support it">; +def err_device_unsupported_type : Error < +  "%0 requires %1 bit size %2 type support, but device '%3' does not support it">;  def err_omp_lambda_capture_in_declare_target_not_to : Error<    "variable captured in declare target region must appear in a to clause">;  def err_omp_device_type_mismatch : Error< @@ -9787,6 +10264,13 @@ def warn_omp_declare_target_after_first_use : Warning<    InGroup<OpenMPTarget>;  def err_omp_declare_variant_incompat_attributes : Error<    "'#pragma omp declare variant' is not compatible with any target-specific attributes">; +def warn_omp_declare_variant_score_not_constant +    : Warning<"score expressions in the OpenMP context selector need to be " +              "constant; %0 is not and will be ignored">, +      InGroup<SourceUsesOpenMP>; +def err_omp_declare_variant_user_condition_not_constant +    : Error<"the user condition in the OpenMP context selector needs to be " +            "constant; %0 is not">;  def warn_omp_declare_variant_after_used : Warning<    "'#pragma omp declare variant' cannot be applied for function after first "    "usage; the original function might be used">, InGroup<SourceUsesOpenMP>; @@ -9814,6 +10298,37 @@ def err_omp_one_defaultmap_each_category: Error<  def err_omp_lastprivate_conditional_non_scalar : Error<    "expected list item of scalar type in 'lastprivate' clause with 'conditional' modifier"    >; +def err_omp_flush_order_clause_and_list : Error< +  "'flush' directive with memory order clause '%0' cannot have the list">; +def note_omp_flush_order_clause_here : Note< +  "memory order clause '%0' is specified here">; +def err_omp_non_lvalue_in_map_or_motion_clauses: Error< +  "expected addressable lvalue in '%0' clause">; +def err_omp_var_expected : Error< +  "expected variable of the '%0' type%select{|, not %2}1">; +def warn_nested_declare_variant +    : Warning<"nesting `omp begin/end declare variant` is not supported yet; " +              "nested context ignored">, +      InGroup<SourceUsesOpenMP>; +def err_omp_non_pointer_type_array_shaping_base : Error< +  "expected expression with a pointer to a complete type as a base of an array " +  "shaping operation">; +def err_omp_reduction_task_not_parallel_or_worksharing : Error< +  "'reduction' clause with 'task' modifier allowed only on non-simd parallel or" +  " worksharing constructs">; +def err_omp_expected_array_alloctraits : Error< +  "expected constant sized array of 'omp_alloctrait_t' elements, not %0">; +def err_omp_predefined_allocator_with_traits : Error< +  "predefined allocator cannot have traits specified">; +def note_omp_predefined_allocator : Note< +  "predefined trait '%0' used here">; +def err_omp_nonpredefined_allocator_without_traits : Error< +  "non-predefined allocator must have traits specified">; +def err_omp_allocator_used_in_clauses : Error< +  "allocators used in 'uses_allocators' clause cannot appear in other " +  "data-sharing or data-mapping attribute clauses">; +def err_omp_allocator_not_in_uses_allocators : Error< +  "allocator must be specified in the 'uses_allocators' clause">;  } // end of OpenMP category  let CategoryName = "Related Result Type Issue" in { @@ -9882,11 +10397,6 @@ def err_module_unimported_use : Error<    "explicit specialization|partial specialization}0 of %1 must be imported "    "from module '%2' before it is required">;  def err_module_unimported_use_header : Error< -  "missing '#include %3'; " -  "%select{declaration|definition|default argument|" -  "explicit specialization|partial specialization}0 of %1 must be imported " -  "from module '%2' before it is required">; -def err_module_unimported_use_global_module_fragment : Error<    "%select{missing '#include'|missing '#include %3'}2; "    "%select{||default argument of |explicit specialization of |"    "partial specialization of }0%1 must be " @@ -9896,6 +10406,10 @@ def err_module_unimported_use_multiple : Error<    "%select{declaration|definition|default argument|"    "explicit specialization|partial specialization}0 of %1 must be imported "    "from one of the following modules before it is required:%2">; +def note_unreachable_entity : Note< +  "%select{declaration|definition|default argument declared|" +  "explicit specialization declared|partial specialization declared}0 here " +  "is not %select{visible|reachable|reachable|reachable|reachable|reachable}0">;  def ext_module_import_in_extern_c : ExtWarn<    "import of C++ module '%0' appears within extern \"C\" language linkage "    "specification">, DefaultError, @@ -10036,7 +10550,16 @@ def err_await_suspend_invalid_return_type : Error<  def note_await_ready_no_bool_conversion : Note<    "return type of 'await_ready' is required to be contextually convertible to 'bool'"  >; -} +def warn_coroutine_handle_address_invalid_return_type : Warning < +  "return type of 'coroutine_handle<>::address should be 'void*' (have %0) in order to get capability with existing async C API.">, +  InGroup<Coroutine>; +def err_coroutine_promise_final_suspend_requires_nothrow : Error< +  "the expression 'co_await __promise.final_suspend()' is required to be non-throwing" +>; +def note_coroutine_function_declare_noexcept : Note< +  "must be declared with 'noexcept'" +>; +} // end of coroutines issue category  let CategoryName = "Documentation Issue" in {  def warn_not_a_doxygen_trailing_member_comment : Warning< @@ -10281,10 +10804,46 @@ def err_builtin_launder_invalid_arg : Error<    "%select{non-pointer|function pointer|void pointer}0 argument to "    "'__builtin_launder' is not allowed">; +def err_builtin_matrix_disabled: Error< +  "matrix types extension is disabled. Pass -fenable-matrix to enable it">; +def err_matrix_index_not_integer: Error< +  "matrix %select{row|column}0 index is not an integer">; +def err_matrix_index_outside_range: Error< +  "matrix %select{row|column}0 index is outside the allowed range [0, %1)">; +def err_matrix_incomplete_index: Error< +  "single subscript expressions are not allowed for matrix values">; +def err_matrix_separate_incomplete_index: Error< +  "matrix row and column subscripts cannot be separated by any expression">; +def err_matrix_subscript_comma: Error< +  "comma expressions are not allowed as indices in matrix subscript expressions">; +def err_builtin_matrix_arg: Error<"1st argument must be a matrix">; +def err_builtin_matrix_scalar_unsigned_arg: Error< +  "%0 argument must be a constant unsigned integer expression">; +def err_builtin_matrix_pointer_arg: Error< +  "%ordinal0 argument must be a pointer to a valid matrix element type">; +def err_builtin_matrix_pointer_arg_mismatch: Error< +  "the pointee of the 2nd argument must match the element type of the 1st argument (%0 != %1)">; +def err_builtin_matrix_store_to_const: Error< +  "cannot store matrix to read-only pointer">; +def err_builtin_matrix_stride_too_small: Error< +  "stride must be greater or equal to the number of rows">; +def err_builtin_matrix_invalid_dimension: Error< +  "%0 dimension is outside the allowed range [1, %1]">; + +def warn_mismatched_import : Warning< +  "import %select{module|name}0 (%1) does not match the import %select{module|name}0 (%2) of the " +  "previous declaration">, +  InGroup<IgnoredAttributes>; +def warn_import_on_definition : Warning< +  "import %select{module|name}0 cannot be applied to a function with a definition">, +  InGroup<IgnoredAttributes>; +  def err_preserve_field_info_not_field : Error<    "__builtin_preserve_field_info argument %0 not a field access">;  def err_preserve_field_info_not_const: Error<    "__builtin_preserve_field_info argument %0 not a constant">; +def err_btf_type_id_not_const: Error< +  "__builtin_btf_type_id argument %0 not a constant">;  def err_bit_cast_non_trivially_copyable : Error<    "__builtin_bit_cast %select{source|destination}0 type must be trivially copyable">; @@ -10305,4 +10864,16 @@ def warn_sycl_kernel_return_type : Warning<    "function template with 'sycl_kernel' attribute must have a 'void' return type">,    InGroup<IgnoredAttributes>; +def err_ext_int_bad_size : Error<"%select{signed|unsigned}0 _ExtInt must " +                                 "have a bit size of at least %select{2|1}0">; +def err_ext_int_max_size : Error<"%select{signed|unsigned}0 _ExtInt of bit " +                                 "sizes greater than %1 not supported">; + +// errors of expect.with.probability +def err_probability_not_constant_float : Error< +   "probability argument to __builtin_expect_with_probability must be constant " +   "floating-point expression">; +def err_probability_out_of_range : Error< +   "probability argument to __builtin_expect_with_probability is outside the " +   "range [0.0, 1.0]">;  } // end of sema component.  | 
