10b57cec5SDimitry Andric//==--- DiagnosticParseKinds.td - libparse diagnostics --------------------===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 100b57cec5SDimitry Andric// Parser Diagnostics 110b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andriclet Component = "Parse" in { 140b57cec5SDimitry Andric 155ffd83dbSDimitry Andricdef err_asm_qualifier_ignored : Error< 165ffd83dbSDimitry Andric "expected 'volatile', 'inline', 'goto', or '('">, CatInlineAsm; 175ffd83dbSDimitry Andricdef err_global_asm_qualifier_ignored : Error< 185ffd83dbSDimitry Andric "meaningless '%0' on asm outside function">, CatInlineAsm; 190b57cec5SDimitry Andric 200b57cec5SDimitry Andriclet CategoryName = "Inline Assembly Issue" in { 210b57cec5SDimitry Andricdef err_asm_empty : Error<"__asm used with no assembly instructions">; 220b57cec5SDimitry Andricdef err_inline_ms_asm_parsing : Error<"%0">; 230b57cec5SDimitry Andricdef err_msasm_unsupported_arch : Error< 24fe6060f1SDimitry Andric "unsupported architecture '%0' for MS-style inline assembly">; 250b57cec5SDimitry Andricdef err_msasm_unable_to_create_target : Error< 260b57cec5SDimitry Andric "MS-style inline assembly is not available: %0">; 270b57cec5SDimitry Andricdef err_gnu_inline_asm_disabled : Error< 280b57cec5SDimitry Andric "GNU-style inline assembly is disabled">; 295ffd83dbSDimitry Andricdef err_asm_duplicate_qual : Error<"duplicate asm qualifier '%0'">; 300b57cec5SDimitry Andric} 310b57cec5SDimitry Andric 320b57cec5SDimitry Andriclet CategoryName = "Parse Issue" in { 330b57cec5SDimitry Andric 340b57cec5SDimitry Andricdef ext_empty_translation_unit : Extension< 350b57cec5SDimitry Andric "ISO C requires a translation unit to contain at least one declaration">, 360b57cec5SDimitry Andric InGroup<DiagGroup<"empty-translation-unit">>; 370b57cec5SDimitry Andricdef warn_cxx98_compat_top_level_semi : Warning< 380b57cec5SDimitry Andric "extra ';' outside of a function is incompatible with C++98">, 390b57cec5SDimitry Andric InGroup<CXX98CompatExtraSemi>, DefaultIgnore; 400b57cec5SDimitry Andricdef ext_extra_semi : Extension< 410b57cec5SDimitry Andric "extra ';' %select{" 420b57cec5SDimitry Andric "outside of a function|" 430b57cec5SDimitry Andric "inside a %1|" 440b57cec5SDimitry Andric "inside instance variable list|" 450b57cec5SDimitry Andric "after member function definition}0">, 460b57cec5SDimitry Andric InGroup<ExtraSemi>; 470b57cec5SDimitry Andricdef ext_extra_semi_cxx11 : Extension< 480b57cec5SDimitry Andric "extra ';' outside of a function is a C++11 extension">, 490b57cec5SDimitry Andric InGroup<CXX11ExtraSemi>; 500b57cec5SDimitry Andricdef warn_extra_semi_after_mem_fn_def : Warning< 510b57cec5SDimitry Andric "extra ';' after member function definition">, 520b57cec5SDimitry Andric InGroup<ExtraSemi>, DefaultIgnore; 530b57cec5SDimitry Andricdef warn_null_statement : Warning< 540b57cec5SDimitry Andric "empty expression statement has no effect; " 550b57cec5SDimitry Andric "remove unnecessary ';' to silence this warning">, 560b57cec5SDimitry Andric InGroup<ExtraSemiStmt>, DefaultIgnore; 570b57cec5SDimitry Andric 58480093f4SDimitry Andricdef warn_misleading_indentation : Warning< 59480093f4SDimitry Andric "misleading indentation; statement is not part of " 60480093f4SDimitry Andric "the previous '%select{if|else|for|while}0'">, 61480093f4SDimitry Andric InGroup<MisleadingIndentation>, DefaultIgnore; 62480093f4SDimitry Andricdef note_previous_statement : Note< 63480093f4SDimitry Andric "previous statement is here">; 64480093f4SDimitry Andric 65e8d8bef9SDimitry Andricdef subst_compound_token_kind : TextSubstitution< 66e8d8bef9SDimitry Andric "%select{%1 and |}0%2 tokens " 67e8d8bef9SDimitry Andric "%select{introducing statement expression|terminating statement expression|" 68e8d8bef9SDimitry Andric "introducing attribute|terminating attribute|" 69e8d8bef9SDimitry Andric "forming pointer to member type}3">; 70e8d8bef9SDimitry Andricdef warn_compound_token_split_by_macro : Warning< 71e8d8bef9SDimitry Andric "%sub{subst_compound_token_kind}0,1,2,3 appear in different " 72e8d8bef9SDimitry Andric "macro expansion contexts">, InGroup<CompoundTokenSplitByMacro>; 73e8d8bef9SDimitry Andricdef note_compound_token_split_second_token_here : Note< 74e8d8bef9SDimitry Andric "%select{|second }0%1 token is here">; 75e8d8bef9SDimitry Andricdef warn_compound_token_split_by_whitespace : Warning< 76e8d8bef9SDimitry Andric "%sub{subst_compound_token_kind}0,1,2,3 are separated by whitespace">, 77e8d8bef9SDimitry Andric InGroup<CompoundTokenSplitBySpace>, DefaultIgnore; 78e8d8bef9SDimitry Andric 790b57cec5SDimitry Andricdef ext_thread_before : Extension<"'__thread' before '%0'">; 800b57cec5SDimitry Andricdef ext_keyword_as_ident : ExtWarn< 810b57cec5SDimitry Andric "keyword '%0' will be made available as an identifier " 820b57cec5SDimitry Andric "%select{here|for the remainder of the translation unit}1">, 830b57cec5SDimitry Andric InGroup<KeywordCompat>; 840b57cec5SDimitry Andric 850b57cec5SDimitry Andricdef ext_nullability : Extension< 860b57cec5SDimitry Andric "type nullability specifier %0 is a Clang extension">, 870b57cec5SDimitry Andric InGroup<DiagGroup<"nullability-extension">>; 880b57cec5SDimitry Andric 890b57cec5SDimitry Andricdef err_empty_enum : Error<"use of empty enum">; 900b57cec5SDimitry Andric 910b57cec5SDimitry Andricdef ext_ident_list_in_param : Extension< 920b57cec5SDimitry Andric "type-less parameter names in function declaration">; 930b57cec5SDimitry Andricdef ext_c99_variable_decl_in_for_loop : Extension< 940b57cec5SDimitry Andric "variable declaration in for loop is a C99-specific feature">, InGroup<C99>; 950b57cec5SDimitry Andricdef ext_c99_compound_literal : Extension< 960b57cec5SDimitry Andric "compound literals are a C99-specific feature">, InGroup<C99>; 970b57cec5SDimitry Andricdef ext_enumerator_list_comma_c : Extension< 980b57cec5SDimitry Andric "commas at the end of enumerator lists are a C99-specific " 990b57cec5SDimitry Andric "feature">, InGroup<C99>; 1000b57cec5SDimitry Andricdef ext_enumerator_list_comma_cxx : Extension< 1010b57cec5SDimitry Andric "commas at the end of enumerator lists are a C++11 extension">, 1020b57cec5SDimitry Andric InGroup<CXX11>; 1030b57cec5SDimitry Andricdef warn_cxx98_compat_enumerator_list_comma : Warning< 1040b57cec5SDimitry Andric "commas at the end of enumerator lists are incompatible with C++98">, 1050b57cec5SDimitry Andric InGroup<CXX98CompatPedantic>, DefaultIgnore; 1060b57cec5SDimitry Andricdef err_enumerator_list_missing_comma : Error< 1070b57cec5SDimitry Andric "missing ',' between enumerators">; 1080b57cec5SDimitry Andricdef err_enumerator_unnamed_no_def : Error< 1090b57cec5SDimitry Andric "unnamed enumeration must be a definition">; 1100b57cec5SDimitry Andricdef ext_cxx11_enum_fixed_underlying_type : Extension< 1110b57cec5SDimitry Andric "enumeration types with a fixed underlying type are a C++11 extension">, 1120b57cec5SDimitry Andric InGroup<CXX11>; 1130b57cec5SDimitry Andricdef ext_ms_c_enum_fixed_underlying_type : Extension< 1140b57cec5SDimitry Andric "enumeration types with a fixed underlying type are a Microsoft extension">, 1150b57cec5SDimitry Andric InGroup<MicrosoftFixedEnum>; 1160b57cec5SDimitry Andricdef ext_clang_c_enum_fixed_underlying_type : Extension< 1170b57cec5SDimitry Andric "enumeration types with a fixed underlying type are a Clang extension">, 1180b57cec5SDimitry Andric InGroup<DiagGroup<"fixed-enum-extension">>; 1190b57cec5SDimitry Andricdef warn_cxx98_compat_enum_fixed_underlying_type : Warning< 1200b57cec5SDimitry Andric "enumeration types with a fixed underlying type are incompatible with C++98">, 1210b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 1225ffd83dbSDimitry Andricdef ext_enum_base_in_type_specifier : ExtWarn< 1235ffd83dbSDimitry Andric "non-defining declaration of enumeration with a fixed underlying type is " 1245ffd83dbSDimitry Andric "only permitted as a standalone declaration" 1255ffd83dbSDimitry Andric "%select{|; missing list of enumerators?}0">, 1265ffd83dbSDimitry Andric InGroup<DiagGroup<"elaborated-enum-base">>, DefaultError; 1275ffd83dbSDimitry Andricdef ext_elaborated_enum_class : ExtWarn< 1285ffd83dbSDimitry Andric "reference to enumeration must use 'enum' not 'enum %select{struct|class}0'">, 1295ffd83dbSDimitry Andric InGroup<DiagGroup<"elaborated-enum-class">>, DefaultError; 1305ffd83dbSDimitry Andricdef err_scoped_enum_missing_identifier : Error< 1315ffd83dbSDimitry Andric "scoped enumeration requires a name">; 1325ffd83dbSDimitry Andricdef ext_scoped_enum : ExtWarn< 1335ffd83dbSDimitry Andric "scoped enumerations are a C++11 extension">, InGroup<CXX11>; 1345ffd83dbSDimitry Andricdef warn_cxx98_compat_scoped_enum : Warning< 1355ffd83dbSDimitry Andric "scoped enumerations are incompatible with C++98">, 1365ffd83dbSDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 1375ffd83dbSDimitry Andricdef err_anonymous_enum_bitfield : Error< 1385ffd83dbSDimitry Andric "ISO C++ only allows ':' in member enumeration declaration to introduce " 1395ffd83dbSDimitry Andric "a fixed underlying type, not an anonymous bit-field">; 1405ffd83dbSDimitry Andric 1410b57cec5SDimitry Andricdef warn_cxx98_compat_alignof : Warning< 1420b57cec5SDimitry Andric "alignof expressions are incompatible with C++98">, 1430b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 1440b57cec5SDimitry Andricdef ext_alignof_expr : ExtWarn< 1450b57cec5SDimitry Andric "%0 applied to an expression is a GNU extension">, InGroup<GNUAlignofExpression>; 1460b57cec5SDimitry Andricdef err_lambda_after_delete : Error< 1470b57cec5SDimitry Andric "'[]' after delete interpreted as 'delete[]'; add parentheses to treat this as a lambda-expression">; 1480b57cec5SDimitry Andric 1490b57cec5SDimitry Andricdef warn_microsoft_dependent_exists : Warning< 1500b57cec5SDimitry Andric "dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">, 1510b57cec5SDimitry Andric InGroup<DiagGroup<"microsoft-exists">>; 1520b57cec5SDimitry Andricdef warn_microsoft_qualifiers_ignored : Warning< 1530b57cec5SDimitry Andric "qualifiers after comma in declarator list are ignored">, 1540b57cec5SDimitry Andric InGroup<IgnoredAttributes>; 1550b57cec5SDimitry Andric 1560b57cec5SDimitry Andricdef err_duplicate_default_assoc : Error< 1570b57cec5SDimitry Andric "duplicate default generic association">; 1580b57cec5SDimitry Andricdef note_previous_default_assoc : Note< 1590b57cec5SDimitry Andric "previous default generic association is here">; 16006c3fb27SDimitry Andricdef ext_generic_with_type_arg : Extension< 16106c3fb27SDimitry Andric "passing a type argument as the first operand to '_Generic' is a Clang " 16206c3fb27SDimitry Andric "extension">, InGroup<DiagGroup<"generic-type-extension">>; 1630b57cec5SDimitry Andric 164a7dea167SDimitry Andricdef ext_c99_feature : Extension< 165a7dea167SDimitry Andric "'%0' is a C99 extension">, InGroup<C99>; 166a7dea167SDimitry Andricdef ext_c11_feature : Extension< 167a7dea167SDimitry Andric "'%0' is a C11 extension">, InGroup<C11>; 1685f757f3fSDimitry Andricdef warn_c23_compat_keyword : Warning< 1695f757f3fSDimitry Andric "'%0' is incompatible with C standards before C23">, 1705f757f3fSDimitry Andric InGroup<CPre23Compat>, DefaultIgnore; 1710b57cec5SDimitry Andric 1720b57cec5SDimitry Andricdef err_c11_noreturn_misplaced : Error< 1730b57cec5SDimitry Andric "'_Noreturn' keyword must precede function declarator">; 1740b57cec5SDimitry Andric 1750b57cec5SDimitry Andricdef ext_gnu_indirect_goto : Extension< 1760b57cec5SDimitry Andric "use of GNU indirect-goto extension">, InGroup<GNULabelsAsValue>; 1770b57cec5SDimitry Andricdef ext_gnu_address_of_label : Extension< 1780b57cec5SDimitry Andric "use of GNU address-of-label extension">, InGroup<GNULabelsAsValue>; 1790b57cec5SDimitry Andricdef err_stmtexpr_file_scope : Error< 1800b57cec5SDimitry Andric "statement expression not allowed at file scope">; 1810b57cec5SDimitry Andricdef ext_gnu_statement_expr : Extension< 1820b57cec5SDimitry Andric "use of GNU statement expression extension">, InGroup<GNUStatementExpression>; 18381ad6265SDimitry Andricdef ext_gnu_statement_expr_macro : Extension< 18481ad6265SDimitry Andric "use of GNU statement expression extension from macro expansion">, 18581ad6265SDimitry Andric InGroup<GNUStatementExpressionFromMacroExpansion>; 1860b57cec5SDimitry Andricdef ext_gnu_conditional_expr : Extension< 1870b57cec5SDimitry Andric "use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>; 1880b57cec5SDimitry Andricdef ext_gnu_array_range : Extension<"use of GNU array range extension">, 1890b57cec5SDimitry Andric InGroup<GNUDesignator>; 1900b57cec5SDimitry Andricdef ext_gnu_missing_equal_designator : ExtWarn< 1910b57cec5SDimitry Andric "use of GNU 'missing =' extension in designator">, 1920b57cec5SDimitry Andric InGroup<GNUDesignator>; 1930b57cec5SDimitry Andricdef err_expected_equal_designator : Error<"expected '=' or another designator">; 1940b57cec5SDimitry Andricdef ext_gnu_old_style_field_designator : ExtWarn< 1950b57cec5SDimitry Andric "use of GNU old-style field designator extension">, 1960b57cec5SDimitry Andric InGroup<GNUDesignator>; 1970b57cec5SDimitry Andricdef ext_gnu_case_range : Extension<"use of GNU case range extension">, 1980b57cec5SDimitry Andric InGroup<GNUCaseRange>; 1990b57cec5SDimitry Andric 2000b57cec5SDimitry Andric// Generic errors. 2010b57cec5SDimitry Andricdef err_expected_expression : Error<"expected expression">; 2020b57cec5SDimitry Andricdef err_expected_type : Error<"expected a type">; 2030b57cec5SDimitry Andricdef err_expected_external_declaration : Error<"expected external declaration">; 2040b57cec5SDimitry Andricdef err_extraneous_closing_brace : Error<"extraneous closing brace ('}')">; 2050b57cec5SDimitry Andricdef err_expected_semi_declaration : Error< 2060b57cec5SDimitry Andric "expected ';' at end of declaration">; 2070b57cec5SDimitry Andricdef err_expected_semi_decl_list : Error< 2080b57cec5SDimitry Andric "expected ';' at end of declaration list">; 2090b57cec5SDimitry Andricdef ext_expected_semi_decl_list : ExtWarn< 2100b57cec5SDimitry Andric "expected ';' at end of declaration list">; 2110b57cec5SDimitry Andricdef err_expected_member_name_or_semi : Error< 2120b57cec5SDimitry Andric "expected member name or ';' after declaration specifiers">; 2130b57cec5SDimitry Andricdef err_function_declared_typedef : Error< 2140b57cec5SDimitry Andric "function definition declared 'typedef'">; 2150b57cec5SDimitry Andricdef err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">; 2160b57cec5SDimitry Andricdef err_at_in_class : Error<"unexpected '@' in member specification">; 2170b57cec5SDimitry Andricdef err_unexpected_semi : Error<"unexpected ';' before %0">; 2185ffd83dbSDimitry Andricdef err_postfix_after_unary_requires_parens : Error< 2195ffd83dbSDimitry Andric "expression cannot be followed by a postfix %0 operator; add parentheses">; 220480093f4SDimitry Andricdef err_unparenthesized_non_primary_expr_in_requires_clause : Error< 221480093f4SDimitry Andric "parentheses are required around this expression in a requires clause">; 222480093f4SDimitry Andricdef note_unparenthesized_non_primary_expr_in_requires_clause : Note< 223480093f4SDimitry Andric "parentheses are required around this expression in a requires clause">; 2240b57cec5SDimitry Andric 2250b57cec5SDimitry Andricdef err_expected_fn_body : Error< 2260b57cec5SDimitry Andric "expected function body after function declarator">; 2270b57cec5SDimitry Andricdef warn_attribute_on_function_definition : Warning< 2280b57cec5SDimitry Andric "GCC does not allow %0 attribute in this position on a function definition">, 2290b57cec5SDimitry Andric InGroup<GccCompat>; 2300b57cec5SDimitry Andricdef warn_gcc_attribute_location : Warning< 2310b57cec5SDimitry Andric "GCC does not allow an attribute in this position on a function declaration">, 2320b57cec5SDimitry Andric InGroup<GccCompat>; 2330b57cec5SDimitry Andricdef warn_gcc_variable_decl_in_for_loop : Warning< 2340b57cec5SDimitry Andric "GCC does not allow variable declarations in for loop initializers before " 2350b57cec5SDimitry Andric "C99">, InGroup<GccCompat>; 2360b57cec5SDimitry Andricdef warn_attribute_no_decl : Warning< 2370b57cec5SDimitry Andric "attribute %0 ignored, because it is not attached to a declaration">, 2380b57cec5SDimitry Andric InGroup<IgnoredAttributes>; 2390b57cec5SDimitry Andricdef err_ms_attributes_not_enabled : Error< 2400b57cec5SDimitry Andric "'__declspec' attributes are not enabled; use '-fdeclspec' or " 2410b57cec5SDimitry Andric "'-fms-extensions' to enable support for __declspec attributes">; 2420b57cec5SDimitry Andricdef err_expected_method_body : Error<"expected method body">; 2430b57cec5SDimitry Andricdef err_declspec_after_virtspec : Error< 2440b57cec5SDimitry Andric "'%0' qualifier may not appear after the virtual specifier '%1'">; 2450b57cec5SDimitry Andricdef err_invalid_token_after_toplevel_declarator : Error< 2460b57cec5SDimitry Andric "expected ';' after top level declarator">; 2470b57cec5SDimitry Andricdef err_invalid_token_after_declarator_suggest_equal : Error< 2480b57cec5SDimitry Andric "invalid %0 at end of declaration; did you mean '='?">; 2490b57cec5SDimitry Andricdef err_expected_statement : Error<"expected statement">; 2500b57cec5SDimitry Andricdef err_expected_lparen_after : Error<"expected '(' after '%0'">; 2510b57cec5SDimitry Andricdef err_expected_rparen_after : Error<"expected ')' after '%0'">; 2520b57cec5SDimitry Andricdef err_expected_punc : Error<"expected ')' or ',' after '%0'">; 2530b57cec5SDimitry Andricdef err_expected_less_after : Error<"expected '<' after '%0'">; 2540b57cec5SDimitry Andricdef err_expected_lbrace_in_compound_literal : Error< 2550b57cec5SDimitry Andric "expected '{' in compound literal">; 2560b57cec5SDimitry Andricdef err_expected_while : Error<"expected 'while' in do/while loop">; 2570b57cec5SDimitry Andric 2580b57cec5SDimitry Andricdef err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">; 2590b57cec5SDimitry Andricdef err_expected_semi_after_expr : Error<"expected ';' after expression">; 2600b57cec5SDimitry Andricdef err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">; 2610b57cec5SDimitry Andric 2620b57cec5SDimitry Andricdef err_expected_semi_after_method_proto : Error< 2630b57cec5SDimitry Andric "expected ';' after method prototype">; 2640b57cec5SDimitry Andricdef err_expected_semi_after_namespace_name : Error< 2650b57cec5SDimitry Andric "expected ';' after namespace name">; 2660b57cec5SDimitry Andricdef err_unexpected_namespace_attributes_alias : Error< 2670b57cec5SDimitry Andric "attributes cannot be specified on namespace alias">; 2680b57cec5SDimitry Andricdef err_unexpected_nested_namespace_attribute : Error< 2690b57cec5SDimitry Andric "attributes cannot be specified on a nested namespace definition">; 2700b57cec5SDimitry Andricdef err_inline_namespace_alias : Error<"namespace alias cannot be inline">; 2710b57cec5SDimitry Andricdef err_namespace_nonnamespace_scope : Error< 2720b57cec5SDimitry Andric "namespaces can only be defined in global or namespace scope">; 2730b57cec5SDimitry Andricdef ext_nested_namespace_definition : ExtWarn< 2740b57cec5SDimitry Andric "nested namespace definition is a C++17 extension; " 2750b57cec5SDimitry Andric "define each namespace separately">, InGroup<CXX17>; 2760b57cec5SDimitry Andricdef warn_cxx14_compat_nested_namespace_definition : Warning< 2770b57cec5SDimitry Andric "nested namespace definition is incompatible with C++ standards before C++17">, 2780b57cec5SDimitry Andric InGroup<CXXPre17Compat>, DefaultIgnore; 2790b57cec5SDimitry Andricdef ext_inline_nested_namespace_definition : ExtWarn< 28047395794SDimitry Andric "inline nested namespace definition is a C++20 extension">, InGroup<CXX20>; 2810b57cec5SDimitry Andricdef warn_cxx17_compat_inline_nested_namespace_definition : Warning< 2820b57cec5SDimitry Andric "inline nested namespace definition is incompatible with C++ standards before" 28347395794SDimitry Andric " C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; 2840b57cec5SDimitry Andricdef err_inline_nested_namespace_definition : Error< 2850b57cec5SDimitry Andric "nested namespace definition cannot be 'inline'">; 2860b57cec5SDimitry Andricdef err_expected_semi_after_attribute_list : Error< 2870b57cec5SDimitry Andric "expected ';' after attribute list">; 2880b57cec5SDimitry Andricdef err_expected_semi_after_static_assert : Error< 289972a253aSDimitry Andric "expected ';' after '%0'">; 2900b57cec5SDimitry Andricdef err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">; 2910b57cec5SDimitry Andricdef err_single_decl_assign_in_for_range : Error< 2920b57cec5SDimitry Andric "range-based 'for' statement uses ':', not '='">; 2930b57cec5SDimitry Andricdef warn_missing_selector_name : Warning< 2940b57cec5SDimitry Andric "%0 used as the name of the previous parameter rather than as part " 2950b57cec5SDimitry Andric "of the selector">, 2960b57cec5SDimitry Andric InGroup<DiagGroup<"missing-selector-name">>; 2970b57cec5SDimitry Andricdef note_missing_selector_name : Note< 2980b57cec5SDimitry Andric "introduce a parameter name to make %0 part of the selector">; 2990b57cec5SDimitry Andricdef note_force_empty_selector_name : Note< 3000b57cec5SDimitry Andric "or insert whitespace before ':' to use %0 as parameter name " 3010b57cec5SDimitry Andric "and have an empty entry in the selector">; 3025f757f3fSDimitry Andricdef ext_c_label_followed_by_declaration : ExtWarn< 3035f757f3fSDimitry Andric "label followed by a declaration is a C23 extension">, 3045f757f3fSDimitry Andric InGroup<C23>; 3055f757f3fSDimitry Andricdef warn_c23_compat_label_followed_by_declaration : Warning< 3065f757f3fSDimitry Andric "label followed by a declaration is incompatible with C standards before " 3075f757f3fSDimitry Andric "C23">, InGroup<CPre23Compat>, DefaultIgnore; 308bdd1243dSDimitry Andricdef ext_c_label_end_of_compound_statement : ExtWarn< 3095f757f3fSDimitry Andric "label at end of compound statement is a C23 extension">, 3105f757f3fSDimitry Andric InGroup<C23>; 311bdd1243dSDimitry Andricdef ext_cxx_label_end_of_compound_statement : ExtWarn< 31206c3fb27SDimitry Andric "label at end of compound statement is a C++23 extension">, 31306c3fb27SDimitry Andric InGroup<CXX23>; 3145f757f3fSDimitry Andricdef warn_c23_compat_label_end_of_compound_statement : Warning< 3155f757f3fSDimitry Andric "label at end of compound statement is incompatible with C standards before C23">, 3165f757f3fSDimitry Andric InGroup<CPre23Compat>, DefaultIgnore; 317bdd1243dSDimitry Andricdef warn_cxx20_compat_label_end_of_compound_statement : Warning< 31806c3fb27SDimitry Andric "label at end of compound statement is incompatible with C++ standards before C++23">, 31906c3fb27SDimitry Andric InGroup<CXXPre23Compat>, DefaultIgnore; 3200b57cec5SDimitry Andricdef err_address_of_label_outside_fn : Error< 3210b57cec5SDimitry Andric "use of address-of-label extension outside of a function body">; 3220b57cec5SDimitry Andricdef err_asm_operand_wide_string_literal : Error< 323480093f4SDimitry Andric "cannot use %select{unicode|wide|an empty}0 string literal in 'asm'">; 3240b57cec5SDimitry Andricdef err_expected_selector_for_method : Error< 3250b57cec5SDimitry Andric "expected selector for Objective-C method">; 3260b57cec5SDimitry Andricdef err_expected_property_name : Error<"expected property name">; 3270b57cec5SDimitry Andric 3280b57cec5SDimitry Andricdef err_unexpected_at : Error<"unexpected '@' in program">; 3290b57cec5SDimitry Andricdef err_atimport : Error< 3300b57cec5SDimitry Andric"use of '@import' when modules are disabled">; 3310b57cec5SDimitry Andric 3320b57cec5SDimitry Andricdef warn_atimport_in_framework_header : Warning< 3330b57cec5SDimitry Andric "use of '@import' in framework header is discouraged, " 3340b57cec5SDimitry Andric "including this header requires -fmodules">, 3350b57cec5SDimitry Andric InGroup<FrameworkHdrAtImport>; 3360b57cec5SDimitry Andric 3370b57cec5SDimitry Andricdef err_invalid_reference_qualifier_application : Error< 3380b57cec5SDimitry Andric "'%0' qualifier may not be applied to a reference">; 3390b57cec5SDimitry Andricdef err_illegal_decl_reference_to_reference : Error< 3400b57cec5SDimitry Andric "%0 declared as a reference to a reference">; 3410b57cec5SDimitry Andricdef ext_rvalue_reference : ExtWarn< 3420b57cec5SDimitry Andric "rvalue references are a C++11 extension">, InGroup<CXX11>; 3430b57cec5SDimitry Andricdef warn_cxx98_compat_rvalue_reference : Warning< 3440b57cec5SDimitry Andric "rvalue references are incompatible with C++98">, 3450b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 3460b57cec5SDimitry Andricdef ext_ref_qualifier : ExtWarn< 3470b57cec5SDimitry Andric "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>; 3480b57cec5SDimitry Andricdef warn_cxx98_compat_ref_qualifier : Warning< 3490b57cec5SDimitry Andric "reference qualifiers on functions are incompatible with C++98">, 3500b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 3510b57cec5SDimitry Andricdef ext_inline_namespace : ExtWarn< 3520b57cec5SDimitry Andric "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>; 3530b57cec5SDimitry Andricdef warn_cxx98_compat_inline_namespace : Warning< 3540b57cec5SDimitry Andric "inline namespaces are incompatible with C++98">, 3550b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 3560b57cec5SDimitry Andricdef ext_generalized_initializer_lists : ExtWarn< 3570b57cec5SDimitry Andric "generalized initializer lists are a C++11 extension">, 3580b57cec5SDimitry Andric InGroup<CXX11>; 3590b57cec5SDimitry Andricdef warn_cxx98_compat_generalized_initializer_lists : Warning< 3600b57cec5SDimitry Andric "generalized initializer lists are incompatible with C++98">, 3610b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 3620b57cec5SDimitry Andricdef err_init_list_bin_op : Error<"initializer list cannot be used on the " 3630b57cec5SDimitry Andric "%select{left|right}0 hand side of operator '%1'">; 3640b57cec5SDimitry Andricdef warn_cxx98_compat_trailing_return_type : Warning< 3650b57cec5SDimitry Andric "trailing return types are incompatible with C++98">, 3660b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 367480093f4SDimitry Andricdef err_requires_clause_must_appear_after_trailing_return : Error< 368480093f4SDimitry Andric "trailing return type must appear before trailing requires clause">; 369480093f4SDimitry Andricdef err_requires_clause_on_declarator_not_declaring_a_function : Error< 370480093f4SDimitry Andric "trailing requires clause can only be used when declaring a function">; 371480093f4SDimitry Andricdef err_requires_clause_inside_parens : Error< 372480093f4SDimitry Andric "trailing requires clause should be placed outside parentheses">; 3730b57cec5SDimitry Andricdef ext_auto_storage_class : ExtWarn< 3740b57cec5SDimitry Andric "'auto' storage class specifier is not permitted in C++11, and will not " 3750b57cec5SDimitry Andric "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>; 3760b57cec5SDimitry Andricdef ext_decltype_auto_type_specifier : ExtWarn< 3770b57cec5SDimitry Andric "'decltype(auto)' type specifier is a C++14 extension">, InGroup<CXX14>; 3780b57cec5SDimitry Andricdef warn_cxx11_compat_decltype_auto_type_specifier : Warning< 3790b57cec5SDimitry Andric "'decltype(auto)' type specifier is incompatible with C++ standards before " 3800b57cec5SDimitry Andric "C++14">, InGroup<CXXPre14Compat>, DefaultIgnore; 3810b57cec5SDimitry Andricdef ext_auto_type : Extension< 3820b57cec5SDimitry Andric "'__auto_type' is a GNU extension">, 3830b57cec5SDimitry Andric InGroup<GNUAutoType>; 3840b57cec5SDimitry Andricdef ext_for_range : ExtWarn< 3850b57cec5SDimitry Andric "range-based for loop is a C++11 extension">, InGroup<CXX11>; 3860b57cec5SDimitry Andricdef warn_cxx98_compat_for_range : Warning< 3870b57cec5SDimitry Andric "range-based for loop is incompatible with C++98">, 3880b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 3890b57cec5SDimitry Andricdef err_for_range_identifier : Error< 3900b57cec5SDimitry Andric "range-based for loop requires type for loop variable">; 3910b57cec5SDimitry Andricdef err_for_range_expected_decl : Error< 3920b57cec5SDimitry Andric "for range declaration must declare a variable">; 3930b57cec5SDimitry Andricdef err_argument_required_after_attribute : Error< 3940b57cec5SDimitry Andric "argument required after attribute">; 3950b57cec5SDimitry Andricdef err_missing_param : Error<"expected parameter declarator">; 396480093f4SDimitry Andricdef err_function_scope_depth_exceeded : Error< 397480093f4SDimitry Andric "function scope depth exceeded maximum of %0">, DefaultFatal; 3980b57cec5SDimitry Andricdef err_missing_comma_before_ellipsis : Error< 3990b57cec5SDimitry Andric "C requires a comma prior to the ellipsis in a variadic function type">; 4000b57cec5SDimitry Andricdef err_unexpected_typedef_ident : Error< 4010b57cec5SDimitry Andric "unexpected type name %0: expected identifier">; 4020b57cec5SDimitry Andricdef warn_cxx98_compat_decltype : Warning< 4030b57cec5SDimitry Andric "'decltype' type specifier is incompatible with C++98">, 4040b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 4050b57cec5SDimitry Andricdef err_unexpected_scope_on_base_decltype : Error< 4060b57cec5SDimitry Andric "unexpected namespace scope prior to decltype">; 4070b57cec5SDimitry Andricdef err_expected_class_name : Error<"expected class name">; 4080b57cec5SDimitry Andricdef err_expected_class_name_not_template : 4090b57cec5SDimitry Andric Error<"'typename' is redundant; base classes are implicitly types">; 4100b57cec5SDimitry Andricdef err_unspecified_vla_size_with_static : Error< 4110b57cec5SDimitry Andric "'static' may not be used with an unspecified variable length array size">; 4120b57cec5SDimitry Andricdef err_unspecified_size_with_static : Error< 4130b57cec5SDimitry Andric "'static' may not be used without an array size">; 4140b57cec5SDimitry Andricdef err_expected_parentheses_around_typename : Error< 4150b57cec5SDimitry Andric "expected parentheses around type name in %0 expression">; 4160b57cec5SDimitry Andric 4170b57cec5SDimitry Andricdef err_expected_case_before_expression: Error< 4180b57cec5SDimitry Andric "expected 'case' keyword before expression">; 4190b57cec5SDimitry Andric 4200b57cec5SDimitry Andricdef ext_warn_gnu_final : ExtWarn< 4210b57cec5SDimitry Andric "__final is a GNU extension, consider using C++11 final">, 4220b57cec5SDimitry Andric InGroup<GccCompat>; 4230b57cec5SDimitry Andric 4240b57cec5SDimitry Andric// Declarations. 4250b57cec5SDimitry Andricdef err_typename_requires_specqual : Error< 4260b57cec5SDimitry Andric "type name requires a specifier or qualifier">; 4270b57cec5SDimitry Andricdef err_typename_invalid_storageclass : Error< 4280b57cec5SDimitry Andric "type name does not allow storage class to be specified">; 4290b57cec5SDimitry Andricdef err_typename_invalid_functionspec : Error< 4300b57cec5SDimitry Andric "type name does not allow function specifier to be specified">; 4310b57cec5SDimitry Andricdef err_typename_invalid_constexpr : Error< 432a7dea167SDimitry Andric "type name does not allow %sub{select_constexpr_spec_kind}0 specifier " 433a7dea167SDimitry Andric "to be specified">; 4340b57cec5SDimitry Andricdef err_typename_identifiers_only : Error< 4350b57cec5SDimitry Andric "typename is allowed for identifiers only">; 4360b57cec5SDimitry Andric 4370b57cec5SDimitry Andricdef err_friend_invalid_in_context : Error< 4380b57cec5SDimitry Andric "'friend' used outside of class">; 4390b57cec5SDimitry Andricdef err_templated_using_directive_declaration : Error< 4400b57cec5SDimitry Andric "cannot template a using %select{directive|declaration}0">; 4410b57cec5SDimitry Andricdef err_unexpected_colon_in_nested_name_spec : Error< 4420b57cec5SDimitry Andric "unexpected ':' in nested name specifier; did you mean '::'?">; 4430b57cec5SDimitry Andricdef err_unexpected_token_in_nested_name_spec : Error< 4440b57cec5SDimitry Andric "'%0' cannot be a part of nested name specifier; did you mean ':'?">; 4450b57cec5SDimitry Andricdef err_bool_redeclaration : Error< 4460b57cec5SDimitry Andric "redeclaration of C++ built-in type 'bool'">; 4470b57cec5SDimitry Andricdef warn_cxx98_compat_static_assert : Warning< 448972a253aSDimitry Andric "'static_assert' declarations are incompatible with C++98">, 4490b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 450fe6060f1SDimitry Andricdef ext_ms_static_assert : ExtWarn< 451fe6060f1SDimitry Andric "use of 'static_assert' without inclusion of <assert.h> is a Microsoft " 452fe6060f1SDimitry Andric "extension">, InGroup<MicrosoftStaticAssert>; 453fe6060f1SDimitry Andricdef ext_cxx_static_assert_no_message : ExtWarn< 454fe6060f1SDimitry Andric "'static_assert' with no message is a C++17 extension">, InGroup<CXX17>; 455fe6060f1SDimitry Andricdef ext_c_static_assert_no_message : ExtWarn< 4565f757f3fSDimitry Andric "'_Static_assert' with no message is a C23 extension">, InGroup<C23>; 4570b57cec5SDimitry Andricdef warn_cxx14_compat_static_assert_no_message : Warning< 458fe6060f1SDimitry Andric "'static_assert' with no message is incompatible with C++ standards before " 4590b57cec5SDimitry Andric "C++17">, 4600b57cec5SDimitry Andric DefaultIgnore, InGroup<CXXPre17Compat>; 461fe6060f1SDimitry Andricdef warn_c17_compat_static_assert_no_message : Warning< 462fe6060f1SDimitry Andric "'_Static_assert' with no message is incompatible with C standards before " 4635f757f3fSDimitry Andric "C23">, 4645f757f3fSDimitry Andric DefaultIgnore, InGroup<CPre23Compat>; 4650b57cec5SDimitry Andricdef err_function_definition_not_allowed : Error< 4660b57cec5SDimitry Andric "function definition is not allowed here">; 4670b57cec5SDimitry Andricdef err_expected_end_of_enumerator : Error< 4680b57cec5SDimitry Andric "expected '= constant-expression' or end of enumerator definition">; 4690b57cec5SDimitry Andricdef err_expected_coloncolon_after_super : Error< 4700b57cec5SDimitry Andric "expected '::' after '__super'">; 4710b57cec5SDimitry Andric 4720b57cec5SDimitry Andricdef ext_decomp_decl_empty : ExtWarn< 4730b57cec5SDimitry Andric "ISO C++17 does not allow a decomposition group to be empty">, 4740b57cec5SDimitry Andric InGroup<DiagGroup<"empty-decomposition">>; 4750b57cec5SDimitry Andric 4760b57cec5SDimitry Andric/// Objective-C parser diagnostics 4770b57cec5SDimitry Andricdef err_expected_minus_or_plus : Error< 4780b57cec5SDimitry Andric "method type specifier must start with '-' or '+'">; 4790b57cec5SDimitry Andricdef err_objc_missing_end : Error<"missing '@end'">; 4800b57cec5SDimitry Andricdef note_objc_container_start : Note< 4810b57cec5SDimitry Andric "%select{class|protocol|category|class extension|implementation" 4820b57cec5SDimitry Andric "|category implementation}0 started here">; 4830b57cec5SDimitry Andricdef warn_objc_protocol_qualifier_missing_id : Warning< 4840b57cec5SDimitry Andric "protocol has no object type specified; defaults to qualified 'id'">; 4850b57cec5SDimitry Andricdef err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">; 4860b57cec5SDimitry Andricdef err_illegal_super_cast : Error< 4870b57cec5SDimitry Andric "cannot cast 'super' (it isn't an expression)">; 4880b57cec5SDimitry Andricdef err_nsnumber_nonliteral_unary : Error< 4890b57cec5SDimitry Andric "@%0 must be followed by a number to form an NSNumber object">; 4900b57cec5SDimitry Andricdef warn_cstyle_param : Warning< 4910b57cec5SDimitry Andric "use of C-style parameters in Objective-C method declarations" 4920b57cec5SDimitry Andric " is deprecated">, InGroup<DeprecatedDeclarations>; 4930b57cec5SDimitry Andric 4940b57cec5SDimitry Andriclet CategoryName = "ARC Parse Issue" in { 4950b57cec5SDimitry Andricdef err_arc_bridge_retain : Error< 4960b57cec5SDimitry Andric "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">; 4970b57cec5SDimitry Andric// To be default mapped to an error later. 4980b57cec5SDimitry Andricdef warn_arc_bridge_cast_nonarc : Warning< 4990b57cec5SDimitry Andric "'%0' casts have no effect when not using ARC">, 5000b57cec5SDimitry Andric InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>; 5010b57cec5SDimitry Andric} 5020b57cec5SDimitry Andric 5030b57cec5SDimitry Andricdef err_objc_illegal_visibility_spec : Error< 5040b57cec5SDimitry Andric "illegal visibility specification">; 5050b57cec5SDimitry Andricdef err_objc_illegal_interface_qual : Error<"illegal interface qualifier">; 5060b57cec5SDimitry Andricdef err_objc_expected_equal_for_getter : Error< 5070b57cec5SDimitry Andric "expected '=' for Objective-C getter">; 5080b57cec5SDimitry Andricdef err_objc_expected_equal_for_setter : Error< 5090b57cec5SDimitry Andric "expected '=' for Objective-C setter">; 5100b57cec5SDimitry Andricdef err_objc_expected_selector_for_getter_setter : Error< 5110b57cec5SDimitry Andric "expected selector for Objective-C %select{setter|getter}0">; 5120b57cec5SDimitry Andricdef err_objc_property_requires_field_name : Error< 5130b57cec5SDimitry Andric "property requires fields to be named">; 5140b57cec5SDimitry Andricdef err_objc_property_bitfield : Error<"property name cannot be a bit-field">; 5150b57cec5SDimitry Andricdef err_objc_expected_property_attr : Error<"unknown property attribute %0">; 5160b57cec5SDimitry Andricdef err_objc_unexpected_attr : Error< 5170b57cec5SDimitry Andric "prefix attribute must be followed by an interface, protocol, or implementation">; 5180b57cec5SDimitry Andricdef err_objc_postfix_attribute : Error < 5190b57cec5SDimitry Andric "postfix attributes are not allowed on Objective-C directives">; 5200b57cec5SDimitry Andricdef err_objc_postfix_attribute_hint : Error < 5210b57cec5SDimitry Andric "postfix attributes are not allowed on Objective-C directives, place" 5220b57cec5SDimitry Andric " them in front of '%select{@interface|@protocol}0'">; 5230b57cec5SDimitry Andricdef err_objc_directive_only_in_protocol : Error< 5240b57cec5SDimitry Andric "directive may only be specified in protocols only">; 5250b57cec5SDimitry Andricdef err_missing_catch_finally : Error< 5260b57cec5SDimitry Andric "@try statement without a @catch and @finally clause">; 5270b57cec5SDimitry Andricdef err_objc_concat_string : Error<"unexpected token after Objective-C string">; 5280b57cec5SDimitry Andricdef err_expected_objc_container : Error< 5290b57cec5SDimitry Andric "'@end' must appear in an Objective-C context">; 5300b57cec5SDimitry Andricdef err_unexpected_protocol_qualifier : Error< 5310b57cec5SDimitry Andric "@implementation declaration cannot be protocol qualified">; 5320b57cec5SDimitry Andricdef err_objc_unexpected_atend : Error< 5330b57cec5SDimitry Andric "'@end' appears where closing brace '}' is expected">; 5340b57cec5SDimitry Andricdef err_synthesized_property_name : Error< 5350b57cec5SDimitry Andric "expected a property name in @synthesize">; 5360b57cec5SDimitry Andricdef warn_semicolon_before_method_body : Warning< 5370b57cec5SDimitry Andric "semicolon before method body is ignored">, 5380b57cec5SDimitry Andric InGroup<SemiBeforeMethodBody>, DefaultIgnore; 5390b57cec5SDimitry Andricdef note_extra_comma_message_arg : Note< 5400b57cec5SDimitry Andric "comma separating Objective-C messaging arguments">; 5410b57cec5SDimitry Andric 5420b57cec5SDimitry Andricdef err_expected_field_designator : Error< 5430b57cec5SDimitry Andric "expected a field designator, such as '.field = 4'">; 5440b57cec5SDimitry Andric 5450b57cec5SDimitry Andricdef err_declaration_does_not_declare_param : Error< 5460b57cec5SDimitry Andric "declaration does not declare a parameter">; 5470b57cec5SDimitry Andricdef err_no_matching_param : Error<"parameter named %0 is missing">; 5480b57cec5SDimitry Andric 5490b57cec5SDimitry Andric/// Objective-C++ parser diagnostics 5500b57cec5SDimitry Andricdef err_expected_token_instead_of_objcxx_keyword : Error< 5510b57cec5SDimitry Andric "expected %0; %1 is a keyword in Objective-C++">; 5520b57cec5SDimitry Andricdef err_expected_member_name_or_semi_objcxx_keyword : Error< 5530b57cec5SDimitry Andric "expected member name or ';' after declaration specifiers; " 5540b57cec5SDimitry Andric "%0 is a keyword in Objective-C++">; 5550b57cec5SDimitry Andric 5560b57cec5SDimitry Andric/// C++ parser diagnostics 5570b57cec5SDimitry Andricdef err_invalid_operator_on_type : Error< 5580b57cec5SDimitry Andric "cannot use %select{dot|arrow}0 operator on a type">; 5590b57cec5SDimitry Andricdef err_expected_unqualified_id : Error< 5600b57cec5SDimitry Andric "expected %select{identifier|unqualified-id}0">; 561972a253aSDimitry Andricdef err_while_loop_outside_of_a_function : Error< 562972a253aSDimitry Andric "while loop outside of a function">; 5630b57cec5SDimitry Andricdef err_brackets_go_after_unqualified_id : Error< 5640b57cec5SDimitry Andric "brackets are not allowed here; to declare an array, " 5650b57cec5SDimitry Andric "place the brackets after the %select{identifier|name}0">; 5660b57cec5SDimitry Andricdef err_unexpected_unqualified_id : Error<"type-id cannot have a name">; 5670b57cec5SDimitry Andricdef err_func_def_no_params : Error< 5680b57cec5SDimitry Andric "function definition does not declare parameters">; 5690b57cec5SDimitry Andricdef err_expected_lparen_after_type : Error< 5700b57cec5SDimitry Andric "expected '(' for function-style cast or type construction">; 5710b57cec5SDimitry Andricdef err_expected_init_in_condition : Error< 5720b57cec5SDimitry Andric "variable declaration in condition must have an initializer">; 5730b57cec5SDimitry Andricdef err_expected_init_in_condition_lparen : Error< 5740b57cec5SDimitry Andric "variable declaration in condition cannot have a parenthesized initializer">; 5750b57cec5SDimitry Andricdef err_extraneous_rparen_in_condition : Error< 5760b57cec5SDimitry Andric "extraneous ')' after condition, expected a statement">; 577349cc55cSDimitry Andricdef ext_alias_in_init_statement : ExtWarn< 57806c3fb27SDimitry Andric "alias declaration in this context is a C++23 extension">, 57906c3fb27SDimitry Andric InGroup<CXX23>; 580349cc55cSDimitry Andricdef warn_cxx20_alias_in_init_statement : Warning< 58106c3fb27SDimitry Andric "alias declaration in this context is incompatible with C++ standards before C++23">, 58206c3fb27SDimitry Andric DefaultIgnore, InGroup<CXXPre23Compat>; 5830b57cec5SDimitry Andricdef warn_dangling_else : Warning< 5840b57cec5SDimitry Andric "add explicit braces to avoid dangling else">, 5850b57cec5SDimitry Andric InGroup<DanglingElse>; 5860b57cec5SDimitry Andricdef err_expected_member_or_base_name : Error< 5870b57cec5SDimitry Andric "expected class member or base class name">; 5880b57cec5SDimitry Andricdef err_expected_lbrace_after_base_specifiers : Error< 5890b57cec5SDimitry Andric "expected '{' after base class list">; 5900b57cec5SDimitry Andricdef err_missing_end_of_definition : Error< 5910b57cec5SDimitry Andric "missing '}' at end of definition of %q0">; 5920b57cec5SDimitry Andricdef note_missing_end_of_definition_before : Note< 5930b57cec5SDimitry Andric "still within definition of %q0 here">; 5940b57cec5SDimitry Andricdef ext_ellipsis_exception_spec : Extension< 5950b57cec5SDimitry Andric "exception specification of '...' is a Microsoft extension">, 5960b57cec5SDimitry Andric InGroup<MicrosoftExceptionSpec>; 5970b57cec5SDimitry Andricdef err_dynamic_and_noexcept_specification : Error< 5980b57cec5SDimitry Andric "cannot have both throw() and noexcept() clause on the same function">; 5990b57cec5SDimitry Andricdef err_except_spec_unparsed : Error< 6000b57cec5SDimitry Andric "unexpected end of exception specification">; 6010b57cec5SDimitry Andricdef ext_dynamic_exception_spec : ExtWarn< 6020b57cec5SDimitry Andric "ISO C++17 does not allow dynamic exception specifications">, 6030b57cec5SDimitry Andric InGroup<DynamicExceptionSpec>, DefaultError; 6040b57cec5SDimitry Andricdef warn_exception_spec_deprecated : Warning< 6050b57cec5SDimitry Andric "dynamic exception specifications are deprecated">, 6060b57cec5SDimitry Andric InGroup<DeprecatedDynamicExceptionSpec>, DefaultIgnore; 6070b57cec5SDimitry Andricdef note_exception_spec_deprecated : Note<"use '%0' instead">; 6080b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_decl : Warning< 6090b57cec5SDimitry Andric "noexcept specifications are incompatible with C++98">, 6100b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 6110b57cec5SDimitry Andricdef err_expected_catch : Error<"expected catch">; 6120b57cec5SDimitry Andricdef err_using_namespace_in_class : Error< 6130b57cec5SDimitry Andric "'using namespace' is not allowed in classes">; 614fe6060f1SDimitry Andricdef warn_cxx17_compat_using_enum_declaration : Warning< 615fe6060f1SDimitry Andric "using enum declaration is incompatible with C++ standards before C++20">, 616fe6060f1SDimitry Andric InGroup<CXXPre20Compat>, DefaultIgnore; 617fe6060f1SDimitry Andricdef ext_using_enum_declaration : ExtWarn< 618fe6060f1SDimitry Andric "using enum declaration is a C++20 extension">, 619fe6060f1SDimitry Andric InGroup<CXX20>; 620bdd1243dSDimitry Andricdef err_using_enum_expect_identifier : Error< 621bdd1243dSDimitry Andric "using enum %select{requires an enum or typedef name|" 622bdd1243dSDimitry Andric "does not permit an elaborated enum specifier}0">; 6230b57cec5SDimitry Andricdef err_constructor_bad_name : Error< 6240b57cec5SDimitry Andric "missing return type for function %0; did you mean the constructor name %1?">; 6250b57cec5SDimitry Andricdef err_destructor_tilde_identifier : Error< 6260b57cec5SDimitry Andric "expected a class name after '~' to name a destructor">; 6270b57cec5SDimitry Andricdef err_destructor_tilde_scope : Error< 6280b57cec5SDimitry Andric "'~' in destructor name should be after nested name specifier">; 6290b57cec5SDimitry Andricdef err_destructor_template_id : Error< 6300b57cec5SDimitry Andric "destructor name %0 does not refer to a template">; 6310b57cec5SDimitry Andricdef err_default_arg_unparsed : Error< 6320b57cec5SDimitry Andric "unexpected end of default argument expression">; 6330b57cec5SDimitry Andricdef err_bracket_depth_exceeded : Error< 6340b57cec5SDimitry Andric "bracket nesting level exceeded maximum of %0">, DefaultFatal; 6350b57cec5SDimitry Andricdef note_bracket_depth : Note< 6360b57cec5SDimitry Andric "use -fbracket-depth=N to increase maximum nesting level">; 6370b57cec5SDimitry Andricdef err_misplaced_ellipsis_in_declaration : Error< 6380b57cec5SDimitry Andric "'...' must %select{immediately precede declared identifier|" 6390b57cec5SDimitry Andric "be innermost component of anonymous pack declaration}0">; 6400b57cec5SDimitry Andricdef warn_misplaced_ellipsis_vararg : Warning< 6410b57cec5SDimitry Andric "'...' in this location creates a C-style varargs function" 6420b57cec5SDimitry Andric "%select{, not a function parameter pack|}0">, 6430b57cec5SDimitry Andric InGroup<DiagGroup<"ambiguous-ellipsis">>; 6440b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_existing_ellipsis : Note< 6450b57cec5SDimitry Andric "preceding '...' declares a function parameter pack">; 6460b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_ellipsis : Note< 6470b57cec5SDimitry Andric "place '...' %select{immediately before declared identifier|here}0 " 6480b57cec5SDimitry Andric "to declare a function parameter pack">; 6490b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_comma : Note< 6500b57cec5SDimitry Andric "insert ',' before '...' to silence this warning">; 6510b57cec5SDimitry Andricdef ext_abstract_pack_declarator_parens : ExtWarn< 6520b57cec5SDimitry Andric "ISO C++11 requires a parenthesized pack declaration to have a name">, 6530b57cec5SDimitry Andric InGroup<DiagGroup<"anonymous-pack-parens">>; 6540b57cec5SDimitry Andricdef err_function_is_not_record : Error< 6550b57cec5SDimitry Andric "unexpected %0 in function call; perhaps remove the %0?">; 6560b57cec5SDimitry Andricdef err_super_in_using_declaration : Error< 6570b57cec5SDimitry Andric "'__super' cannot be used with a using declaration">; 6580b57cec5SDimitry Andricdef ext_constexpr_if : ExtWarn< 6590b57cec5SDimitry Andric "constexpr if is a C++17 extension">, InGroup<CXX17>; 6600b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_if : Warning< 6610b57cec5SDimitry Andric "constexpr if is incompatible with C++ standards before C++17">, 6620b57cec5SDimitry Andric DefaultIgnore, InGroup<CXXPre17Compat>; 663349cc55cSDimitry Andricdef ext_consteval_if : ExtWarn< 66406c3fb27SDimitry Andric "consteval if is a C++23 extension">, 66506c3fb27SDimitry Andric InGroup<CXX23>; 666349cc55cSDimitry Andricdef warn_cxx20_compat_consteval_if : Warning< 66706c3fb27SDimitry Andric "consteval if is incompatible with C++ standards before C++23">, 66806c3fb27SDimitry Andric InGroup<CXXPre23Compat>, DefaultIgnore; 669349cc55cSDimitry Andric 6700b57cec5SDimitry Andricdef ext_init_statement : ExtWarn< 6710b57cec5SDimitry Andric "'%select{if|switch}0' initialization statements are a C++17 extension">, 6720b57cec5SDimitry Andric InGroup<CXX17>; 6730b57cec5SDimitry Andricdef warn_cxx14_compat_init_statement : Warning< 6740b57cec5SDimitry Andric "%select{if|switch}0 initialization statements are incompatible with " 6750b57cec5SDimitry Andric "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>; 6760b57cec5SDimitry Andricdef ext_for_range_init_stmt : ExtWarn< 67747395794SDimitry Andric "range-based for loop initialization statements are a C++20 extension">, 67847395794SDimitry Andric InGroup<CXX20>; 6790b57cec5SDimitry Andricdef warn_cxx17_compat_for_range_init_stmt : Warning< 6800b57cec5SDimitry Andric "range-based for loop initialization statements are incompatible with " 68147395794SDimitry Andric "C++ standards before C++20">, DefaultIgnore, InGroup<CXXPre20Compat>; 6820b57cec5SDimitry Andricdef warn_empty_init_statement : Warning< 6830b57cec5SDimitry Andric "empty initialization statement of '%select{if|switch|range-based for}0' " 6840b57cec5SDimitry Andric "has no effect">, InGroup<EmptyInitStatement>, DefaultIgnore; 6855ffd83dbSDimitry Andricdef err_keyword_as_parameter : Error < 6865ffd83dbSDimitry Andric "invalid parameter name: '%0' is a keyword">; 6870b57cec5SDimitry Andric 6880b57cec5SDimitry Andric// C++ derived classes 6890b57cec5SDimitry Andricdef err_dup_virtual : Error<"duplicate 'virtual' in base specifier">; 6900b57cec5SDimitry Andric 6910b57cec5SDimitry Andric// C++ operator overloading 6920b57cec5SDimitry Andricdef err_literal_operator_string_prefix : Error< 6930b57cec5SDimitry Andric "string literal after 'operator' cannot have an encoding prefix">; 6940b57cec5SDimitry Andricdef err_literal_operator_string_not_empty : Error< 6950b57cec5SDimitry Andric "string literal after 'operator' must be '\"\"'">; 6960b57cec5SDimitry Andricdef warn_cxx98_compat_literal_operator : Warning< 6970b57cec5SDimitry Andric "literal operators are incompatible with C++98">, 6980b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 6990b57cec5SDimitry Andric 7000b57cec5SDimitry Andric// Classes. 7010b57cec5SDimitry Andricdef err_anon_type_definition : Error< 7020b57cec5SDimitry Andric "declaration of anonymous %0 must be a definition">; 7030b57cec5SDimitry Andricdef err_default_delete_in_multiple_declaration : Error< 7040b57cec5SDimitry Andric "'= %select{default|delete}0' is a function definition and must occur in a " 7050b57cec5SDimitry Andric "standalone declaration">; 7060b57cec5SDimitry Andric 7070b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_expr : Warning< 7080b57cec5SDimitry Andric "noexcept expressions are incompatible with C++98">, 7090b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 7100b57cec5SDimitry Andricdef warn_cxx98_compat_nullptr : Warning< 7110b57cec5SDimitry Andric "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 712bdd1243dSDimitry Andricdef ext_c_nullptr : Extension< 7135f757f3fSDimitry Andric "'nullptr' is a C23 extension">, InGroup<C23>; 7140b57cec5SDimitry Andric 7150b57cec5SDimitry Andricdef warn_wrong_clang_attr_namespace : Warning< 7160b57cec5SDimitry Andric "'__clang__' is a predefined macro name, not an attribute scope specifier; " 7170b57cec5SDimitry Andric "did you mean '_Clang' instead?">, InGroup<IgnoredAttributes>; 7180b57cec5SDimitry Andricdef ext_ns_enum_attribute : Extension< 7190b57cec5SDimitry Andric "attributes on %select{a namespace|an enumerator}0 declaration are " 7200b57cec5SDimitry Andric "a C++17 extension">, InGroup<CXX17>; 7210b57cec5SDimitry Andricdef warn_cxx14_compat_ns_enum_attribute : Warning< 7220b57cec5SDimitry Andric "attributes on %select{a namespace|an enumerator}0 declaration are " 7230b57cec5SDimitry Andric "incompatible with C++ standards before C++17">, 7240b57cec5SDimitry Andric InGroup<CXXPre17CompatPedantic>, DefaultIgnore; 7250b57cec5SDimitry Andricdef warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">, 7260b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 7270b57cec5SDimitry Andricdef warn_cxx98_compat_attribute : Warning< 72806c3fb27SDimitry Andric "[[]] attributes are incompatible with C++ standards before C++11">, 7290b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 73006c3fb27SDimitry Andricdef warn_ext_cxx11_attributes : Extension< 73106c3fb27SDimitry Andric "[[]] attributes are a C++11 extension">, 73206c3fb27SDimitry Andric InGroup<CXX11>; 7335f757f3fSDimitry Andricdef warn_pre_c23_compat_attributes : Warning< 7345f757f3fSDimitry Andric "[[]] attributes are incompatible with C standards before C23">, 7355f757f3fSDimitry Andric DefaultIgnore, InGroup<CPre23Compat>; 7365f757f3fSDimitry Andricdef warn_ext_c23_attributes : Extension< 7375f757f3fSDimitry Andric "[[]] attributes are a C23 extension">, 7385f757f3fSDimitry Andric InGroup<C23>; 7390b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_arguments : Error< 7400b57cec5SDimitry Andric "attribute %0 cannot have an argument list">; 7410b57cec5SDimitry Andricdef err_attribute_requires_arguments : Error< 7420b57cec5SDimitry Andric "parentheses must be omitted if %0 attribute's argument list is empty">; 7430b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_ellipsis : Error< 7440b57cec5SDimitry Andric "attribute %0 cannot be used as an attribute pack">; 7450b57cec5SDimitry Andricdef warn_cxx14_compat_using_attribute_ns : Warning< 7460b57cec5SDimitry Andric "default scope specifier for attributes is incompatible with C++ standards " 7470b57cec5SDimitry Andric "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore; 7480b57cec5SDimitry Andricdef ext_using_attribute_ns : ExtWarn< 7490b57cec5SDimitry Andric "default scope specifier for attributes is a C++17 extension">, 7500b57cec5SDimitry Andric InGroup<CXX17>; 7510b57cec5SDimitry Andricdef err_using_attribute_ns_conflict : Error< 7520b57cec5SDimitry Andric "attribute with scope specifier cannot follow default scope specifier">; 7530b57cec5SDimitry Andricdef err_attributes_not_allowed : Error<"an attribute list cannot appear here">; 75406c3fb27SDimitry Andricdef err_keyword_not_allowed : Error<"%0 cannot appear here">; 755fe6060f1SDimitry Andricdef ext_cxx11_attr_placement : ExtWarn< 75606c3fb27SDimitry Andric "ISO C++ does not allow %select{an attribute list|%0}1 to appear here">, 757fe6060f1SDimitry Andric InGroup<DiagGroup<"cxx-attribute-extension">>; 7580b57cec5SDimitry Andricdef err_attributes_misplaced : Error<"misplaced attributes; expected attributes here">; 75906c3fb27SDimitry Andricdef err_keyword_misplaced : Error<"misplaced %0; expected %0 here">; 7600b57cec5SDimitry Andricdef err_l_square_l_square_not_attribute : Error< 7610b57cec5SDimitry Andric "C++11 only allows consecutive left square brackets when " 7620b57cec5SDimitry Andric "introducing an attribute">; 76381ad6265SDimitry Andricdef err_attribute_argument_parm_pack_not_supported : Error< 76481ad6265SDimitry Andric "attribute %0 does not support argument pack expansion">; 7650b57cec5SDimitry Andricdef err_ms_declspec_type : Error< 7660b57cec5SDimitry Andric "__declspec attributes must be an identifier or string literal">; 7670b57cec5SDimitry Andricdef err_ms_property_no_getter_or_putter : Error< 7680b57cec5SDimitry Andric "property does not specify a getter or a putter">; 7690b57cec5SDimitry Andricdef err_ms_property_unknown_accessor : Error< 7700b57cec5SDimitry Andric "expected 'get' or 'put' in property declaration">; 7710b57cec5SDimitry Andricdef err_ms_property_has_set_accessor : Error< 7720b57cec5SDimitry Andric "putter for property must be specified as 'put', not 'set'">; 7730b57cec5SDimitry Andricdef err_ms_property_missing_accessor_kind : Error< 7740b57cec5SDimitry Andric "missing 'get=' or 'put='">; 7750b57cec5SDimitry Andricdef err_ms_property_expected_equal : Error< 7760b57cec5SDimitry Andric "expected '=' after '%0'">; 7770b57cec5SDimitry Andricdef err_ms_property_duplicate_accessor : Error< 7780b57cec5SDimitry Andric "property declaration specifies '%0' accessor twice">; 7790b57cec5SDimitry Andricdef err_ms_property_expected_accessor_name : Error< 7800b57cec5SDimitry Andric "expected name of accessor method">; 7810b57cec5SDimitry Andricdef err_ms_property_expected_comma_or_rparen : Error< 7820b57cec5SDimitry Andric "expected ',' or ')' at end of property accessor list">; 7830b57cec5SDimitry Andricdef err_ms_property_initializer : Error< 784e8d8bef9SDimitry Andric "property declaration cannot have a default member initializer">; 7850b57cec5SDimitry Andric 7865ffd83dbSDimitry Andricdef warn_cxx20_compat_explicit_bool : Warning< 78747395794SDimitry Andric "this expression will be parsed as explicit(bool) in C++20">, 78847395794SDimitry Andric InGroup<CXX20Compat>, DefaultIgnore; 78955e4f9d5SDimitry Andricdef warn_cxx17_compat_explicit_bool : Warning< 79047395794SDimitry Andric "explicit(bool) is incompatible with C++ standards before C++20">, 79147395794SDimitry Andric InGroup<CXXPre20Compat>, DefaultIgnore; 79247395794SDimitry Andricdef ext_explicit_bool : ExtWarn<"explicit(bool) is a C++20 extension">, 79347395794SDimitry Andric InGroup<CXX20>; 79455e4f9d5SDimitry Andric 7950b57cec5SDimitry Andric/// C++ Templates 7960b57cec5SDimitry Andricdef err_expected_template : Error<"expected template">; 7970b57cec5SDimitry Andricdef err_unknown_template_name : Error< 7980b57cec5SDimitry Andric "unknown template name %0">; 7990b57cec5SDimitry Andricdef err_expected_comma_greater : Error< 8000b57cec5SDimitry Andric "expected ',' or '>' in template-parameter-list">; 801349cc55cSDimitry Andricdef err_class_on_template_template_param 802349cc55cSDimitry Andric : Error<"template template parameter requires 'class'%select{| or " 803349cc55cSDimitry Andric "'typename'}0 after the parameter list">; 8040b57cec5SDimitry Andricdef ext_template_template_param_typename : ExtWarn< 8050b57cec5SDimitry Andric "template template parameter using 'typename' is a C++17 extension">, 8060b57cec5SDimitry Andric InGroup<CXX17>; 8070b57cec5SDimitry Andricdef warn_cxx14_compat_template_template_param_typename : Warning< 8080b57cec5SDimitry Andric "template template parameter using 'typename' is " 8090b57cec5SDimitry Andric "incompatible with C++ standards before C++17">, 8100b57cec5SDimitry Andric InGroup<CXXPre17Compat>, DefaultIgnore; 8110b57cec5SDimitry Andricdef err_template_spec_syntax_non_template : Error< 8120b57cec5SDimitry Andric "identifier followed by '<' indicates a class template specialization but " 8130b57cec5SDimitry Andric "%0 %select{does not refer to a template|refers to a function template|" 814bdd1243dSDimitry Andric "<unused>|refers to a variable template|<unused>|<unused>|" 815bdd1243dSDimitry Andric "refers to a concept}1">; 8160b57cec5SDimitry Andricdef err_id_after_template_in_nested_name_spec : Error< 8170b57cec5SDimitry Andric "expected template name after 'template' keyword in nested name specifier">; 8180b57cec5SDimitry Andricdef err_unexpected_template_in_unqualified_id : Error< 8190b57cec5SDimitry Andric "'template' keyword not permitted here">; 8205ffd83dbSDimitry Andricdef err_unexpected_template_in_destructor_name : Error< 8215ffd83dbSDimitry Andric "'template' keyword not permitted in destructor name">; 8220b57cec5SDimitry Andricdef err_unexpected_template_after_using : Error< 8230b57cec5SDimitry Andric "'template' keyword not permitted after 'using' keyword">; 8240b57cec5SDimitry Andricdef err_two_right_angle_brackets_need_space : Error< 8250b57cec5SDimitry Andric "a space is required between consecutive right angle brackets (use '> >')">; 8260b57cec5SDimitry Andricdef err_right_angle_bracket_equal_needs_space : Error< 8270b57cec5SDimitry Andric "a space is required between a right angle bracket and an equals sign " 8280b57cec5SDimitry Andric "(use '> =')">; 8290b57cec5SDimitry Andricdef warn_cxx11_right_shift_in_template_arg : Warning< 8300b57cec5SDimitry Andric "use of right-shift operator ('>>') in template argument will require " 8310b57cec5SDimitry Andric "parentheses in C++11">, InGroup<CXX11Compat>; 8320b57cec5SDimitry Andricdef warn_cxx98_compat_two_right_angle_brackets : Warning< 8330b57cec5SDimitry Andric "consecutive right angle brackets are incompatible with C++98 (use '> >')">, 8340b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 8350b57cec5SDimitry Andricdef err_templated_invalid_declaration : Error< 8360b57cec5SDimitry Andric "a static_assert declaration cannot be a template">; 8370b57cec5SDimitry Andricdef err_multiple_template_declarators : Error< 8380b57cec5SDimitry Andric "%select{|a template declaration|an explicit template specialization|" 8390b57cec5SDimitry Andric "an explicit template instantiation}0 can " 8400b57cec5SDimitry Andric "only %select{|declare|declare|instantiate}0 a single entity">; 8410b57cec5SDimitry Andricdef err_explicit_instantiation_with_definition : Error< 8420b57cec5SDimitry Andric "explicit template instantiation cannot have a definition; if this " 8430b57cec5SDimitry Andric "definition is meant to be an explicit specialization, add '<>' after the " 8440b57cec5SDimitry Andric "'template' keyword">; 8450b57cec5SDimitry Andricdef err_template_defn_explicit_instantiation : Error< 8460b57cec5SDimitry Andric "%select{function|class|variable}0 cannot be defined in an explicit instantiation; if this " 8470b57cec5SDimitry Andric "declaration is meant to be a %select{function|class|variable}0 definition, remove the 'template' keyword">; 8480b57cec5SDimitry Andricdef err_friend_explicit_instantiation : Error< 8490b57cec5SDimitry Andric "friend cannot be declared in an explicit instantiation; if this " 8500b57cec5SDimitry Andric "declaration is meant to be a friend declaration, remove the 'template' keyword">; 8510b57cec5SDimitry Andricdef err_explicit_instantiation_enum : Error< 8520b57cec5SDimitry Andric "enumerations cannot be explicitly instantiated">; 8530b57cec5SDimitry Andricdef err_expected_template_parameter : Error<"expected template parameter">; 85455e4f9d5SDimitry Andricdef err_empty_requires_expr : Error< 85555e4f9d5SDimitry Andric "a requires expression must contain at least one requirement">; 85655e4f9d5SDimitry Andricdef err_requires_expr_parameter_list_ellipsis : Error< 85755e4f9d5SDimitry Andric "varargs not allowed in requires expression">; 85855e4f9d5SDimitry Andricdef err_expected_semi_requirement : Error< 85955e4f9d5SDimitry Andric "expected ';' at end of requirement">; 86055e4f9d5SDimitry Andricdef err_requires_expr_missing_arrow : Error< 86155e4f9d5SDimitry Andric "expected '->' before expression type requirement">; 86255e4f9d5SDimitry Andricdef err_requires_expr_expected_type_constraint : Error< 86355e4f9d5SDimitry Andric "expected concept name with optional arguments">; 86455e4f9d5SDimitry Andricdef err_requires_expr_simple_requirement_noexcept : Error< 86555e4f9d5SDimitry Andric "'noexcept' can only be used in a compound requirement (with '{' '}' around " 86655e4f9d5SDimitry Andric "the expression)">; 867349cc55cSDimitry Andricdef err_requires_expr_in_simple_requirement : Error< 868349cc55cSDimitry Andric "requires expression in requirement body; did " 86955e4f9d5SDimitry Andric "you intend to place it in a nested requirement? (add another 'requires' " 870349cc55cSDimitry Andric "before the expression)">; 8710b57cec5SDimitry Andric 8720b57cec5SDimitry Andricdef err_missing_dependent_template_keyword : Error< 8730b57cec5SDimitry Andric "use 'template' keyword to treat '%0' as a dependent template name">; 8740b57cec5SDimitry Andricdef warn_missing_dependent_template_keyword : ExtWarn< 8750b57cec5SDimitry Andric "use 'template' keyword to treat '%0' as a dependent template name">; 8760b57cec5SDimitry Andric 8770b57cec5SDimitry Andricdef ext_extern_template : Extension< 8780b57cec5SDimitry Andric "extern templates are a C++11 extension">, InGroup<CXX11>; 8790b57cec5SDimitry Andricdef warn_cxx98_compat_extern_template : Warning< 8800b57cec5SDimitry Andric "extern templates are incompatible with C++98">, 8810b57cec5SDimitry Andric InGroup<CXX98CompatPedantic>, DefaultIgnore; 8820b57cec5SDimitry Andricdef warn_static_inline_explicit_inst_ignored : Warning< 8830b57cec5SDimitry Andric "ignoring '%select{static|inline}0' keyword on explicit template " 8840b57cec5SDimitry Andric "instantiation">, InGroup<DiagGroup<"static-inline-explicit-instantiation">>; 8850b57cec5SDimitry Andric 8860b57cec5SDimitry Andric// Constructor template diagnostics. 8870b57cec5SDimitry Andricdef err_out_of_line_constructor_template_id : Error< 8880b57cec5SDimitry Andric "out-of-line constructor for %0 cannot have template arguments">; 8890b57cec5SDimitry Andric 8900b57cec5SDimitry Andricdef err_expected_qualified_after_typename : Error< 8910b57cec5SDimitry Andric "expected a qualified name after 'typename'">; 8920b57cec5SDimitry Andricdef warn_expected_qualified_after_typename : ExtWarn< 8930b57cec5SDimitry Andric "expected a qualified name after 'typename'">; 8940b57cec5SDimitry Andric 8950b57cec5SDimitry Andricdef err_typename_refers_to_non_type_template : Error< 8960b57cec5SDimitry Andric "typename specifier refers to a non-type template">; 8970b57cec5SDimitry Andricdef err_expected_type_name_after_typename : Error< 8980b57cec5SDimitry Andric "expected an identifier or template-id after '::'">; 8990b57cec5SDimitry Andricdef err_explicit_spec_non_template : Error< 9000b57cec5SDimitry Andric "explicit %select{specialization|instantiation}0 of " 9010b57cec5SDimitry Andric "%select{non-|undeclared }3template %1 %2">; 9020b57cec5SDimitry Andric 9030b57cec5SDimitry Andricdef err_default_template_template_parameter_not_template : Error< 9040b57cec5SDimitry Andric "default template argument for a template template parameter must be a class " 9050b57cec5SDimitry Andric "template">; 9060b57cec5SDimitry Andric 9070b57cec5SDimitry Andricdef ext_fold_expression : ExtWarn< 9080b57cec5SDimitry Andric "pack fold expression is a C++17 extension">, 9090b57cec5SDimitry Andric InGroup<CXX17>; 9100b57cec5SDimitry Andricdef warn_cxx14_compat_fold_expression : Warning< 9110b57cec5SDimitry Andric "pack fold expression is incompatible with C++ standards before C++17">, 9120b57cec5SDimitry Andric InGroup<CXXPre17Compat>, DefaultIgnore; 9130b57cec5SDimitry Andricdef err_expected_fold_operator : Error< 9140b57cec5SDimitry Andric "expected a foldable binary operator in fold expression">; 9150b57cec5SDimitry Andricdef err_fold_operator_mismatch : Error< 9160b57cec5SDimitry Andric "operators in fold expression must be the same">; 9170b57cec5SDimitry Andric 9180b57cec5SDimitry Andricdef err_ctor_init_missing_comma : Error< 9190b57cec5SDimitry Andric "missing ',' between base or member initializers">; 9200b57cec5SDimitry Andric 9210b57cec5SDimitry Andric// C++ declarations 9220b57cec5SDimitry Andricdef err_friend_decl_defines_type : Error< 9230b57cec5SDimitry Andric "cannot define a type in a friend declaration">; 9240b57cec5SDimitry Andricdef err_missing_whitespace_digraph : Error< 9250b57cec5SDimitry Andric "found '<::' after a " 9265ffd83dbSDimitry Andric "%select{template name|addrspace_cast|const_cast|dynamic_cast|reinterpret_cast|static_cast}0" 9270b57cec5SDimitry Andric " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">; 9280b57cec5SDimitry Andric 9290b57cec5SDimitry Andricdef ext_defaulted_deleted_function : ExtWarn< 9300b57cec5SDimitry Andric "%select{defaulted|deleted}0 function definitions are a C++11 extension">, 9310b57cec5SDimitry Andric InGroup<CXX11>; 9320b57cec5SDimitry Andricdef warn_cxx98_compat_defaulted_deleted_function : Warning< 9330b57cec5SDimitry Andric "%select{defaulted|deleted}0 function definitions are incompatible with C++98">, 9340b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 9350b57cec5SDimitry Andric 936e8d8bef9SDimitry Andric// C++11 default member initialization 9370b57cec5SDimitry Andricdef ext_nonstatic_member_init : ExtWarn< 938e8d8bef9SDimitry Andric "default member initializer for non-static data member is a C++11 " 939e8d8bef9SDimitry Andric "extension">, InGroup<CXX11>; 9400b57cec5SDimitry Andricdef warn_cxx98_compat_nonstatic_member_init : Warning< 941e8d8bef9SDimitry Andric "default member initializer for non-static data members is incompatible with " 942e8d8bef9SDimitry Andric "C++98">, InGroup<CXX98Compat>, DefaultIgnore; 9430b57cec5SDimitry Andricdef ext_bitfield_member_init: ExtWarn< 94447395794SDimitry Andric "default member initializer for bit-field is a C++20 extension">, 94547395794SDimitry Andric InGroup<CXX20>; 9460b57cec5SDimitry Andricdef warn_cxx17_compat_bitfield_member_init: Warning< 9470b57cec5SDimitry Andric "default member initializer for bit-field is incompatible with " 94847395794SDimitry Andric "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; 949e8d8bef9SDimitry Andricdef err_anon_bitfield_member_init : Error< 950e8d8bef9SDimitry Andric "anonymous bit-field cannot have a default member initializer">; 9510b57cec5SDimitry Andricdef err_incomplete_array_member_init: Error< 952e8d8bef9SDimitry Andric "array bound cannot be deduced from a default member initializer">; 9530b57cec5SDimitry Andric 9540b57cec5SDimitry Andric// C++11 alias-declaration 9550b57cec5SDimitry Andricdef ext_alias_declaration : ExtWarn< 9560b57cec5SDimitry Andric "alias declarations are a C++11 extension">, InGroup<CXX11>; 9570b57cec5SDimitry Andricdef warn_cxx98_compat_alias_declaration : Warning< 9580b57cec5SDimitry Andric "alias declarations are incompatible with C++98">, 9590b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 9600b57cec5SDimitry Andricdef err_alias_declaration_not_identifier : Error< 9610b57cec5SDimitry Andric "name defined in alias declaration must be an identifier">; 9620b57cec5SDimitry Andricdef err_alias_declaration_specialization : Error< 9630b57cec5SDimitry Andric "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">; 9640b57cec5SDimitry Andricdef err_alias_declaration_pack_expansion : Error< 9650b57cec5SDimitry Andric "alias declaration cannot be a pack expansion">; 9660b57cec5SDimitry Andric 9670b57cec5SDimitry Andric// C++17 using-declaration pack expansions 9680b57cec5SDimitry Andricdef ext_multi_using_declaration : ExtWarn< 9690b57cec5SDimitry Andric "use of multiple declarators in a single using declaration is " 9700b57cec5SDimitry Andric "a C++17 extension">, InGroup<CXX17>; 9710b57cec5SDimitry Andricdef warn_cxx17_compat_multi_using_declaration : Warning< 9720b57cec5SDimitry Andric "use of multiple declarators in a single using declaration is " 9730b57cec5SDimitry Andric "incompatible with C++ standards before C++17">, 9740b57cec5SDimitry Andric InGroup<CXXPre17Compat>, DefaultIgnore; 9750b57cec5SDimitry Andricdef ext_using_declaration_pack : ExtWarn< 9760b57cec5SDimitry Andric "pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>; 9770b57cec5SDimitry Andricdef warn_cxx17_compat_using_declaration_pack : Warning< 9780b57cec5SDimitry Andric "pack expansion using declaration is incompatible with C++ standards " 9790b57cec5SDimitry Andric "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore; 9800b57cec5SDimitry Andric 9810b57cec5SDimitry Andric// C++11 override control 9820b57cec5SDimitry Andricdef ext_override_control_keyword : ExtWarn< 9830b57cec5SDimitry Andric "'%0' keyword is a C++11 extension">, InGroup<CXX11>; 9840b57cec5SDimitry Andricdef warn_cxx98_compat_override_control_keyword : Warning< 9850b57cec5SDimitry Andric "'%0' keyword is incompatible with C++98">, 9860b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 9870b57cec5SDimitry Andricdef err_override_control_interface : Error< 9880b57cec5SDimitry Andric "'%0' keyword not permitted with interface types">; 9890b57cec5SDimitry Andricdef ext_ms_sealed_keyword : ExtWarn< 9900b57cec5SDimitry Andric "'sealed' keyword is a Microsoft extension">, 9910b57cec5SDimitry Andric InGroup<MicrosoftSealed>; 992fe6060f1SDimitry Andricdef ext_ms_abstract_keyword : ExtWarn< 993fe6060f1SDimitry Andric "'abstract' keyword is a Microsoft extension">, 994fe6060f1SDimitry Andric InGroup<MicrosoftAbstract>; 9950b57cec5SDimitry Andric 9960b57cec5SDimitry Andricdef err_access_specifier_interface : Error< 9970b57cec5SDimitry Andric "interface types cannot specify '%select{private|protected}0' access">; 9980b57cec5SDimitry Andric 999fe6060f1SDimitry Andricdef err_duplicate_class_virt_specifier : Error< 1000fe6060f1SDimitry Andric "class already marked '%0'">; 1001fe6060f1SDimitry Andric 10020b57cec5SDimitry Andricdef err_duplicate_virt_specifier : Error< 10030b57cec5SDimitry Andric "class member already marked '%0'">; 10040b57cec5SDimitry Andric 1005349cc55cSDimitry Andricdef err_virt_specifier_outside_class : Error< 1006349cc55cSDimitry Andric "'%0' specifier is not allowed outside a class definition">; 1007349cc55cSDimitry Andric 10080b57cec5SDimitry Andricdef err_expected_parameter_pack : Error< 10090b57cec5SDimitry Andric "expected the name of a parameter pack">; 10100b57cec5SDimitry Andricdef err_paren_sizeof_parameter_pack : Error< 10110b57cec5SDimitry Andric "missing parentheses around the size of parameter pack %0">; 10120b57cec5SDimitry Andricdef err_sizeof_parameter_pack : Error< 10130b57cec5SDimitry Andric "expected parenthesized parameter pack name in 'sizeof...' expression">; 10140b57cec5SDimitry Andric 10150b57cec5SDimitry Andric// C++11 lambda expressions 10160b57cec5SDimitry Andricdef err_expected_comma_or_rsquare : Error< 10170b57cec5SDimitry Andric "expected ',' or ']' in lambda capture list">; 10180b57cec5SDimitry Andricdef err_this_captured_by_reference : Error< 10190b57cec5SDimitry Andric "'this' cannot be captured by reference">; 10200b57cec5SDimitry Andricdef err_expected_capture : Error< 10210b57cec5SDimitry Andric "expected variable name or 'this' in lambda capture list">; 10220b57cec5SDimitry Andricdef err_expected_lambda_body : Error<"expected body of lambda expression">; 10230b57cec5SDimitry Andricdef warn_cxx98_compat_lambda : Warning< 10240b57cec5SDimitry Andric "lambda expressions are incompatible with C++98">, 10250b57cec5SDimitry Andric InGroup<CXX98Compat>, DefaultIgnore; 10260b57cec5SDimitry Andricdef err_lambda_decl_specifier_repeated : Error< 1027bdd1243dSDimitry Andric "%select{'mutable'|'static'|'constexpr'|'consteval'}0 cannot " 1028bdd1243dSDimitry Andric "appear multiple times in a lambda declarator">; 10290b57cec5SDimitry Andricdef err_lambda_capture_misplaced_ellipsis : Error< 10300b57cec5SDimitry Andric "ellipsis in pack %select{|init-}0capture must appear %select{after|before}0 " 10310b57cec5SDimitry Andric "the name of the capture">; 10320b57cec5SDimitry Andricdef err_lambda_capture_multiple_ellipses : Error< 10330b57cec5SDimitry Andric "multiple ellipses in pack capture">; 1034e8d8bef9SDimitry Andricdef err_capture_default_first : Error< 1035e8d8bef9SDimitry Andric "capture default must be first">; 1036fe6060f1SDimitry Andricdef ext_decl_attrs_on_lambda : ExtWarn< 103706c3fb27SDimitry Andric "%select{an attribute specifier sequence|%0}1 in this position " 10385f757f3fSDimitry Andric "is a C++23 extension">, InGroup<CXX23AttrsOnLambda>; 1039fe6060f1SDimitry Andricdef ext_lambda_missing_parens : ExtWarn< 104006c3fb27SDimitry Andric "lambda without a parameter clause is a C++23 extension">, 104106c3fb27SDimitry Andric InGroup<CXX23>; 1042fe6060f1SDimitry Andricdef warn_cxx20_compat_decl_attrs_on_lambda : Warning< 104306c3fb27SDimitry Andric "%select{an attribute specifier sequence|%1}0 in this position " 104406c3fb27SDimitry Andric "is incompatible with C++ standards before C++23">, 104506c3fb27SDimitry Andric InGroup<CXXPre23Compat>, DefaultIgnore; 1046fe6060f1SDimitry Andric 10470b57cec5SDimitry Andric// C++17 lambda expressions 10480b57cec5SDimitry Andricdef err_expected_star_this_capture : Error< 10490b57cec5SDimitry Andric "expected 'this' following '*' in lambda capture list">; 10500b57cec5SDimitry Andric 10510b57cec5SDimitry Andric// C++17 constexpr lambda expressions 10520b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_on_lambda : Warning< 10530b57cec5SDimitry Andric "constexpr on lambda expressions is incompatible with C++ standards before C++17">, 10540b57cec5SDimitry Andric InGroup<CXXPre17Compat>, DefaultIgnore; 10550b57cec5SDimitry Andricdef ext_constexpr_on_lambda_cxx17 : ExtWarn< 10560b57cec5SDimitry Andric "'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>; 10570b57cec5SDimitry Andric 105847395794SDimitry Andric// C++20 template lambdas 10590b57cec5SDimitry Andricdef ext_lambda_template_parameter_list: ExtWarn< 106047395794SDimitry Andric "explicit template parameter list for lambdas is a C++20 extension">, 106147395794SDimitry Andric InGroup<CXX20>; 10620b57cec5SDimitry Andricdef warn_cxx17_compat_lambda_template_parameter_list: Warning< 10630b57cec5SDimitry Andric "explicit template parameter list for lambdas is incompatible with " 106447395794SDimitry Andric "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; 10650b57cec5SDimitry Andricdef err_lambda_template_parameter_list_empty : Error< 10660b57cec5SDimitry Andric "lambda template parameter list cannot be empty">; 10670b57cec5SDimitry Andric 106806c3fb27SDimitry Andric// C++23 static lambdas 1069bdd1243dSDimitry Andricdef err_static_lambda: ExtWarn< 107006c3fb27SDimitry Andric "static lambdas are a C++23 extension">, InGroup<CXX23>; 10711ac55f4cSDimitry Andricdef warn_cxx20_compat_static_lambda : Warning< 107206c3fb27SDimitry Andric "static lambdas are incompatible with C++ standards before C++23">, 107306c3fb27SDimitry Andric InGroup<CXXPre23Compat>, DefaultIgnore; 1074bdd1243dSDimitry Andricdef err_static_mutable_lambda : Error< 1075bdd1243dSDimitry Andric "lambda cannot be both mutable and static">; 1076bdd1243dSDimitry Andricdef err_static_lambda_captures : Error< 1077bdd1243dSDimitry Andric "a static lambda cannot have any captures">; 1078bdd1243dSDimitry Andric 10790b57cec5SDimitry Andric// Availability attribute 10800b57cec5SDimitry Andricdef err_expected_version : Error< 10810b57cec5SDimitry Andric "expected a version of the form 'major[.minor[.subminor]]'">; 10820b57cec5SDimitry Andricdef warn_expected_consistent_version_separator : Warning< 10830b57cec5SDimitry Andric "use same version number separators '_' or '.'; as in " 10840b57cec5SDimitry Andric "'major[.minor[.subminor]]'">, InGroup<Availability>; 10850b57cec5SDimitry Andricdef err_zero_version : Error< 10860b57cec5SDimitry Andric "version number must have non-zero major, minor, or sub-minor version">; 10870b57cec5SDimitry Andricdef err_availability_expected_platform : Error< 10880b57cec5SDimitry Andric "expected a platform name, e.g., 'macos'">; 10890b57cec5SDimitry Andric 10900b57cec5SDimitry Andric// objc_bridge_related attribute 10910b57cec5SDimitry Andricdef err_objcbridge_related_expected_related_class : Error< 10920b57cec5SDimitry Andric "expected a related ObjectiveC class name, e.g., 'NSColor'">; 10930b57cec5SDimitry Andricdef err_objcbridge_related_selector_name : Error< 10940b57cec5SDimitry Andric "expected a class method selector with single argument, e.g., 'colorWithCGColor:'">; 10950b57cec5SDimitry Andric 10960b57cec5SDimitry Andricdef err_availability_expected_change : Error< 10970b57cec5SDimitry Andric "expected 'introduced', 'deprecated', or 'obsoleted'">; 10980b57cec5SDimitry Andricdef err_availability_unknown_change : Error< 10990b57cec5SDimitry Andric "%0 is not an availability stage; use 'introduced', 'deprecated', or " 11000b57cec5SDimitry Andric "'obsoleted'">; 11010b57cec5SDimitry Andricdef err_availability_redundant : Error< 11020b57cec5SDimitry Andric "redundant %0 availability change; only the last specified change will " 11030b57cec5SDimitry Andric "be used">; 11040b57cec5SDimitry Andricdef warn_availability_and_unavailable : Warning< 11050b57cec5SDimitry Andric "'unavailable' availability overrides all other availability information">, 11060b57cec5SDimitry Andric InGroup<Availability>; 11070b57cec5SDimitry Andric 11080b57cec5SDimitry Andric// @available(...) 11090b57cec5SDimitry Andricdef err_avail_query_expected_platform_name : Error< 11100b57cec5SDimitry Andric "expected a platform name here">; 11110b57cec5SDimitry Andric 11120b57cec5SDimitry Andricdef err_avail_query_unrecognized_platform_name : Error< 11130b57cec5SDimitry Andric "unrecognized platform name %0">; 11140b57cec5SDimitry Andricdef err_availability_query_wildcard_required: Error< 11150b57cec5SDimitry Andric "must handle potential future platforms with '*'">; 11160b57cec5SDimitry Andricdef err_availability_query_repeated_platform: Error< 11170b57cec5SDimitry Andric "version for '%0' already specified">; 11180b57cec5SDimitry Andricdef err_availability_query_repeated_star : Error< 11190b57cec5SDimitry Andric "'*' query has already been specified">; 11200b57cec5SDimitry Andric 11210b57cec5SDimitry Andric// External source symbol attribute 11220b57cec5SDimitry Andricdef err_external_source_symbol_expected_keyword : Error< 112306c3fb27SDimitry Andric "expected 'language', 'defined_in', 'generated_declaration', or 'USR'">; 11240b57cec5SDimitry Andricdef err_external_source_symbol_duplicate_clause : Error< 11250b57cec5SDimitry Andric "duplicate %0 clause in an 'external_source_symbol' attribute">; 11260b57cec5SDimitry Andric 11270b57cec5SDimitry Andric// Type safety attributes 11280b57cec5SDimitry Andricdef err_type_safety_unknown_flag : Error< 11290b57cec5SDimitry Andric "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">; 11300b57cec5SDimitry Andric 11310b57cec5SDimitry Andric// Type traits 11320b57cec5SDimitry Andricdef err_type_trait_arity : Error< 11330b57cec5SDimitry Andric "type trait requires %0%select{| or more}1 argument%select{|s}2; have " 11340b57cec5SDimitry Andric "%3 argument%s3">; 11350b57cec5SDimitry Andric 11360b57cec5SDimitry Andric// Language specific pragmas 11370b57cec5SDimitry Andric// - Generic warnings 11380b57cec5SDimitry Andricdef warn_pragma_expected_lparen : Warning< 11390b57cec5SDimitry Andric "missing '(' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>; 11400b57cec5SDimitry Andricdef warn_pragma_expected_rparen : Warning< 11410b57cec5SDimitry Andric "missing ')' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>; 11420b57cec5SDimitry Andricdef warn_pragma_expected_identifier : Warning< 11430b57cec5SDimitry Andric "expected identifier in '#pragma %0' - ignored">, InGroup<IgnoredPragmas>; 11440b57cec5SDimitry Andricdef warn_pragma_expected_string : Warning< 11450b57cec5SDimitry Andric "expected string literal in '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>; 11460b57cec5SDimitry Andricdef warn_pragma_missing_argument : Warning< 11470b57cec5SDimitry Andric "missing argument to '#pragma %0'%select{|; expected %2}1">, InGroup<IgnoredPragmas>; 11480b57cec5SDimitry Andricdef warn_pragma_invalid_argument : Warning< 11490b57cec5SDimitry Andric "unexpected argument '%0' to '#pragma %1'%select{|; expected %3}2">, InGroup<IgnoredPragmas>; 11500b57cec5SDimitry Andric 1151a7dea167SDimitry Andricdef err_pragma_misplaced_in_decl : Error<"this pragma cannot appear in %0 declaration">; 1152a7dea167SDimitry Andric 11530b57cec5SDimitry Andric// '#pragma clang section' related errors 11540b57cec5SDimitry Andricdef err_pragma_expected_clang_section_name : Error< 1155a7dea167SDimitry Andric "expected one of [bss|data|rodata|text|relro] section kind in '#pragma %0'">; 11560b57cec5SDimitry Andricdef err_pragma_clang_section_expected_equal : Error< 1157a7dea167SDimitry Andric "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text|relro}0'">; 11580b57cec5SDimitry Andricdef warn_pragma_expected_section_name : Warning< 11590b57cec5SDimitry Andric "expected a string literal for the section name in '#pragma %0' - ignored">, 11600b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11610b57cec5SDimitry Andric 11620b57cec5SDimitry Andricdef warn_pragma_expected_section_push_pop_or_name : Warning< 11630b57cec5SDimitry Andric "expected push, pop or a string literal for the section name in '#pragma %0' - ignored">, 11640b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11650b57cec5SDimitry Andricdef warn_pragma_expected_section_label_or_name : Warning< 11660b57cec5SDimitry Andric "expected a stack label or a string literal for the section name in '#pragma %0' - ignored">, 11670b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11680b57cec5SDimitry Andricdef warn_pragma_expected_init_seg : Warning< 11690b57cec5SDimitry Andric "expected 'compiler', 'lib', 'user', or a string literal for the section name in '#pragma %0' - ignored">, 11700b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11715ffd83dbSDimitry Andric 11725ffd83dbSDimitry Andricdef err_pragma_expected_integer : Error<"expected an integer argument in '#pragma %0'">; 11730b57cec5SDimitry Andricdef warn_pragma_expected_integer : Warning< 11740b57cec5SDimitry Andric "expected integer between %0 and %1 inclusive in '#pragma %2' - ignored">, 11750b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11760b57cec5SDimitry Andricdef warn_pragma_ms_struct : Warning< 11770b57cec5SDimitry Andric "incorrect use of '#pragma ms_struct on|off' - ignored">, 11780b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 1179349cc55cSDimitry Andricdef warn_pragma_ms_fenv_access : Warning< 1180349cc55cSDimitry Andric "incorrect use of '#pragma fenv_access (on|off)' - ignored">, 1181349cc55cSDimitry Andric InGroup<IgnoredPragmas>; 11820b57cec5SDimitry Andricdef warn_pragma_extra_tokens_at_eol : Warning< 11830b57cec5SDimitry Andric "extra tokens at end of '#pragma %0' - ignored">, 11840b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11850b57cec5SDimitry Andricdef warn_pragma_expected_comma : Warning< 11860b57cec5SDimitry Andric "expected ',' in '#pragma %0'">, InGroup<IgnoredPragmas>; 11870b57cec5SDimitry Andricdef warn_pragma_expected_punc : Warning< 11880b57cec5SDimitry Andric "expected ')' or ',' in '#pragma %0'">, InGroup<IgnoredPragmas>; 11890b57cec5SDimitry Andricdef warn_pragma_expected_non_wide_string : Warning< 11900b57cec5SDimitry Andric "expected non-wide string literal in '#pragma %0'">, InGroup<IgnoredPragmas>; 11910b57cec5SDimitry Andric// - Generic errors 11920b57cec5SDimitry Andricdef err_pragma_missing_argument : Error< 11930b57cec5SDimitry Andric "missing argument to '#pragma %0'%select{|; expected %2}1">; 11940b57cec5SDimitry Andric// - #pragma options 11950b57cec5SDimitry Andricdef warn_pragma_options_expected_align : Warning< 11960b57cec5SDimitry Andric "expected 'align' following '#pragma options' - ignored">, 11970b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 11980b57cec5SDimitry Andricdef warn_pragma_align_expected_equal : Warning< 11990b57cec5SDimitry Andric "expected '=' following '#pragma %select{align|options align}0' - ignored">, 12000b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12010b57cec5SDimitry Andricdef warn_pragma_align_invalid_option : Warning< 12020b57cec5SDimitry Andric "invalid alignment option in '#pragma %select{align|options align}0' - ignored">, 12030b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12040b57cec5SDimitry Andric// - #pragma pack 12050b57cec5SDimitry Andricdef warn_pragma_unsupported_action : Warning< 12060b57cec5SDimitry Andric "known but unsupported action '%1' for '#pragma %0' - ignored">, 12070b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12080b57cec5SDimitry Andricdef warn_pragma_invalid_specific_action : Warning< 12090b57cec5SDimitry Andric "unknown action '%1' for '#pragma %0' - ignored">, 12100b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12110b57cec5SDimitry Andricdef warn_pragma_expected_action_or_r_paren : Warning< 12120b57cec5SDimitry Andric "expected action or ')' in '#pragma %0' - ignored">, 12130b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12140b57cec5SDimitry Andricdef warn_pragma_invalid_action : Warning< 12150b57cec5SDimitry Andric "unknown action for '#pragma %0' - ignored">, 12160b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12170b57cec5SDimitry Andricdef warn_pragma_pack_malformed : Warning< 12180b57cec5SDimitry Andric "expected integer or identifier in '#pragma pack' - ignored">, 12190b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12200b57cec5SDimitry Andric// - #pragma intrinsic 12210b57cec5SDimitry Andricdef warn_pragma_intrinsic_builtin : Warning< 12220b57cec5SDimitry Andric "%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1">, 12230b57cec5SDimitry Andric InGroup<IgnoredPragmaIntrinsic>; 12240b57cec5SDimitry Andric// - #pragma unused 12250b57cec5SDimitry Andricdef warn_pragma_unused_expected_var : Warning< 12260b57cec5SDimitry Andric "expected '#pragma unused' argument to be a variable name">, 12270b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12280b57cec5SDimitry Andric// - #pragma init_seg 12290b57cec5SDimitry Andricdef warn_pragma_init_seg_unsupported_target : Warning< 12300b57cec5SDimitry Andric "'#pragma init_seg' is only supported when targeting a " 12310b57cec5SDimitry Andric "Microsoft environment">, 12320b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12335ffd83dbSDimitry Andric// - #pragma restricted to file scope or start of compound statement 12345ffd83dbSDimitry Andricdef err_pragma_file_or_compound_scope : Error< 12355ffd83dbSDimitry Andric "'#pragma %0' can only appear at file scope or at the start of a " 12360b57cec5SDimitry Andric "compound statement">; 12370b57cec5SDimitry Andric// - #pragma stdc unknown 12380b57cec5SDimitry Andricdef ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">, 12390b57cec5SDimitry Andric InGroup<UnknownPragmas>; 1240e8d8bef9SDimitry Andric// The C standard 7.6.1p2 says "The [FENV_ACCESS] pragma shall occur either 1241e8d8bef9SDimitry Andric// outside external declarations or preceding all explicit declarations and 1242e8d8bef9SDimitry Andric// statements inside a compound statement. 1243e8d8bef9SDimitry Andricdef warn_stdc_fenv_round_not_supported : 1244e8d8bef9SDimitry Andric Warning<"pragma STDC FENV_ROUND is not supported">, 12450b57cec5SDimitry Andric InGroup<UnknownPragmas>; 1246e8d8bef9SDimitry Andricdef warn_stdc_unknown_rounding_mode : Warning< 1247e8d8bef9SDimitry Andric "invalid or unsupported rounding mode in '#pragma STDC FENV_ROUND' - ignored">, 1248e8d8bef9SDimitry Andric InGroup<IgnoredPragmas>; 1249e8d8bef9SDimitry Andricdef warn_pragma_fp_ignored : Warning< 1250e8d8bef9SDimitry Andric "'#pragma %0' is not supported on this target - ignored">, 1251e8d8bef9SDimitry Andric InGroup<IgnoredPragmas>; 12520b57cec5SDimitry Andric// - #pragma comment 12530b57cec5SDimitry Andricdef err_pragma_comment_malformed : Error< 12540b57cec5SDimitry Andric "pragma comment requires parenthesized identifier and optional string">; 12550b57cec5SDimitry Andricdef err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">; 12560b57cec5SDimitry Andric// PS4 recognizes only #pragma comment(lib) 12570b57cec5SDimitry Andricdef warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">, 12580b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 12590b57cec5SDimitry Andric// - #pragma detect_mismatch 12600b57cec5SDimitry Andricdef err_pragma_detect_mismatch_malformed : Error< 12610b57cec5SDimitry Andric "pragma detect_mismatch is malformed; it requires two comma-separated " 12620b57cec5SDimitry Andric "string literals">; 12635ffd83dbSDimitry Andric// - #pragma float_control 12645ffd83dbSDimitry Andricdef err_pragma_float_control_malformed : Error< 12655ffd83dbSDimitry Andric "pragma float_control is malformed; use 'float_control({push|pop})' or " 12665ffd83dbSDimitry Andric "'float_control({precise|except}, {on|off} [,push])'">; 12670b57cec5SDimitry Andric// - #pragma pointers_to_members 12680b57cec5SDimitry Andricdef err_pragma_pointers_to_members_unknown_kind : Error< 12690b57cec5SDimitry Andric "unexpected %0, expected to see one of %select{|'best_case', 'full_generality', }1" 12700b57cec5SDimitry Andric "'single_inheritance', 'multiple_inheritance', or 'virtual_inheritance'">; 12710b57cec5SDimitry Andric// - #pragma clang optimize on/off 12720b57cec5SDimitry Andricdef err_pragma_optimize_invalid_argument : Error< 12730b57cec5SDimitry Andric "unexpected argument '%0' to '#pragma clang optimize'; " 12740b57cec5SDimitry Andric "expected 'on' or 'off'">; 12750b57cec5SDimitry Andricdef err_pragma_optimize_extra_argument : Error< 12760b57cec5SDimitry Andric "unexpected extra argument '%0' to '#pragma clang optimize'">; 12770b57cec5SDimitry Andric// - #pragma clang attribute 12780b57cec5SDimitry Andricdef err_pragma_attribute_expected_push_pop_paren : Error< 12790b57cec5SDimitry Andric "expected 'push', 'pop', or '(' after '#pragma clang attribute'">; 12800b57cec5SDimitry Andricdef err_pragma_attribute_invalid_argument : Error< 12810b57cec5SDimitry Andric "unexpected argument '%0' to '#pragma clang attribute'; " 12820b57cec5SDimitry Andric "expected 'push' or 'pop'">; 12830b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute : Error< 12840b57cec5SDimitry Andric "expected an attribute after '('">; 12850b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_name : Error< 12860b57cec5SDimitry Andric "expected identifier that represents an attribute name">; 12870b57cec5SDimitry Andricdef err_pragma_attribute_extra_tokens_after_attribute : Error< 12880b57cec5SDimitry Andric "extra tokens after attribute in a '#pragma clang attribute push'">; 12890b57cec5SDimitry Andricdef err_pragma_attribute_unsupported_attribute : Error< 12900b57cec5SDimitry Andric "attribute %0 is not supported by '#pragma clang attribute'">; 12910b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_syntax : Error< 12920b57cec5SDimitry Andric "expected an attribute that is specified using the GNU, C++11 or '__declspec'" 12930b57cec5SDimitry Andric " syntax">; 12940b57cec5SDimitry Andricdef note_pragma_attribute_use_attribute_kw : Note<"use the GNU '__attribute__' " 12950b57cec5SDimitry Andric "syntax">; 12960b57cec5SDimitry Andricdef err_pragma_attribute_invalid_subject_set_specifier : Error< 12970b57cec5SDimitry Andric "expected attribute subject set specifier 'apply_to'">; 12980b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_identifier : Error< 12990b57cec5SDimitry Andric "expected an identifier that corresponds to an attribute subject rule">; 13000b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_rule : Error< 13010b57cec5SDimitry Andric "unknown attribute subject rule '%0'">; 13020b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_sub_identifier : Error< 13030b57cec5SDimitry Andric "expected an identifier that corresponds to an attribute subject matcher " 13040b57cec5SDimitry Andric "sub-rule; '%0' matcher %select{does not support sub-rules|supports the " 13050b57cec5SDimitry Andric "following sub-rules: %2|}1">; 13060b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_sub_rule : Error< 13070b57cec5SDimitry Andric "%select{invalid use of|unknown}2 attribute subject matcher sub-rule '%0'; " 13080b57cec5SDimitry Andric "'%1' matcher %select{does not support sub-rules|supports the following " 13090b57cec5SDimitry Andric "sub-rules: %3}2">; 13100b57cec5SDimitry Andricdef err_pragma_attribute_duplicate_subject : Error< 13110b57cec5SDimitry Andric "duplicate attribute subject matcher '%0'">; 13120b57cec5SDimitry Andricdef err_pragma_attribute_expected_period : Error< 13130b57cec5SDimitry Andric "expected '.' after pragma attribute namespace %0">; 13140b57cec5SDimitry Andricdef err_pragma_attribute_namespace_on_attribute : Error< 13150b57cec5SDimitry Andric "namespace can only apply to 'push' or 'pop' directives">; 13160b57cec5SDimitry Andricdef note_pragma_attribute_namespace_on_attribute : Note< 13170b57cec5SDimitry Andric "omit the namespace to add attributes to the most-recently" 13180b57cec5SDimitry Andric " pushed attribute group">; 131981ad6265SDimitry Andricdef warn_no_support_for_eval_method_source_on_m32 : Warning< 132081ad6265SDimitry Andric "Setting the floating point evaluation method to `source` on a target" 132181ad6265SDimitry Andric " without SSE is not supported.">, InGroup<Pragmas>; 132206c3fb27SDimitry Andric// - #pragma __debug 132306c3fb27SDimitry Andricdef warn_pragma_debug_dependent_argument : Warning< 132406c3fb27SDimitry Andric "%select{value|type}0-dependent expression passed as an argument to debug " 132506c3fb27SDimitry Andric "command">, InGroup<IgnoredPragmas>; 13260b57cec5SDimitry Andric 13270b57cec5SDimitry Andric// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1]) 13280b57cec5SDimitry Andricdef warn_pragma_expected_colon : Warning< 13290b57cec5SDimitry Andric "missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>; 13300b57cec5SDimitry Andricdef warn_pragma_expected_predicate : Warning< 13310b57cec5SDimitry Andric "expected %select{'enable', 'disable', 'begin' or 'end'|'disable'}0 - ignoring">, InGroup<IgnoredPragmas>; 13320b57cec5SDimitry Andricdef warn_pragma_unknown_extension : Warning< 133381ad6265SDimitry Andric "OpenCL extension %0 unknown or does not require pragma - ignoring">, InGroup<IgnoredPragmas>; 13340b57cec5SDimitry Andricdef warn_pragma_unsupported_extension : Warning< 13350b57cec5SDimitry Andric "unsupported OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>; 13360b57cec5SDimitry Andricdef warn_pragma_extension_is_core : Warning< 1337fe6060f1SDimitry Andric "OpenCL extension %0 is core feature or supported optional core feature - ignoring">, 1338fe6060f1SDimitry Andric InGroup<OpenCLCoreFeaturesDiagGroup>, DefaultIgnore; 1339bdd1243dSDimitry Andricdef err_modifier_expected_colon : Error<"missing ':' after %0 modifier">; 13400b57cec5SDimitry Andric 13410b57cec5SDimitry Andric// OpenCL errors. 13420b57cec5SDimitry Andricdef err_opencl_taking_function_address_parser : Error< 13430b57cec5SDimitry Andric "taking address of function is not allowed">; 13440b57cec5SDimitry Andricdef err_opencl_logical_exclusive_or : Error< 13450b57cec5SDimitry Andric "^^ is a reserved operator in OpenCL">; 13460b57cec5SDimitry Andric 13470b57cec5SDimitry Andric// C++ for OpenCL. 13480b57cec5SDimitry Andricdef err_openclcxx_virtual_function : Error< 13490b57cec5SDimitry Andric "virtual functions are not supported in C++ for OpenCL">; 13500b57cec5SDimitry Andric 13515f757f3fSDimitry Andric// OpenACC Support. 13525f757f3fSDimitry Andricdef warn_pragma_acc_ignored 13535f757f3fSDimitry Andric : Warning<"unexpected '#pragma acc ...' in program">, 13545f757f3fSDimitry Andric InGroup<SourceUsesOpenACC>, 13555f757f3fSDimitry Andric DefaultIgnore; 13565f757f3fSDimitry Andricdef err_acc_unexpected_directive 13575f757f3fSDimitry Andric : Error<"unexpected OpenACC directive %select{|'#pragma acc %1'}0">; 13585f757f3fSDimitry Andricdef warn_pragma_acc_unimplemented 13595f757f3fSDimitry Andric : Warning<"OpenACC directives not yet implemented, pragma ignored">, 13605f757f3fSDimitry Andric InGroup<SourceUsesOpenACC>; 13615f757f3fSDimitry Andricdef err_acc_invalid_directive 13625f757f3fSDimitry Andric : Error<"invalid OpenACC directive %select{%1|'%1 %2'}0">; 1363cb14a3feSDimitry Andricdef err_acc_invalid_clause : Error<"invalid OpenACC clause %0">; 13645f757f3fSDimitry Andricdef err_acc_missing_directive : Error<"expected OpenACC directive">; 13655f757f3fSDimitry Andricdef err_acc_invalid_open_paren 13665f757f3fSDimitry Andric : Error<"expected clause-list or newline in OpenACC directive">; 13671db9f3b2SDimitry Andricdef err_acc_invalid_default_clause_kind 13681db9f3b2SDimitry Andric : Error<"invalid value for 'default' clause; expected 'present' or 'none'">; 13697a6dacacSDimitry Andricdef err_acc_invalid_tag_kind 13707a6dacacSDimitry Andric : Error<"invalid tag %0 on '%1' %select{directive|clause}2">; 13717a6dacacSDimitry Andricdef err_acc_expected_reduction_operator 13727a6dacacSDimitry Andric : Error<"missing reduction operator, expected '+', '*', 'max', 'min', '&', " 13737a6dacacSDimitry Andric "'|', '^', '&&', or '||', follwed by a ':'">; 13747a6dacacSDimitry Andricdef err_acc_invalid_reduction_operator 13757a6dacacSDimitry Andric : Error<"invalid reduction operator, expected '+', '*', 'max', 'min', " 13767a6dacacSDimitry Andric "'&', '|', '^', '&&', or '||'">; 13777a6dacacSDimitry Andricdef err_acc_incorrect_bind_arg : Error<"expected identifier or string literal">; 13785f757f3fSDimitry Andric 13790b57cec5SDimitry Andric// OpenMP support. 13800b57cec5SDimitry Andricdef warn_pragma_omp_ignored : Warning< 13810b57cec5SDimitry Andric "unexpected '#pragma omp ...' in program">, InGroup<SourceUsesOpenMP>, DefaultIgnore; 13820b57cec5SDimitry Andricdef warn_omp_extra_tokens_at_eol : Warning< 13830b57cec5SDimitry Andric "extra tokens at the end of '#pragma omp %0' are ignored">, 13840b57cec5SDimitry Andric InGroup<ExtraTokens>; 13855f757f3fSDimitry Andricdef err_omp_multiple_step_or_linear_modifier : Error< 13865f757f3fSDimitry Andric "multiple %select{'step size'|'linear modifier'}0 found in linear clause">; 13875f757f3fSDimitry Andricdef err_omp_deprecate_old_syntax: Error< 13885f757f3fSDimitry Andric "old syntax '%0' on '%1' clause was deprecated, use new syntax '%2'">; 13890b57cec5SDimitry Andricdef warn_pragma_expected_colon_r_paren : Warning< 13900b57cec5SDimitry Andric "missing ':' or ')' after %0 - ignoring">, InGroup<IgnoredPragmas>; 13910b57cec5SDimitry Andricdef err_omp_unknown_directive : Error< 13920b57cec5SDimitry Andric "expected an OpenMP directive">; 13930b57cec5SDimitry Andricdef err_omp_unexpected_directive : Error< 13940b57cec5SDimitry Andric "unexpected OpenMP directive %select{|'#pragma omp %1'}0">; 13950b57cec5SDimitry Andricdef err_omp_expected_punc : Error< 13960b57cec5SDimitry Andric "expected ',' or ')' in '%0' %select{clause|directive}1">; 1397bdd1243dSDimitry Andricdef warn_clause_expected_string : Warning< 1398bdd1243dSDimitry Andric "expected string literal in 'clause %0' - ignoring">, InGroup<IgnoredPragmas>; 13990b57cec5SDimitry Andricdef err_omp_unexpected_clause : Error< 14000b57cec5SDimitry Andric "unexpected OpenMP clause '%0' in directive '#pragma omp %1'">; 14015f757f3fSDimitry Andricdef err_omp_unexpected_clause_extension_only : Error< 14025f757f3fSDimitry Andric "OpenMP clause '%0' is only available as extension, use '-fopenmp-extensions'">; 14030b57cec5SDimitry Andricdef err_omp_immediate_directive : Error< 14040b57cec5SDimitry Andric "'#pragma omp %0' %select{|with '%2' clause }1cannot be an immediate substatement">; 14050b57cec5SDimitry Andricdef err_omp_expected_identifier_for_critical : Error< 14060b57cec5SDimitry Andric "expected identifier specifying the name of the 'omp critical' directive">; 14070b57cec5SDimitry Andricdef err_omp_expected_reduction_identifier : Error< 14080b57cec5SDimitry Andric "expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">; 14095ffd83dbSDimitry Andricdef err_omp_expected_equal_in_iterator : Error< 14105ffd83dbSDimitry Andric "expected '=' in iterator specifier">; 14115ffd83dbSDimitry Andricdef err_omp_expected_punc_after_iterator : Error< 14125ffd83dbSDimitry Andric "expected ',' or ')' after iterator specifier">; 1413a7dea167SDimitry Andricdef err_omp_decl_in_declare_simd_variant : Error< 1414a7dea167SDimitry Andric "function declaration is expected after 'declare %select{simd|variant}0' directive">; 141506c3fb27SDimitry Andricdef err_omp_sink_and_source_iteration_not_allowd: Error<" '%0 %select{sink:|source:}1' must be with '%select{omp_cur_iteration - 1|omp_cur_iteration}1'">; 14160b57cec5SDimitry Andricdef err_omp_unknown_map_type : Error< 14170b57cec5SDimitry Andric "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">; 14180b57cec5SDimitry Andricdef err_omp_unknown_map_type_modifier : Error< 1419349cc55cSDimitry Andric "incorrect map type modifier, expected one of: 'always', 'close', 'mapper'" 1420bdd1243dSDimitry Andric "%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1">; 14210b57cec5SDimitry Andricdef err_omp_map_type_missing : Error< 14220b57cec5SDimitry Andric "missing map type">; 14230b57cec5SDimitry Andricdef err_omp_map_type_modifier_missing : Error< 14240b57cec5SDimitry Andric "missing map type modifier">; 14250b57cec5SDimitry Andricdef err_omp_declare_simd_inbranch_notinbranch : Error< 14260b57cec5SDimitry Andric "unexpected '%0' clause, '%1' is specified already">; 142706c3fb27SDimitry Andricdef err_omp_expected_clause_argument 142806c3fb27SDimitry Andric : Error<"expected '%0' clause with an argument on '#pragma omp %1' " 142906c3fb27SDimitry Andric "construct">; 14305ffd83dbSDimitry Andricdef err_expected_end_declare_target_or_variant : Error< 14315ffd83dbSDimitry Andric "expected '#pragma omp end declare %select{target|variant}0'">; 14325ffd83dbSDimitry Andricdef err_expected_begin_declare_variant 14335ffd83dbSDimitry Andric : Error<"'#pragma omp end declare variant' with no matching '#pragma omp " 14345ffd83dbSDimitry Andric "begin declare variant'">; 1435e8d8bef9SDimitry Andricdef err_expected_begin_assumes 1436e8d8bef9SDimitry Andric : Error<"'#pragma omp end assumes' with no matching '#pragma omp begin assumes'">; 1437e8d8bef9SDimitry Andricdef warn_omp_unknown_assumption_clause_missing_id 1438e8d8bef9SDimitry Andric : Warning<"valid %0 clauses start with %1; %select{token|tokens}2 will be ignored">, 1439e8d8bef9SDimitry Andric InGroup<OpenMPClauses>; 1440e8d8bef9SDimitry Andricdef warn_omp_unknown_assumption_clause_without_args 1441e8d8bef9SDimitry Andric : Warning<"%0 clause should not be followed by arguments; tokens will be ignored">, 1442e8d8bef9SDimitry Andric InGroup<OpenMPClauses>; 1443e8d8bef9SDimitry Andricdef note_omp_assumption_clause_continue_here 1444e8d8bef9SDimitry Andric : Note<"the ignored tokens spans until here">; 14450b57cec5SDimitry Andricdef err_omp_declare_target_unexpected_clause: Error< 144604eeddc0SDimitry Andric "unexpected '%0' clause, only %select{'device_type'|'to' or 'link'|'to', 'link' or 'device_type'|'device_type', 'indirect'|'to', 'link', 'device_type' or 'indirect'}1 clauses expected">; 1447bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_clause_52: Error< 1448bdd1243dSDimitry Andric "unexpected '%0' clause, only %select{'device_type'|'enter' or 'link'|'enter', 'link' or 'device_type'|'device_type', 'indirect'|'enter', 'link', 'device_type' or 'indirect'}1 clauses expected">; 1449fe6060f1SDimitry Andricdef err_omp_begin_declare_target_unexpected_implicit_to_clause: Error< 1450fe6060f1SDimitry Andric "unexpected '(', only 'to', 'link' or 'device_type' clauses expected for 'begin declare target' directive">; 1451bdd1243dSDimitry Andricdef err_omp_declare_target_wrong_clause_after_implicit_to: Error< 1452fe6060f1SDimitry Andric "unexpected clause after an implicit 'to' clause">; 1453bdd1243dSDimitry Andricdef err_omp_declare_target_wrong_clause_after_implicit_enter: Error< 1454bdd1243dSDimitry Andric "unexpected clause after an implicit 'enter' clause">; 1455fe6060f1SDimitry Andricdef err_omp_declare_target_missing_to_or_link_clause: Error< 145604eeddc0SDimitry Andric "expected at least one %select{'to' or 'link'|'to', 'link' or 'indirect'}0 clause">; 1457bdd1243dSDimitry Andricdef err_omp_declare_target_missing_enter_or_link_clause: Error< 1458bdd1243dSDimitry Andric "expected at least one %select{'enter' or 'link'|'enter', 'link' or 'indirect'}0 clause">; 1459bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_to_clause: Error< 1460bdd1243dSDimitry Andric "unexpected 'to' clause, use 'enter' instead">; 1461bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_enter_clause: Error< 1462bdd1243dSDimitry Andric "unexpected 'enter' clause, use 'to' instead">; 1463fe6060f1SDimitry Andricdef err_omp_declare_target_multiple : Error< 1464fe6060f1SDimitry Andric "%0 appears multiple times in clauses on the same declare target directive">; 146504eeddc0SDimitry Andricdef err_omp_declare_target_indirect_device_type: Error< 146604eeddc0SDimitry Andric "only 'device_type(any)' clause is allowed with indirect clause">; 14670b57cec5SDimitry Andricdef err_omp_expected_clause: Error< 14680b57cec5SDimitry Andric "expected at least one clause on '#pragma omp %0' directive">; 14690b57cec5SDimitry Andricdef err_omp_mapper_illegal_identifier : Error< 14700b57cec5SDimitry Andric "illegal OpenMP user-defined mapper identifier">; 14710b57cec5SDimitry Andricdef err_omp_mapper_expected_declarator : Error< 14720b57cec5SDimitry Andric "expected declarator on 'omp declare mapper' directive">; 1473349cc55cSDimitry Andricdef err_omp_unexpected_append_op : Error< 1474349cc55cSDimitry Andric "unexpected operation specified in 'append_args' clause, expected 'interop'">; 1475bdd1243dSDimitry Andricdef err_omp_unexpected_execution_modifier : Error< 1476bdd1243dSDimitry Andric "unexpected 'execution' modifier in non-executable context">; 1477a7dea167SDimitry Andricdef err_omp_declare_variant_wrong_clause : Error< 1478349cc55cSDimitry Andric "expected %select{'match'|'match', 'adjust_args', or 'append_args'}0 clause " 1479349cc55cSDimitry Andric "on 'omp declare variant' directive">; 1480e8d8bef9SDimitry Andricdef err_omp_declare_variant_duplicate_nested_trait : Error< 1481e8d8bef9SDimitry Andric "nested OpenMP context selector contains duplicated trait '%0'" 1482e8d8bef9SDimitry Andric " in selector '%1' and set '%2' with different score">; 1483e8d8bef9SDimitry Andricdef err_omp_declare_variant_nested_user_condition : Error< 1484e8d8bef9SDimitry Andric "nested user conditions in OpenMP context selector not supported (yet)">; 14855ffd83dbSDimitry Andricdef warn_omp_declare_variant_string_literal_or_identifier 14865ffd83dbSDimitry Andric : Warning<"expected identifier or string literal describing a context " 14875ffd83dbSDimitry Andric "%select{set|selector|property}0; " 14885ffd83dbSDimitry Andric "%select{set|selector|property}0 skipped">, 1489a7dea167SDimitry Andric InGroup<OpenMPClauses>; 149004eeddc0SDimitry Andricdef warn_unknown_declare_variant_isa_trait 1491e8d8bef9SDimitry Andric : Warning<"isa trait '%0' is not known to the current target; verify the " 1492e8d8bef9SDimitry Andric "spelling or consider restricting the context selector with the " 1493e8d8bef9SDimitry Andric "'arch' selector further">, 1494e8d8bef9SDimitry Andric InGroup<SourceUsesOpenMP>; 14955f757f3fSDimitry Andricdef note_ompx_bare_clause : Note< 14965f757f3fSDimitry Andric "OpenMP extension clause '%0' only allowed with '#pragma omp %1'">; 14975ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_options 14985ffd83dbSDimitry Andric : Note<"context %select{set|selector|property}0 options are: %1">; 14995ffd83dbSDimitry Andricdef warn_omp_declare_variant_expected 15005ffd83dbSDimitry Andric : Warning<"expected '%0' after the %1; '%0' assumed">, 1501a7dea167SDimitry Andric InGroup<OpenMPClauses>; 15025ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_property 15035ffd83dbSDimitry Andric : Warning<"'%0' is not a valid context property for the context selector " 15045ffd83dbSDimitry Andric "'%1' and the context set '%2'; property ignored">, 15055ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15065ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_is_a 15075ffd83dbSDimitry Andric : Note<"'%0' is a context %select{set|selector|property}1 not a context " 15085ffd83dbSDimitry Andric "%select{set|selector|property}2">; 15095ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_try : Note<"try 'match(%0={%1%2})'">; 15105ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_selector 15115ffd83dbSDimitry Andric : Warning<"'%0' is not a valid context selector for the context set '%1'; " 15125ffd83dbSDimitry Andric "selector ignored">, 15135ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15145ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_set 15155ffd83dbSDimitry Andric : Warning<"'%0' is not a valid context set in a `declare variant`; set " 15165ffd83dbSDimitry Andric "ignored">, 15175ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15185ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_mutiple_use 15195ffd83dbSDimitry Andric : Warning<"the context %select{set|selector|property}0 '%1' was used " 15205ffd83dbSDimitry Andric "already in the same 'omp declare variant' directive; " 15215ffd83dbSDimitry Andric "%select{set|selector|property}0 ignored">, 15225ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15235ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_used_here 15245ffd83dbSDimitry Andric : Note<"the previous context %select{set|selector|property}0 '%1' used " 15255ffd83dbSDimitry Andric "here">; 15265ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_continue_here 15275ffd83dbSDimitry Andric : Note<"the ignored %select{set|selector|property}0 spans until here">; 15285ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_selector_for_set 15295ffd83dbSDimitry Andric : Warning<"the context selector '%0' is not valid for the context set " 15305ffd83dbSDimitry Andric "'%1'; selector ignored">, 15315ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15325ffd83dbSDimitry Andricdef note_omp_ctx_compatible_set_for_selector 15335ffd83dbSDimitry Andric : Note<"the context selector '%0' can be nested in the context set '%1'; " 15345ffd83dbSDimitry Andric "try 'match(%1={%0%select{|(property)}2})'">; 15355ffd83dbSDimitry Andricdef warn_omp_ctx_selector_without_properties 15365ffd83dbSDimitry Andric : Warning<"the context selector '%0' in context set '%1' requires a " 15375ffd83dbSDimitry Andric "context property defined in parentheses; selector ignored">, 15385ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15395ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_property_for_selector 15405ffd83dbSDimitry Andric : Warning<"the context property '%0' is not valid for the context selector " 15415ffd83dbSDimitry Andric "'%1' and the context set '%2'; property ignored">, 15425ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15435ffd83dbSDimitry Andricdef note_omp_ctx_compatible_set_and_selector_for_property 15445ffd83dbSDimitry Andric : Note<"the context property '%0' can be nested in the context selector " 15455ffd83dbSDimitry Andric "'%1' which is nested in the context set '%2'; try " 15465ffd83dbSDimitry Andric "'match(%2={%1(%0)})'">; 15475ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_score_for_property 15485ffd83dbSDimitry Andric : Warning<"the context selector '%0' in the context set '%1' cannot have a " 15495ffd83dbSDimitry Andric "score ('%2'); score ignored">, 15505ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15515ffd83dbSDimitry Andricdef warn_omp_more_one_device_type_clause 15525ffd83dbSDimitry Andric : Warning<"more than one 'device_type' clause is specified">, 15535ffd83dbSDimitry Andric InGroup<OpenMPClauses>; 15545ffd83dbSDimitry Andricdef err_omp_variant_ctx_second_match_extension : Error< 15555ffd83dbSDimitry Andric "only a single match extension allowed per OpenMP context selector">; 15565ffd83dbSDimitry Andricdef err_omp_invalid_dsa: Error< 15575ffd83dbSDimitry Andric "data-sharing attribute '%0' in '%1' clause requires OpenMP version %2 or above">; 1558fe6060f1SDimitry Andricdef err_omp_expected_punc_after_interop_mod : Error< 1559fe6060f1SDimitry Andric "expected ',' after interop modifier">; 1560fe6060f1SDimitry Andricdef err_omp_expected_interop_type : Error< 1561fe6060f1SDimitry Andric "expected interop type: 'target' and/or 'targetsync'">; 1562fe6060f1SDimitry Andricdef warn_omp_more_one_interop_type 1563fe6060f1SDimitry Andric : Warning<"interop type '%0' cannot be specified more than once">, 1564fe6060f1SDimitry Andric InGroup<OpenMPClauses>; 1565fe6060f1SDimitry Andricdef err_expected_sequence_or_directive : Error< 1566fe6060f1SDimitry Andric "expected an OpenMP 'directive' or 'sequence' attribute argument">; 1567fe6060f1SDimitry Andricdef ext_omp_attributes : ExtWarn< 1568fe6060f1SDimitry Andric "specifying OpenMP directives with [[]] is an OpenMP 5.1 extension">, 1569fe6060f1SDimitry Andric InGroup<OpenMP51Ext>; 1570fe6060f1SDimitry Andricdef warn_omp51_compat_attributes : Warning< 1571fe6060f1SDimitry Andric "specifying OpenMP directives with [[]] is incompatible with OpenMP " 1572fe6060f1SDimitry Andric "standards before OpenMP 5.1">, 1573fe6060f1SDimitry Andric InGroup<OpenMPPre51Compat>, DefaultIgnore; 1574349cc55cSDimitry Andricdef err_omp_expected_colon : Error<"missing ':' in %0">; 15755f757f3fSDimitry Andricdef err_omp_missing_comma : Error< "missing ',' after %0">; 1576349cc55cSDimitry Andricdef err_omp_expected_context_selector 1577349cc55cSDimitry Andric : Error<"expected valid context selector in %0">; 157881ad6265SDimitry Andricdef err_omp_requires_out_inout_depend_type : Error< 157981ad6265SDimitry Andric "reserved locator 'omp_all_memory' requires 'out' or 'inout' " 158081ad6265SDimitry Andric "dependency types">; 158181ad6265SDimitry Andricdef warn_omp_more_one_omp_all_memory : Warning< 158281ad6265SDimitry Andric "reserved locator 'omp_all_memory' cannot be specified more than once">, 158381ad6265SDimitry Andric InGroup<OpenMPClauses>; 158406c3fb27SDimitry Andricdef warn_omp_depend_in_ordered_deprecated : Warning<"'depend' clause for" 158506c3fb27SDimitry Andric " 'ordered' is deprecated; use 'doacross' instead">, InGroup<Deprecated>; 15865f757f3fSDimitry Andricdef warn_omp_invalid_attribute_for_ompx_attributes : Warning<"'ompx_attribute' clause only allows " 15875f757f3fSDimitry Andric "'amdgpu_flat_work_group_size', 'amdgpu_waves_per_eu', and 'launch_bounds'; " 15885f757f3fSDimitry Andric "%0 is ignored">, InGroup<OpenMPExtensions>; 15890b57cec5SDimitry Andric 15900b57cec5SDimitry Andric// Pragma loop support. 15910b57cec5SDimitry Andricdef err_pragma_loop_missing_argument : Error< 15920b57cec5SDimitry Andric "missing argument; expected %select{an integer value|" 15930b57cec5SDimitry Andric "'enable'%select{|, 'full'}1%select{|, 'assume_safety'}2 or 'disable'}0">; 15940b57cec5SDimitry Andricdef err_pragma_loop_invalid_option : Error< 15950b57cec5SDimitry Andric "%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, " 15960b57cec5SDimitry Andric "vectorize_width, interleave, interleave_count, unroll, unroll_count, " 1597a7dea167SDimitry Andric "pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute">; 1598e8d8bef9SDimitry Andricdef err_pragma_loop_invalid_vectorize_option : Error< 1599e8d8bef9SDimitry Andric "vectorize_width loop hint malformed; use vectorize_width(X, fixed) or " 1600e8d8bef9SDimitry Andric "vectorize_width(X, scalable) where X is an integer, or vectorize_width('fixed' or 'scalable')">; 1601e8d8bef9SDimitry Andricdef note_pragma_loop_invalid_vectorize_option : Note< 1602e8d8bef9SDimitry Andric "vectorize_width loop hint malformed; use vectorize_width(X, fixed) or " 1603e8d8bef9SDimitry Andric "vectorize_width(X, scalable) where X is an integer, or vectorize_width('fixed' or 'scalable')">; 16040b57cec5SDimitry Andric 16050b57cec5SDimitry Andricdef err_pragma_fp_invalid_option : Error< 16065f757f3fSDimitry Andric "%select{invalid|missing}0 option%select{ %1|}0; expected 'contract', 'reassociate', 'reciprocal', or 'exceptions'">; 16070b57cec5SDimitry Andricdef err_pragma_fp_invalid_argument : Error< 1608e8d8bef9SDimitry Andric "unexpected argument '%0' to '#pragma clang fp %1'; expected " 16095ffd83dbSDimitry Andric "%select{" 1610e8d8bef9SDimitry Andric "'fast' or 'on' or 'off'|" 1611e8d8bef9SDimitry Andric "'on' or 'off'|" 16125f757f3fSDimitry Andric "'on' or 'off'|" 161381ad6265SDimitry Andric "'ignore', 'maytrap' or 'strict'|" 161481ad6265SDimitry Andric "'source', 'double' or 'extended'}2">; 16150b57cec5SDimitry Andric 16160b57cec5SDimitry Andricdef err_pragma_invalid_keyword : Error< 16170b57cec5SDimitry Andric "invalid argument; expected 'enable'%select{|, 'full'}0%select{|, 'assume_safety'}1 or 'disable'">; 16180b57cec5SDimitry Andricdef err_pragma_pipeline_invalid_keyword : Error< 16190b57cec5SDimitry Andric "invalid argument; expected 'disable'">; 16200b57cec5SDimitry Andric 16217a6dacacSDimitry Andric// API notes. 16227a6dacacSDimitry Andricdef err_type_unparsed : Error<"unparsed tokens following type">; 16237a6dacacSDimitry Andric 16240b57cec5SDimitry Andric// Pragma unroll support. 16250b57cec5SDimitry Andricdef warn_pragma_unroll_cuda_value_in_parens : Warning< 16260b57cec5SDimitry Andric "argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">, 16270b57cec5SDimitry Andric InGroup<CudaCompat>; 16280b57cec5SDimitry Andric 16290b57cec5SDimitry Andricdef warn_cuda_attr_lambda_position : Warning< 1630349cc55cSDimitry Andric "nvcc does not allow '__%0__' to appear after the parameter list in lambdas">, 16310b57cec5SDimitry Andric InGroup<CudaCompat>; 16320b57cec5SDimitry Andricdef warn_pragma_force_cuda_host_device_bad_arg : Warning< 16330b57cec5SDimitry Andric "incorrect use of #pragma clang force_cuda_host_device begin|end">, 16340b57cec5SDimitry Andric InGroup<IgnoredPragmas>; 16350b57cec5SDimitry Andricdef err_pragma_cannot_end_force_cuda_host_device : Error< 16360b57cec5SDimitry Andric "force_cuda_host_device end pragma without matching " 16370b57cec5SDimitry Andric "force_cuda_host_device begin">; 16380eae32dcSDimitry Andric 16390eae32dcSDimitry Andricdef warn_ext_int_deprecated : Warning< 16400eae32dcSDimitry Andric "'_ExtInt' is deprecated; use '_BitInt' instead">, InGroup<DeprecatedType>; 16410eae32dcSDimitry Andricdef ext_bit_int : Extension< 16420eae32dcSDimitry Andric "'_BitInt' in %select{C17 and earlier|C++}0 is a Clang extension">, 16430eae32dcSDimitry Andric InGroup<DiagGroup<"bit-int-extension">>; 16440b57cec5SDimitry Andric} // end of Parse Issue category. 16450b57cec5SDimitry Andric 16460b57cec5SDimitry Andriclet CategoryName = "Modules Issue" in { 16470b57cec5SDimitry Andricdef err_unexpected_module_decl : Error< 16480b57cec5SDimitry Andric "module declaration can only appear at the top level">; 16490b57cec5SDimitry Andricdef err_module_expected_ident : Error< 16500b57cec5SDimitry Andric "expected a module name after '%select{module|import}0'">; 16510b57cec5SDimitry Andricdef err_attribute_not_module_attr : Error< 16520b57cec5SDimitry Andric "%0 attribute cannot be applied to a module">; 165306c3fb27SDimitry Andricdef err_keyword_not_module_attr : Error< 165406c3fb27SDimitry Andric "%0 cannot be applied to a module">; 16550b57cec5SDimitry Andricdef err_attribute_not_import_attr : Error< 16560b57cec5SDimitry Andric "%0 attribute cannot be applied to a module import">; 165706c3fb27SDimitry Andricdef err_keyword_not_import_attr : Error< 165806c3fb27SDimitry Andric "%0 cannot be applied to a module import">; 16590b57cec5SDimitry Andricdef err_module_expected_semi : Error< 16600b57cec5SDimitry Andric "expected ';' after module name">; 16610b57cec5SDimitry Andricdef err_global_module_introducer_not_at_start : Error< 16620b57cec5SDimitry Andric "'module;' introducing a global module fragment can appear only " 16630b57cec5SDimitry Andric "at the start of the translation unit">; 16640b57cec5SDimitry Andricdef err_module_fragment_exported : Error< 16650b57cec5SDimitry Andric "%select{global|private}0 module fragment cannot be exported">; 16660b57cec5SDimitry Andricdef err_private_module_fragment_expected_semi : Error< 16670b57cec5SDimitry Andric "expected ';' after private module fragment declaration">; 16680b57cec5SDimitry Andricdef err_missing_before_module_end : Error<"expected %0 at end of module">; 16690b57cec5SDimitry Andricdef err_unsupported_module_partition : Error< 167081ad6265SDimitry Andric "module partitions are only supported for C++20 onwards">; 167181ad6265SDimitry Andricdef err_import_not_allowed_here : Error< 167281ad6265SDimitry Andric "imports must immediately follow the module declaration">; 167381ad6265SDimitry Andricdef err_partition_import_outside_module : Error< 167481ad6265SDimitry Andric "module partition imports must be within a module purview">; 167581ad6265SDimitry Andricdef err_import_in_wrong_fragment : Error< 167681ad6265SDimitry Andric "module%select{| partition}0 imports cannot be in the %select{global|private}1 module fragment">; 16770b57cec5SDimitry Andric 16780b57cec5SDimitry Andricdef err_export_empty : Error<"export declaration cannot be empty">; 16790b57cec5SDimitry Andric} 16800b57cec5SDimitry Andric 16810b57cec5SDimitry Andriclet CategoryName = "Generics Issue" in { 16820b57cec5SDimitry Andric 16830b57cec5SDimitry Andricdef err_objc_expected_type_parameter : Error< 16840b57cec5SDimitry Andric "expected type parameter name">; 16850b57cec5SDimitry Andric 16860b57cec5SDimitry Andricdef err_objc_parameterized_implementation : Error< 16870b57cec5SDimitry Andric "@implementation cannot have type parameters">; 16880b57cec5SDimitry Andric 16890b57cec5SDimitry Andricdef err_objc_type_args_after_protocols : Error< 16900b57cec5SDimitry Andric "protocol qualifiers must precede type arguments">; 16910b57cec5SDimitry Andric 16920b57cec5SDimitry Andricdef note_meant_to_use_typename : Note< 16930b57cec5SDimitry Andric "did you mean to use 'typename'?">; 16940b57cec5SDimitry Andric} 16950b57cec5SDimitry Andric 16960b57cec5SDimitry Andriclet CategoryName = "Coroutines Issue" in { 16970b57cec5SDimitry Andricdef err_for_co_await_not_range_for : Error< 16980b57cec5SDimitry Andric "'co_await' modifier can only be applied to range-based for loop">; 16994824e7fdSDimitry Andricdef warn_deprecated_for_co_await : Warning< 17004824e7fdSDimitry Andric "'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated">, 17014824e7fdSDimitry Andric InGroup<DeprecatedCoroutine>; 17020b57cec5SDimitry Andric} 17030b57cec5SDimitry Andric 17040b57cec5SDimitry Andriclet CategoryName = "Concepts Issue" in { 17050b57cec5SDimitry Andricdef err_concept_definition_not_identifier : Error< 17060b57cec5SDimitry Andric "name defined in concept definition must be an identifier">; 1707bdd1243dSDimitry Andricdef err_concept_legacy_bool_keyword : Error< 1708bdd1243dSDimitry Andric "ISO C++ does not permit the 'bool' keyword after 'concept'">; 170955e4f9d5SDimitry Andricdef err_placeholder_expected_auto_or_decltype_auto : Error< 171055e4f9d5SDimitry Andric "expected 'auto' or 'decltype(auto)' after concept name">; 17110b57cec5SDimitry Andric} 17120b57cec5SDimitry Andric 17135ffd83dbSDimitry Andricdef warn_max_tokens : Warning< 17145ffd83dbSDimitry Andric "the number of preprocessor source tokens (%0) exceeds this token limit (%1)">, 17155ffd83dbSDimitry Andric InGroup<MaxTokens>, DefaultIgnore; 17165ffd83dbSDimitry Andric 17175ffd83dbSDimitry Andricdef warn_max_tokens_total : Warning< 17185ffd83dbSDimitry Andric "the total number of preprocessor source tokens (%0) exceeds the token limit (%1)">, 17195ffd83dbSDimitry Andric InGroup<MaxTokens>, DefaultIgnore; 17205ffd83dbSDimitry Andric 17215ffd83dbSDimitry Andricdef note_max_tokens_total_override : Note<"total token limit set here">; 17225ffd83dbSDimitry Andric 172381ad6265SDimitry Andric// HLSL Parser Diagnostics 172481ad6265SDimitry Andric 172581ad6265SDimitry Andricdef err_expected_semantic_identifier : Error< 172681ad6265SDimitry Andric "expected HLSL Semantic identifier">; 1727bdd1243dSDimitry Andricdef err_invalid_declaration_in_hlsl_buffer : Error< 1728bdd1243dSDimitry Andric "invalid declaration inside %select{tbuffer|cbuffer}0">; 172981ad6265SDimitry Andricdef err_unknown_hlsl_semantic : Error<"unknown HLSL semantic %0">; 1730bdd1243dSDimitry Andricdef err_hlsl_separate_attr_arg_and_number : Error<"wrong argument format for hlsl attribute, use %0 instead">; 173181ad6265SDimitry Andricdef ext_hlsl_access_specifiers : ExtWarn< 173281ad6265SDimitry Andric "access specifiers are a clang HLSL extension">, 173381ad6265SDimitry Andric InGroup<HLSLExtension>; 173481ad6265SDimitry Andric 17350b57cec5SDimitry Andric} // end of Parser diagnostics 1736