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">;
1600b57cec5SDimitry Andric
161a7dea167SDimitry Andricdef ext_c99_feature : Extension<
162a7dea167SDimitry Andric  "'%0' is a C99 extension">, InGroup<C99>;
163a7dea167SDimitry Andricdef ext_c11_feature : Extension<
164a7dea167SDimitry Andric  "'%0' is a C11 extension">, InGroup<C11>;
1650b57cec5SDimitry Andric
1660b57cec5SDimitry Andricdef err_c11_noreturn_misplaced : Error<
1670b57cec5SDimitry Andric  "'_Noreturn' keyword must precede function declarator">;
1680b57cec5SDimitry Andric
1690b57cec5SDimitry Andricdef ext_gnu_indirect_goto : Extension<
1700b57cec5SDimitry Andric  "use of GNU indirect-goto extension">, InGroup<GNULabelsAsValue>;
1710b57cec5SDimitry Andricdef ext_gnu_address_of_label : Extension<
1720b57cec5SDimitry Andric  "use of GNU address-of-label extension">, InGroup<GNULabelsAsValue>;
1730b57cec5SDimitry Andricdef err_stmtexpr_file_scope : Error<
1740b57cec5SDimitry Andric  "statement expression not allowed at file scope">;
1750b57cec5SDimitry Andricdef ext_gnu_statement_expr : Extension<
1760b57cec5SDimitry Andric  "use of GNU statement expression extension">, InGroup<GNUStatementExpression>;
17781ad6265SDimitry Andricdef ext_gnu_statement_expr_macro : Extension<
17881ad6265SDimitry Andric  "use of GNU statement expression extension from macro expansion">,
17981ad6265SDimitry Andric  InGroup<GNUStatementExpressionFromMacroExpansion>;
1800b57cec5SDimitry Andricdef ext_gnu_conditional_expr : Extension<
1810b57cec5SDimitry Andric  "use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>;
1820b57cec5SDimitry Andricdef ext_gnu_empty_initializer : Extension<
1830b57cec5SDimitry Andric  "use of GNU empty initializer extension">, InGroup<GNUEmptyInitializer>;
1840b57cec5SDimitry Andricdef ext_gnu_array_range : Extension<"use of GNU array range extension">,
1850b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1860b57cec5SDimitry Andricdef ext_gnu_missing_equal_designator : ExtWarn<
1870b57cec5SDimitry Andric  "use of GNU 'missing =' extension in designator">,
1880b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1890b57cec5SDimitry Andricdef err_expected_equal_designator : Error<"expected '=' or another designator">;
1900b57cec5SDimitry Andricdef ext_gnu_old_style_field_designator : ExtWarn<
1910b57cec5SDimitry Andric  "use of GNU old-style field designator extension">,
1920b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1930b57cec5SDimitry Andricdef ext_gnu_case_range : Extension<"use of GNU case range extension">,
1940b57cec5SDimitry Andric  InGroup<GNUCaseRange>;
1950b57cec5SDimitry Andric
1960b57cec5SDimitry Andric// Generic errors.
1970b57cec5SDimitry Andricdef err_expected_expression : Error<"expected expression">;
1980b57cec5SDimitry Andricdef err_expected_type : Error<"expected a type">;
1990b57cec5SDimitry Andricdef err_expected_external_declaration : Error<"expected external declaration">;
2000b57cec5SDimitry Andricdef err_extraneous_closing_brace : Error<"extraneous closing brace ('}')">;
2010b57cec5SDimitry Andricdef err_expected_semi_declaration : Error<
2020b57cec5SDimitry Andric  "expected ';' at end of declaration">;
2030b57cec5SDimitry Andricdef err_expected_semi_decl_list : Error<
2040b57cec5SDimitry Andric  "expected ';' at end of declaration list">;
2050b57cec5SDimitry Andricdef ext_expected_semi_decl_list : ExtWarn<
2060b57cec5SDimitry Andric  "expected ';' at end of declaration list">;
2070b57cec5SDimitry Andricdef err_expected_member_name_or_semi : Error<
2080b57cec5SDimitry Andric  "expected member name or ';' after declaration specifiers">;
2090b57cec5SDimitry Andricdef err_function_declared_typedef : Error<
2100b57cec5SDimitry Andric  "function definition declared 'typedef'">;
2110b57cec5SDimitry Andricdef err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">;
2120b57cec5SDimitry Andricdef err_at_in_class : Error<"unexpected '@' in member specification">;
2130b57cec5SDimitry Andricdef err_unexpected_semi : Error<"unexpected ';' before %0">;
2145ffd83dbSDimitry Andricdef err_postfix_after_unary_requires_parens : Error<
2155ffd83dbSDimitry Andric  "expression cannot be followed by a postfix %0 operator; add parentheses">;
216480093f4SDimitry Andricdef err_unparenthesized_non_primary_expr_in_requires_clause : Error<
217480093f4SDimitry Andric  "parentheses are required around this expression in a requires clause">;
218480093f4SDimitry Andricdef note_unparenthesized_non_primary_expr_in_requires_clause : Note<
219480093f4SDimitry Andric  "parentheses are required around this expression in a requires clause">;
2200b57cec5SDimitry Andric
2210b57cec5SDimitry Andricdef err_expected_fn_body : Error<
2220b57cec5SDimitry Andric  "expected function body after function declarator">;
2230b57cec5SDimitry Andricdef warn_attribute_on_function_definition : Warning<
2240b57cec5SDimitry Andric  "GCC does not allow %0 attribute in this position on a function definition">,
2250b57cec5SDimitry Andric  InGroup<GccCompat>;
2260b57cec5SDimitry Andricdef warn_gcc_attribute_location : Warning<
2270b57cec5SDimitry Andric  "GCC does not allow an attribute in this position on a function declaration">,
2280b57cec5SDimitry Andric  InGroup<GccCompat>;
2290b57cec5SDimitry Andricdef warn_gcc_variable_decl_in_for_loop : Warning<
2300b57cec5SDimitry Andric  "GCC does not allow variable declarations in for loop initializers before "
2310b57cec5SDimitry Andric  "C99">, InGroup<GccCompat>;
2320b57cec5SDimitry Andricdef warn_attribute_no_decl : Warning<
2330b57cec5SDimitry Andric  "attribute %0 ignored, because it is not attached to a declaration">,
2340b57cec5SDimitry Andric  InGroup<IgnoredAttributes>;
2350b57cec5SDimitry Andricdef err_ms_attributes_not_enabled : Error<
2360b57cec5SDimitry Andric  "'__declspec' attributes are not enabled; use '-fdeclspec' or "
2370b57cec5SDimitry Andric  "'-fms-extensions' to enable support for __declspec attributes">;
2380b57cec5SDimitry Andricdef err_expected_method_body : Error<"expected method body">;
2390b57cec5SDimitry Andricdef err_declspec_after_virtspec : Error<
2400b57cec5SDimitry Andric  "'%0' qualifier may not appear after the virtual specifier '%1'">;
2410b57cec5SDimitry Andricdef err_invalid_token_after_toplevel_declarator : Error<
2420b57cec5SDimitry Andric  "expected ';' after top level declarator">;
2430b57cec5SDimitry Andricdef err_invalid_token_after_declarator_suggest_equal : Error<
2440b57cec5SDimitry Andric  "invalid %0 at end of declaration; did you mean '='?">;
2450b57cec5SDimitry Andricdef err_expected_statement : Error<"expected statement">;
2460b57cec5SDimitry Andricdef err_expected_lparen_after : Error<"expected '(' after '%0'">;
2470b57cec5SDimitry Andricdef err_expected_rparen_after : Error<"expected ')' after '%0'">;
2480b57cec5SDimitry Andricdef err_expected_punc : Error<"expected ')' or ',' after '%0'">;
2490b57cec5SDimitry Andricdef err_expected_less_after : Error<"expected '<' after '%0'">;
2500b57cec5SDimitry Andricdef err_expected_lbrace_in_compound_literal : Error<
2510b57cec5SDimitry Andric  "expected '{' in compound literal">;
2520b57cec5SDimitry Andricdef err_expected_while : Error<"expected 'while' in do/while loop">;
2530b57cec5SDimitry Andric
2540b57cec5SDimitry Andricdef err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">;
2550b57cec5SDimitry Andricdef err_expected_semi_after_expr : Error<"expected ';' after expression">;
2560b57cec5SDimitry Andricdef err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">;
2570b57cec5SDimitry Andric
2580b57cec5SDimitry Andricdef err_expected_semi_after_method_proto : Error<
2590b57cec5SDimitry Andric  "expected ';' after method prototype">;
2600b57cec5SDimitry Andricdef err_expected_semi_after_namespace_name : Error<
2610b57cec5SDimitry Andric  "expected ';' after namespace name">;
2620b57cec5SDimitry Andricdef err_unexpected_namespace_attributes_alias : Error<
2630b57cec5SDimitry Andric  "attributes cannot be specified on namespace alias">;
2640b57cec5SDimitry Andricdef err_unexpected_nested_namespace_attribute : Error<
2650b57cec5SDimitry Andric  "attributes cannot be specified on a nested namespace definition">;
2660b57cec5SDimitry Andricdef err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
2670b57cec5SDimitry Andricdef err_namespace_nonnamespace_scope : Error<
2680b57cec5SDimitry Andric  "namespaces can only be defined in global or namespace scope">;
2690b57cec5SDimitry Andricdef ext_nested_namespace_definition : ExtWarn<
2700b57cec5SDimitry Andric  "nested namespace definition is a C++17 extension; "
2710b57cec5SDimitry Andric  "define each namespace separately">, InGroup<CXX17>;
2720b57cec5SDimitry Andricdef warn_cxx14_compat_nested_namespace_definition : Warning<
2730b57cec5SDimitry Andric  "nested namespace definition is incompatible with C++ standards before C++17">,
2740b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
2750b57cec5SDimitry Andricdef ext_inline_nested_namespace_definition : ExtWarn<
27647395794SDimitry Andric  "inline nested namespace definition is a C++20 extension">, InGroup<CXX20>;
2770b57cec5SDimitry Andricdef warn_cxx17_compat_inline_nested_namespace_definition : Warning<
2780b57cec5SDimitry Andric  "inline nested namespace definition is incompatible with C++ standards before"
27947395794SDimitry Andric  " C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;
2800b57cec5SDimitry Andricdef err_inline_nested_namespace_definition : Error<
2810b57cec5SDimitry Andric  "nested namespace definition cannot be 'inline'">;
2820b57cec5SDimitry Andricdef err_expected_semi_after_attribute_list : Error<
2830b57cec5SDimitry Andric  "expected ';' after attribute list">;
2840b57cec5SDimitry Andricdef err_expected_semi_after_static_assert : Error<
285972a253aSDimitry Andric  "expected ';' after '%0'">;
2860b57cec5SDimitry Andricdef err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
2870b57cec5SDimitry Andricdef err_single_decl_assign_in_for_range : Error<
2880b57cec5SDimitry Andric  "range-based 'for' statement uses ':', not '='">;
2890b57cec5SDimitry Andricdef warn_missing_selector_name : Warning<
2900b57cec5SDimitry Andric  "%0 used as the name of the previous parameter rather than as part "
2910b57cec5SDimitry Andric  "of the selector">,
2920b57cec5SDimitry Andric  InGroup<DiagGroup<"missing-selector-name">>;
2930b57cec5SDimitry Andricdef note_missing_selector_name : Note<
2940b57cec5SDimitry Andric  "introduce a parameter name to make %0 part of the selector">;
2950b57cec5SDimitry Andricdef note_force_empty_selector_name : Note<
2960b57cec5SDimitry Andric  "or insert whitespace before ':' to use %0 as parameter name "
2970b57cec5SDimitry Andric  "and have an empty entry in the selector">;
298bdd1243dSDimitry Andricdef ext_c_label_end_of_compound_statement : ExtWarn<
299bdd1243dSDimitry Andric  "label at end of compound statement is a C2x extension">,
300bdd1243dSDimitry Andric   InGroup<C2x>;
301bdd1243dSDimitry Andricdef ext_cxx_label_end_of_compound_statement : ExtWarn<
302bdd1243dSDimitry Andric  "label at end of compound statement is a C++2b extension">,
303bdd1243dSDimitry Andric   InGroup<CXX2b>;
304bdd1243dSDimitry Andricdef warn_c2x_compat_label_end_of_compound_statement : Warning<
305bdd1243dSDimitry Andric  "label at end of compound statement is incompatible with C standards before C2x">,
306bdd1243dSDimitry Andric  InGroup<CPre2xCompat>, DefaultIgnore;
307bdd1243dSDimitry Andricdef warn_cxx20_compat_label_end_of_compound_statement : Warning<
308bdd1243dSDimitry Andric  "label at end of compound statement is incompatible with C++ standards before C++2b">,
309bdd1243dSDimitry Andric  InGroup<CXXPre2bCompat>, DefaultIgnore;
3100b57cec5SDimitry Andricdef err_address_of_label_outside_fn : Error<
3110b57cec5SDimitry Andric  "use of address-of-label extension outside of a function body">;
3120b57cec5SDimitry Andricdef err_asm_operand_wide_string_literal : Error<
313480093f4SDimitry Andric  "cannot use %select{unicode|wide|an empty}0 string literal in 'asm'">;
3140b57cec5SDimitry Andricdef err_expected_selector_for_method : Error<
3150b57cec5SDimitry Andric  "expected selector for Objective-C method">;
3160b57cec5SDimitry Andricdef err_expected_property_name : Error<"expected property name">;
3170b57cec5SDimitry Andric
3180b57cec5SDimitry Andricdef err_unexpected_at : Error<"unexpected '@' in program">;
3190b57cec5SDimitry Andricdef err_atimport : Error<
3200b57cec5SDimitry Andric"use of '@import' when modules are disabled">;
3210b57cec5SDimitry Andric
3220b57cec5SDimitry Andricdef warn_atimport_in_framework_header : Warning<
3230b57cec5SDimitry Andric  "use of '@import' in framework header is discouraged, "
3240b57cec5SDimitry Andric  "including this header requires -fmodules">,
3250b57cec5SDimitry Andric  InGroup<FrameworkHdrAtImport>;
3260b57cec5SDimitry Andric
3270b57cec5SDimitry Andricdef err_invalid_reference_qualifier_application : Error<
3280b57cec5SDimitry Andric  "'%0' qualifier may not be applied to a reference">;
3290b57cec5SDimitry Andricdef err_illegal_decl_reference_to_reference : Error<
3300b57cec5SDimitry Andric  "%0 declared as a reference to a reference">;
3310b57cec5SDimitry Andricdef ext_rvalue_reference : ExtWarn<
3320b57cec5SDimitry Andric  "rvalue references are a C++11 extension">, InGroup<CXX11>;
3330b57cec5SDimitry Andricdef warn_cxx98_compat_rvalue_reference : Warning<
3340b57cec5SDimitry Andric  "rvalue references are incompatible with C++98">,
3350b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3360b57cec5SDimitry Andricdef ext_ref_qualifier : ExtWarn<
3370b57cec5SDimitry Andric  "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>;
3380b57cec5SDimitry Andricdef warn_cxx98_compat_ref_qualifier : Warning<
3390b57cec5SDimitry Andric  "reference qualifiers on functions are incompatible with C++98">,
3400b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3410b57cec5SDimitry Andricdef ext_inline_namespace : ExtWarn<
3420b57cec5SDimitry Andric  "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
3430b57cec5SDimitry Andricdef warn_cxx98_compat_inline_namespace : Warning<
3440b57cec5SDimitry Andric  "inline namespaces are incompatible with C++98">,
3450b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3460b57cec5SDimitry Andricdef ext_generalized_initializer_lists : ExtWarn<
3470b57cec5SDimitry Andric  "generalized initializer lists are a C++11 extension">,
3480b57cec5SDimitry Andric  InGroup<CXX11>;
3490b57cec5SDimitry Andricdef warn_cxx98_compat_generalized_initializer_lists : Warning<
3500b57cec5SDimitry Andric  "generalized initializer lists are incompatible with C++98">,
3510b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3520b57cec5SDimitry Andricdef err_init_list_bin_op : Error<"initializer list cannot be used on the "
3530b57cec5SDimitry Andric  "%select{left|right}0 hand side of operator '%1'">;
3540b57cec5SDimitry Andricdef warn_cxx98_compat_trailing_return_type : Warning<
3550b57cec5SDimitry Andric  "trailing return types are incompatible with C++98">,
3560b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
357480093f4SDimitry Andricdef err_requires_clause_must_appear_after_trailing_return : Error<
358480093f4SDimitry Andric  "trailing return type must appear before trailing requires clause">;
359480093f4SDimitry Andricdef err_requires_clause_on_declarator_not_declaring_a_function : Error<
360480093f4SDimitry Andric  "trailing requires clause can only be used when declaring a function">;
361480093f4SDimitry Andricdef err_requires_clause_inside_parens : Error<
362480093f4SDimitry Andric  "trailing requires clause should be placed outside parentheses">;
3630b57cec5SDimitry Andricdef ext_auto_storage_class : ExtWarn<
3640b57cec5SDimitry Andric  "'auto' storage class specifier is not permitted in C++11, and will not "
3650b57cec5SDimitry Andric  "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
3660b57cec5SDimitry Andricdef ext_decltype_auto_type_specifier : ExtWarn<
3670b57cec5SDimitry Andric  "'decltype(auto)' type specifier is a C++14 extension">, InGroup<CXX14>;
3680b57cec5SDimitry Andricdef warn_cxx11_compat_decltype_auto_type_specifier : Warning<
3690b57cec5SDimitry Andric  "'decltype(auto)' type specifier is incompatible with C++ standards before "
3700b57cec5SDimitry Andric  "C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
3710b57cec5SDimitry Andricdef ext_auto_type : Extension<
3720b57cec5SDimitry Andric  "'__auto_type' is a GNU extension">,
3730b57cec5SDimitry Andric  InGroup<GNUAutoType>;
374bdd1243dSDimitry Andricdef warn_c2x_compat_typeof_type_specifier : Warning<
375bdd1243dSDimitry Andric  "'%select{typeof|typeof_unqual}0' is incompatible with C standards before "
376bdd1243dSDimitry Andric  "C2x">, InGroup<CPre2xCompat>, DefaultIgnore;
3770b57cec5SDimitry Andricdef ext_for_range : ExtWarn<
3780b57cec5SDimitry Andric  "range-based for loop is a C++11 extension">, InGroup<CXX11>;
3790b57cec5SDimitry Andricdef warn_cxx98_compat_for_range : Warning<
3800b57cec5SDimitry Andric  "range-based for loop is incompatible with C++98">,
3810b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3820b57cec5SDimitry Andricdef err_for_range_identifier : Error<
3830b57cec5SDimitry Andric  "range-based for loop requires type for loop variable">;
3840b57cec5SDimitry Andricdef err_for_range_expected_decl : Error<
3850b57cec5SDimitry Andric  "for range declaration must declare a variable">;
3860b57cec5SDimitry Andricdef err_argument_required_after_attribute : Error<
3870b57cec5SDimitry Andric  "argument required after attribute">;
3880b57cec5SDimitry Andricdef err_missing_param : Error<"expected parameter declarator">;
389480093f4SDimitry Andricdef err_function_scope_depth_exceeded : Error<
390480093f4SDimitry Andric  "function scope depth exceeded maximum of %0">, DefaultFatal;
3910b57cec5SDimitry Andricdef err_missing_comma_before_ellipsis : Error<
3920b57cec5SDimitry Andric  "C requires a comma prior to the ellipsis in a variadic function type">;
3930b57cec5SDimitry Andricdef err_unexpected_typedef_ident : Error<
3940b57cec5SDimitry Andric  "unexpected type name %0: expected identifier">;
3950b57cec5SDimitry Andricdef warn_cxx98_compat_decltype : Warning<
3960b57cec5SDimitry Andric  "'decltype' type specifier is incompatible with C++98">,
3970b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3980b57cec5SDimitry Andricdef err_unexpected_scope_on_base_decltype : Error<
3990b57cec5SDimitry Andric  "unexpected namespace scope prior to decltype">;
4000b57cec5SDimitry Andricdef err_expected_class_name : Error<"expected class name">;
4010b57cec5SDimitry Andricdef err_expected_class_name_not_template :
4020b57cec5SDimitry Andric  Error<"'typename' is redundant; base classes are implicitly types">;
4030b57cec5SDimitry Andricdef err_unspecified_vla_size_with_static : Error<
4040b57cec5SDimitry Andric  "'static' may not be used with an unspecified variable length array size">;
4050b57cec5SDimitry Andricdef err_unspecified_size_with_static : Error<
4060b57cec5SDimitry Andric  "'static' may not be used without an array size">;
4070b57cec5SDimitry Andricdef err_expected_parentheses_around_typename : Error<
4080b57cec5SDimitry Andric  "expected parentheses around type name in %0 expression">;
4090b57cec5SDimitry Andric
4100b57cec5SDimitry Andricdef err_expected_case_before_expression: Error<
4110b57cec5SDimitry Andric  "expected 'case' keyword before expression">;
4120b57cec5SDimitry Andric
4130b57cec5SDimitry Andricdef ext_warn_gnu_final : ExtWarn<
4140b57cec5SDimitry Andric  "__final is a GNU extension, consider using C++11 final">,
4150b57cec5SDimitry Andric  InGroup<GccCompat>;
4160b57cec5SDimitry Andric
4170b57cec5SDimitry Andric// Declarations.
4180b57cec5SDimitry Andricdef err_typename_requires_specqual : Error<
4190b57cec5SDimitry Andric  "type name requires a specifier or qualifier">;
4200b57cec5SDimitry Andricdef err_typename_invalid_storageclass : Error<
4210b57cec5SDimitry Andric  "type name does not allow storage class to be specified">;
4220b57cec5SDimitry Andricdef err_typename_invalid_functionspec : Error<
4230b57cec5SDimitry Andric  "type name does not allow function specifier to be specified">;
4240b57cec5SDimitry Andricdef err_typename_invalid_constexpr : Error<
425a7dea167SDimitry Andric  "type name does not allow %sub{select_constexpr_spec_kind}0 specifier "
426a7dea167SDimitry Andric  "to be specified">;
4270b57cec5SDimitry Andricdef err_typename_identifiers_only : Error<
4280b57cec5SDimitry Andric  "typename is allowed for identifiers only">;
4290b57cec5SDimitry Andric
4300b57cec5SDimitry Andricdef err_friend_invalid_in_context : Error<
4310b57cec5SDimitry Andric  "'friend' used outside of class">;
4320b57cec5SDimitry Andricdef err_templated_using_directive_declaration : Error<
4330b57cec5SDimitry Andric  "cannot template a using %select{directive|declaration}0">;
4340b57cec5SDimitry Andricdef err_unexpected_colon_in_nested_name_spec : Error<
4350b57cec5SDimitry Andric  "unexpected ':' in nested name specifier; did you mean '::'?">;
4360b57cec5SDimitry Andricdef err_unexpected_token_in_nested_name_spec : Error<
4370b57cec5SDimitry Andric  "'%0' cannot be a part of nested name specifier; did you mean ':'?">;
4380b57cec5SDimitry Andricdef err_bool_redeclaration : Error<
4390b57cec5SDimitry Andric  "redeclaration of C++ built-in type 'bool'">;
4400b57cec5SDimitry Andricdef warn_cxx98_compat_static_assert : Warning<
441972a253aSDimitry Andric  "'static_assert' declarations are incompatible with C++98">,
4420b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
443fe6060f1SDimitry Andricdef ext_ms_static_assert : ExtWarn<
444fe6060f1SDimitry Andric  "use of 'static_assert' without inclusion of <assert.h> is a Microsoft "
445fe6060f1SDimitry Andric  "extension">, InGroup<MicrosoftStaticAssert>;
446fe6060f1SDimitry Andricdef ext_cxx_static_assert_no_message : ExtWarn<
447fe6060f1SDimitry Andric  "'static_assert' with no message is a C++17 extension">, InGroup<CXX17>;
448fe6060f1SDimitry Andricdef ext_c_static_assert_no_message : ExtWarn<
449fe6060f1SDimitry Andric  "'_Static_assert' with no message is a C2x extension">, InGroup<C2x>;
4500b57cec5SDimitry Andricdef warn_cxx14_compat_static_assert_no_message : Warning<
451fe6060f1SDimitry Andric  "'static_assert' with no message is incompatible with C++ standards before "
4520b57cec5SDimitry Andric  "C++17">,
4530b57cec5SDimitry Andric  DefaultIgnore, InGroup<CXXPre17Compat>;
454fe6060f1SDimitry Andricdef warn_c17_compat_static_assert_no_message : Warning<
455fe6060f1SDimitry Andric  "'_Static_assert' with no message is incompatible with C standards before "
456fe6060f1SDimitry Andric  "C2x">,
457fe6060f1SDimitry Andric  DefaultIgnore, InGroup<CPre2xCompat>;
4580b57cec5SDimitry Andricdef err_function_definition_not_allowed : Error<
4590b57cec5SDimitry Andric  "function definition is not allowed here">;
4600b57cec5SDimitry Andricdef err_expected_end_of_enumerator : Error<
4610b57cec5SDimitry Andric  "expected '= constant-expression' or end of enumerator definition">;
4620b57cec5SDimitry Andricdef err_expected_coloncolon_after_super : Error<
4630b57cec5SDimitry Andric  "expected '::' after '__super'">;
4640b57cec5SDimitry Andric
4650b57cec5SDimitry Andricdef ext_decomp_decl_empty : ExtWarn<
4660b57cec5SDimitry Andric  "ISO C++17 does not allow a decomposition group to be empty">,
4670b57cec5SDimitry Andric  InGroup<DiagGroup<"empty-decomposition">>;
4680b57cec5SDimitry Andric
4690b57cec5SDimitry Andric/// Objective-C parser diagnostics
4700b57cec5SDimitry Andricdef err_expected_minus_or_plus : Error<
4710b57cec5SDimitry Andric  "method type specifier must start with '-' or '+'">;
4720b57cec5SDimitry Andricdef err_objc_missing_end : Error<"missing '@end'">;
4730b57cec5SDimitry Andricdef note_objc_container_start : Note<
4740b57cec5SDimitry Andric  "%select{class|protocol|category|class extension|implementation"
4750b57cec5SDimitry Andric  "|category implementation}0 started here">;
4760b57cec5SDimitry Andricdef warn_objc_protocol_qualifier_missing_id : Warning<
4770b57cec5SDimitry Andric  "protocol has no object type specified; defaults to qualified 'id'">;
4780b57cec5SDimitry Andricdef err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">;
4790b57cec5SDimitry Andricdef err_illegal_super_cast : Error<
4800b57cec5SDimitry Andric  "cannot cast 'super' (it isn't an expression)">;
4810b57cec5SDimitry Andricdef err_nsnumber_nonliteral_unary : Error<
4820b57cec5SDimitry Andric  "@%0 must be followed by a number to form an NSNumber object">;
4830b57cec5SDimitry Andricdef warn_cstyle_param : Warning<
4840b57cec5SDimitry Andric  "use of C-style parameters in Objective-C method declarations"
4850b57cec5SDimitry Andric  " is deprecated">, InGroup<DeprecatedDeclarations>;
4860b57cec5SDimitry Andric
4870b57cec5SDimitry Andriclet CategoryName = "ARC Parse Issue" in {
4880b57cec5SDimitry Andricdef err_arc_bridge_retain : Error<
4890b57cec5SDimitry Andric  "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">;
4900b57cec5SDimitry Andric// To be default mapped to an error later.
4910b57cec5SDimitry Andricdef warn_arc_bridge_cast_nonarc : Warning<
4920b57cec5SDimitry Andric  "'%0' casts have no effect when not using ARC">,
4930b57cec5SDimitry Andric  InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>;
4940b57cec5SDimitry Andric}
4950b57cec5SDimitry Andric
4960b57cec5SDimitry Andricdef err_objc_illegal_visibility_spec : Error<
4970b57cec5SDimitry Andric  "illegal visibility specification">;
4980b57cec5SDimitry Andricdef err_objc_illegal_interface_qual : Error<"illegal interface qualifier">;
4990b57cec5SDimitry Andricdef err_objc_expected_equal_for_getter : Error<
5000b57cec5SDimitry Andric  "expected '=' for Objective-C getter">;
5010b57cec5SDimitry Andricdef err_objc_expected_equal_for_setter : Error<
5020b57cec5SDimitry Andric  "expected '=' for Objective-C setter">;
5030b57cec5SDimitry Andricdef err_objc_expected_selector_for_getter_setter : Error<
5040b57cec5SDimitry Andric  "expected selector for Objective-C %select{setter|getter}0">;
5050b57cec5SDimitry Andricdef err_objc_property_requires_field_name : Error<
5060b57cec5SDimitry Andric  "property requires fields to be named">;
5070b57cec5SDimitry Andricdef err_objc_property_bitfield : Error<"property name cannot be a bit-field">;
5080b57cec5SDimitry Andricdef err_objc_expected_property_attr : Error<"unknown property attribute %0">;
5090b57cec5SDimitry Andricdef err_objc_unexpected_attr : Error<
5100b57cec5SDimitry Andric  "prefix attribute must be followed by an interface, protocol, or implementation">;
5110b57cec5SDimitry Andricdef err_objc_postfix_attribute : Error <
5120b57cec5SDimitry Andric  "postfix attributes are not allowed on Objective-C directives">;
5130b57cec5SDimitry Andricdef err_objc_postfix_attribute_hint : Error <
5140b57cec5SDimitry Andric  "postfix attributes are not allowed on Objective-C directives, place"
5150b57cec5SDimitry Andric  " them in front of '%select{@interface|@protocol}0'">;
5160b57cec5SDimitry Andricdef err_objc_directive_only_in_protocol : Error<
5170b57cec5SDimitry Andric  "directive may only be specified in protocols only">;
5180b57cec5SDimitry Andricdef err_missing_catch_finally : Error<
5190b57cec5SDimitry Andric  "@try statement without a @catch and @finally clause">;
5200b57cec5SDimitry Andricdef err_objc_concat_string : Error<"unexpected token after Objective-C string">;
5210b57cec5SDimitry Andricdef err_expected_objc_container : Error<
5220b57cec5SDimitry Andric  "'@end' must appear in an Objective-C context">;
5230b57cec5SDimitry Andricdef err_unexpected_protocol_qualifier : Error<
5240b57cec5SDimitry Andric  "@implementation declaration cannot be protocol qualified">;
5250b57cec5SDimitry Andricdef err_objc_unexpected_atend : Error<
5260b57cec5SDimitry Andric  "'@end' appears where closing brace '}' is expected">;
5270b57cec5SDimitry Andricdef err_synthesized_property_name : Error<
5280b57cec5SDimitry Andric  "expected a property name in @synthesize">;
5290b57cec5SDimitry Andricdef warn_semicolon_before_method_body : Warning<
5300b57cec5SDimitry Andric  "semicolon before method body is ignored">,
5310b57cec5SDimitry Andric  InGroup<SemiBeforeMethodBody>, DefaultIgnore;
5320b57cec5SDimitry Andricdef note_extra_comma_message_arg : Note<
5330b57cec5SDimitry Andric  "comma separating Objective-C messaging arguments">;
5340b57cec5SDimitry Andric
5350b57cec5SDimitry Andricdef err_expected_field_designator : Error<
5360b57cec5SDimitry Andric  "expected a field designator, such as '.field = 4'">;
5370b57cec5SDimitry Andric
5380b57cec5SDimitry Andricdef err_declaration_does_not_declare_param : Error<
5390b57cec5SDimitry Andric  "declaration does not declare a parameter">;
5400b57cec5SDimitry Andricdef err_no_matching_param : Error<"parameter named %0 is missing">;
5410b57cec5SDimitry Andric
5420b57cec5SDimitry Andric/// Objective-C++ parser diagnostics
5430b57cec5SDimitry Andricdef err_expected_token_instead_of_objcxx_keyword : Error<
5440b57cec5SDimitry Andric  "expected %0; %1 is a keyword in Objective-C++">;
5450b57cec5SDimitry Andricdef err_expected_member_name_or_semi_objcxx_keyword : Error<
5460b57cec5SDimitry Andric  "expected member name or ';' after declaration specifiers; "
5470b57cec5SDimitry Andric  "%0 is a keyword in Objective-C++">;
5480b57cec5SDimitry Andric
5490b57cec5SDimitry Andric/// C++ parser diagnostics
5500b57cec5SDimitry Andricdef err_invalid_operator_on_type : Error<
5510b57cec5SDimitry Andric  "cannot use %select{dot|arrow}0 operator on a type">;
5520b57cec5SDimitry Andricdef err_expected_unqualified_id : Error<
5530b57cec5SDimitry Andric  "expected %select{identifier|unqualified-id}0">;
554972a253aSDimitry Andricdef err_while_loop_outside_of_a_function : Error<
555972a253aSDimitry Andric  "while loop outside of a function">;
5560b57cec5SDimitry Andricdef err_brackets_go_after_unqualified_id : Error<
5570b57cec5SDimitry Andric  "brackets are not allowed here; to declare an array, "
5580b57cec5SDimitry Andric  "place the brackets after the %select{identifier|name}0">;
5590b57cec5SDimitry Andricdef err_unexpected_unqualified_id : Error<"type-id cannot have a name">;
5600b57cec5SDimitry Andricdef err_func_def_no_params : Error<
5610b57cec5SDimitry Andric  "function definition does not declare parameters">;
5620b57cec5SDimitry Andricdef err_expected_lparen_after_type : Error<
5630b57cec5SDimitry Andric  "expected '(' for function-style cast or type construction">;
5640b57cec5SDimitry Andricdef err_expected_init_in_condition : Error<
5650b57cec5SDimitry Andric  "variable declaration in condition must have an initializer">;
5660b57cec5SDimitry Andricdef err_expected_init_in_condition_lparen : Error<
5670b57cec5SDimitry Andric  "variable declaration in condition cannot have a parenthesized initializer">;
5680b57cec5SDimitry Andricdef err_extraneous_rparen_in_condition : Error<
5690b57cec5SDimitry Andric  "extraneous ')' after condition, expected a statement">;
570349cc55cSDimitry Andricdef ext_alias_in_init_statement : ExtWarn<
571349cc55cSDimitry Andric  "alias declaration in this context is a C++2b extension">,
572349cc55cSDimitry Andric  InGroup<CXX2b>;
573349cc55cSDimitry Andricdef warn_cxx20_alias_in_init_statement  : Warning<
574349cc55cSDimitry Andric  "alias declaration in this context is incompatible with C++ standards before C++2b">,
575349cc55cSDimitry Andric  DefaultIgnore, InGroup<CXXPre2bCompat>;
5760b57cec5SDimitry Andricdef warn_dangling_else : Warning<
5770b57cec5SDimitry Andric  "add explicit braces to avoid dangling else">,
5780b57cec5SDimitry Andric  InGroup<DanglingElse>;
5790b57cec5SDimitry Andricdef err_expected_member_or_base_name : Error<
5800b57cec5SDimitry Andric  "expected class member or base class name">;
5810b57cec5SDimitry Andricdef err_expected_lbrace_after_base_specifiers : Error<
5820b57cec5SDimitry Andric  "expected '{' after base class list">;
5830b57cec5SDimitry Andricdef err_missing_end_of_definition : Error<
5840b57cec5SDimitry Andric  "missing '}' at end of definition of %q0">;
5850b57cec5SDimitry Andricdef note_missing_end_of_definition_before : Note<
5860b57cec5SDimitry Andric  "still within definition of %q0 here">;
5870b57cec5SDimitry Andricdef ext_ellipsis_exception_spec : Extension<
5880b57cec5SDimitry Andric  "exception specification of '...' is a Microsoft extension">,
5890b57cec5SDimitry Andric  InGroup<MicrosoftExceptionSpec>;
5900b57cec5SDimitry Andricdef err_dynamic_and_noexcept_specification : Error<
5910b57cec5SDimitry Andric  "cannot have both throw() and noexcept() clause on the same function">;
5920b57cec5SDimitry Andricdef err_except_spec_unparsed : Error<
5930b57cec5SDimitry Andric  "unexpected end of exception specification">;
5940b57cec5SDimitry Andricdef ext_dynamic_exception_spec : ExtWarn<
5950b57cec5SDimitry Andric  "ISO C++17 does not allow dynamic exception specifications">,
5960b57cec5SDimitry Andric  InGroup<DynamicExceptionSpec>, DefaultError;
5970b57cec5SDimitry Andricdef warn_exception_spec_deprecated : Warning<
5980b57cec5SDimitry Andric  "dynamic exception specifications are deprecated">,
5990b57cec5SDimitry Andric  InGroup<DeprecatedDynamicExceptionSpec>, DefaultIgnore;
6000b57cec5SDimitry Andricdef note_exception_spec_deprecated : Note<"use '%0' instead">;
6010b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_decl : Warning<
6020b57cec5SDimitry Andric  "noexcept specifications are incompatible with C++98">,
6030b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6040b57cec5SDimitry Andricdef err_expected_catch : Error<"expected catch">;
6050b57cec5SDimitry Andricdef err_using_namespace_in_class : Error<
6060b57cec5SDimitry Andric  "'using namespace' is not allowed in classes">;
607fe6060f1SDimitry Andricdef warn_cxx17_compat_using_enum_declaration : Warning<
608fe6060f1SDimitry Andric  "using enum declaration is incompatible with C++ standards before C++20">,
609fe6060f1SDimitry Andric  InGroup<CXXPre20Compat>, DefaultIgnore;
610fe6060f1SDimitry Andricdef ext_using_enum_declaration : ExtWarn<
611fe6060f1SDimitry Andric  "using enum declaration is a C++20 extension">,
612fe6060f1SDimitry Andric  InGroup<CXX20>;
613bdd1243dSDimitry Andricdef err_using_enum_expect_identifier : Error<
614bdd1243dSDimitry Andric  "using enum %select{requires an enum or typedef name|"
615bdd1243dSDimitry Andric  "does not permit an elaborated enum specifier}0">;
6160b57cec5SDimitry Andricdef err_constructor_bad_name : Error<
6170b57cec5SDimitry Andric  "missing return type for function %0; did you mean the constructor name %1?">;
6180b57cec5SDimitry Andricdef err_destructor_tilde_identifier : Error<
6190b57cec5SDimitry Andric  "expected a class name after '~' to name a destructor">;
6200b57cec5SDimitry Andricdef err_destructor_tilde_scope : Error<
6210b57cec5SDimitry Andric  "'~' in destructor name should be after nested name specifier">;
6220b57cec5SDimitry Andricdef err_destructor_template_id : Error<
6230b57cec5SDimitry Andric  "destructor name %0 does not refer to a template">;
6240b57cec5SDimitry Andricdef err_default_arg_unparsed : Error<
6250b57cec5SDimitry Andric  "unexpected end of default argument expression">;
6260b57cec5SDimitry Andricdef err_bracket_depth_exceeded : Error<
6270b57cec5SDimitry Andric  "bracket nesting level exceeded maximum of %0">, DefaultFatal;
6280b57cec5SDimitry Andricdef note_bracket_depth : Note<
6290b57cec5SDimitry Andric  "use -fbracket-depth=N to increase maximum nesting level">;
6300b57cec5SDimitry Andricdef err_misplaced_ellipsis_in_declaration : Error<
6310b57cec5SDimitry Andric  "'...' must %select{immediately precede declared identifier|"
6320b57cec5SDimitry Andric  "be innermost component of anonymous pack declaration}0">;
6330b57cec5SDimitry Andricdef warn_misplaced_ellipsis_vararg : Warning<
6340b57cec5SDimitry Andric  "'...' in this location creates a C-style varargs function"
6350b57cec5SDimitry Andric  "%select{, not a function parameter pack|}0">,
6360b57cec5SDimitry Andric  InGroup<DiagGroup<"ambiguous-ellipsis">>;
6370b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_existing_ellipsis : Note<
6380b57cec5SDimitry Andric  "preceding '...' declares a function parameter pack">;
6390b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_ellipsis : Note<
6400b57cec5SDimitry Andric  "place '...' %select{immediately before declared identifier|here}0 "
6410b57cec5SDimitry Andric  "to declare a function parameter pack">;
6420b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_comma : Note<
6430b57cec5SDimitry Andric  "insert ',' before '...' to silence this warning">;
6440b57cec5SDimitry Andricdef ext_abstract_pack_declarator_parens : ExtWarn<
6450b57cec5SDimitry Andric  "ISO C++11 requires a parenthesized pack declaration to have a name">,
6460b57cec5SDimitry Andric  InGroup<DiagGroup<"anonymous-pack-parens">>;
6470b57cec5SDimitry Andricdef err_function_is_not_record : Error<
6480b57cec5SDimitry Andric  "unexpected %0 in function call; perhaps remove the %0?">;
6490b57cec5SDimitry Andricdef err_super_in_using_declaration : Error<
6500b57cec5SDimitry Andric  "'__super' cannot be used with a using declaration">;
6510b57cec5SDimitry Andricdef ext_constexpr_if : ExtWarn<
6520b57cec5SDimitry Andric  "constexpr if is a C++17 extension">, InGroup<CXX17>;
6530b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_if : Warning<
6540b57cec5SDimitry Andric  "constexpr if is incompatible with C++ standards before C++17">,
6550b57cec5SDimitry Andric  DefaultIgnore, InGroup<CXXPre17Compat>;
656349cc55cSDimitry Andricdef ext_consteval_if : ExtWarn<
657349cc55cSDimitry Andric  "consteval if is a C++2b extension">,
658349cc55cSDimitry Andric   InGroup<CXX2b>;
659349cc55cSDimitry Andricdef warn_cxx20_compat_consteval_if : Warning<
660349cc55cSDimitry Andric  "consteval if is incompatible with C++ standards before C++2b">,
661349cc55cSDimitry Andric  InGroup<CXXPre2bCompat>, DefaultIgnore;
662349cc55cSDimitry Andric
6630b57cec5SDimitry Andricdef ext_init_statement : ExtWarn<
6640b57cec5SDimitry Andric  "'%select{if|switch}0' initialization statements are a C++17 extension">,
6650b57cec5SDimitry Andric  InGroup<CXX17>;
6660b57cec5SDimitry Andricdef warn_cxx14_compat_init_statement : Warning<
6670b57cec5SDimitry Andric  "%select{if|switch}0 initialization statements are incompatible with "
6680b57cec5SDimitry Andric  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>;
6690b57cec5SDimitry Andricdef ext_for_range_init_stmt : ExtWarn<
67047395794SDimitry Andric  "range-based for loop initialization statements are a C++20 extension">,
67147395794SDimitry Andric  InGroup<CXX20>;
6720b57cec5SDimitry Andricdef warn_cxx17_compat_for_range_init_stmt : Warning<
6730b57cec5SDimitry Andric  "range-based for loop initialization statements are incompatible with "
67447395794SDimitry Andric  "C++ standards before C++20">, DefaultIgnore, InGroup<CXXPre20Compat>;
6750b57cec5SDimitry Andricdef warn_empty_init_statement : Warning<
6760b57cec5SDimitry Andric  "empty initialization statement of '%select{if|switch|range-based for}0' "
6770b57cec5SDimitry Andric  "has no effect">, InGroup<EmptyInitStatement>, DefaultIgnore;
6785ffd83dbSDimitry Andricdef err_keyword_as_parameter : Error <
6795ffd83dbSDimitry Andric  "invalid parameter name: '%0' is a keyword">;
6800b57cec5SDimitry Andric
6810b57cec5SDimitry Andric// C++ derived classes
6820b57cec5SDimitry Andricdef err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
6830b57cec5SDimitry Andric
6840b57cec5SDimitry Andric// C++ operator overloading
6850b57cec5SDimitry Andricdef err_literal_operator_string_prefix : Error<
6860b57cec5SDimitry Andric  "string literal after 'operator' cannot have an encoding prefix">;
6870b57cec5SDimitry Andricdef err_literal_operator_string_not_empty : Error<
6880b57cec5SDimitry Andric  "string literal after 'operator' must be '\"\"'">;
6890b57cec5SDimitry Andricdef warn_cxx98_compat_literal_operator : Warning<
6900b57cec5SDimitry Andric  "literal operators are incompatible with C++98">,
6910b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6920b57cec5SDimitry Andric
6930b57cec5SDimitry Andric// Classes.
6940b57cec5SDimitry Andricdef err_anon_type_definition : Error<
6950b57cec5SDimitry Andric  "declaration of anonymous %0 must be a definition">;
6960b57cec5SDimitry Andricdef err_default_delete_in_multiple_declaration : Error<
6970b57cec5SDimitry Andric  "'= %select{default|delete}0' is a function definition and must occur in a "
6980b57cec5SDimitry Andric  "standalone declaration">;
6990b57cec5SDimitry Andric
7000b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_expr : Warning<
7010b57cec5SDimitry Andric  "noexcept expressions are incompatible with C++98">,
7020b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
7030b57cec5SDimitry Andricdef warn_cxx98_compat_nullptr : Warning<
7040b57cec5SDimitry Andric  "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
705bdd1243dSDimitry Andricdef ext_c_nullptr : Extension<
706bdd1243dSDimitry Andric  "'nullptr' is a C2x extension">, InGroup<C2x>;
707bdd1243dSDimitry Andricdef warn_c17_compat_nullptr : Warning<
708bdd1243dSDimitry Andric  "'nullptr' is incompatible with C standards before C2x">,
709bdd1243dSDimitry Andric  InGroup<CPre2xCompat>, DefaultIgnore;
7100b57cec5SDimitry Andric
7110b57cec5SDimitry Andricdef warn_wrong_clang_attr_namespace : Warning<
7120b57cec5SDimitry Andric  "'__clang__' is a predefined macro name, not an attribute scope specifier; "
7130b57cec5SDimitry Andric  "did you mean '_Clang' instead?">, InGroup<IgnoredAttributes>;
7140b57cec5SDimitry Andricdef ext_ns_enum_attribute : Extension<
7150b57cec5SDimitry Andric  "attributes on %select{a namespace|an enumerator}0 declaration are "
7160b57cec5SDimitry Andric  "a C++17 extension">, InGroup<CXX17>;
7170b57cec5SDimitry Andricdef warn_cxx14_compat_ns_enum_attribute : Warning<
7180b57cec5SDimitry Andric  "attributes on %select{a namespace|an enumerator}0 declaration are "
7190b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
7200b57cec5SDimitry Andric  InGroup<CXXPre17CompatPedantic>, DefaultIgnore;
7210b57cec5SDimitry Andricdef warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
7220b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
7230b57cec5SDimitry Andricdef warn_cxx98_compat_attribute : Warning<
7240b57cec5SDimitry Andric  "C++11 attribute syntax is incompatible with C++98">,
7250b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
7260b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_arguments : Error<
7270b57cec5SDimitry Andric  "attribute %0 cannot have an argument list">;
7280b57cec5SDimitry Andricdef err_attribute_requires_arguments : Error<
7290b57cec5SDimitry Andric  "parentheses must be omitted if %0 attribute's argument list is empty">;
7300b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_ellipsis : Error<
7310b57cec5SDimitry Andric  "attribute %0 cannot be used as an attribute pack">;
7320b57cec5SDimitry Andricdef warn_cxx14_compat_using_attribute_ns : Warning<
7330b57cec5SDimitry Andric  "default scope specifier for attributes is incompatible with C++ standards "
7340b57cec5SDimitry Andric  "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore;
7350b57cec5SDimitry Andricdef ext_using_attribute_ns : ExtWarn<
7360b57cec5SDimitry Andric  "default scope specifier for attributes is a C++17 extension">,
7370b57cec5SDimitry Andric  InGroup<CXX17>;
7380b57cec5SDimitry Andricdef err_using_attribute_ns_conflict : Error<
7390b57cec5SDimitry Andric  "attribute with scope specifier cannot follow default scope specifier">;
7400b57cec5SDimitry Andricdef err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
741fe6060f1SDimitry Andricdef ext_cxx11_attr_placement : ExtWarn<
742fe6060f1SDimitry Andric  "ISO C++ does not allow an attribute list to appear here">,
743fe6060f1SDimitry Andric  InGroup<DiagGroup<"cxx-attribute-extension">>;
7440b57cec5SDimitry Andricdef err_attributes_misplaced : Error<"misplaced attributes; expected attributes here">;
7450b57cec5SDimitry Andricdef err_l_square_l_square_not_attribute : Error<
7460b57cec5SDimitry Andric  "C++11 only allows consecutive left square brackets when "
7470b57cec5SDimitry Andric  "introducing an attribute">;
74881ad6265SDimitry Andricdef err_attribute_argument_parm_pack_not_supported : Error<
74981ad6265SDimitry Andric  "attribute %0 does not support argument pack expansion">;
7500b57cec5SDimitry Andricdef err_ms_declspec_type : Error<
7510b57cec5SDimitry Andric  "__declspec attributes must be an identifier or string literal">;
7520b57cec5SDimitry Andricdef err_ms_property_no_getter_or_putter : Error<
7530b57cec5SDimitry Andric  "property does not specify a getter or a putter">;
7540b57cec5SDimitry Andricdef err_ms_property_unknown_accessor : Error<
7550b57cec5SDimitry Andric  "expected 'get' or 'put' in property declaration">;
7560b57cec5SDimitry Andricdef err_ms_property_has_set_accessor : Error<
7570b57cec5SDimitry Andric  "putter for property must be specified as 'put', not 'set'">;
7580b57cec5SDimitry Andricdef err_ms_property_missing_accessor_kind : Error<
7590b57cec5SDimitry Andric  "missing 'get=' or 'put='">;
7600b57cec5SDimitry Andricdef err_ms_property_expected_equal : Error<
7610b57cec5SDimitry Andric  "expected '=' after '%0'">;
7620b57cec5SDimitry Andricdef err_ms_property_duplicate_accessor : Error<
7630b57cec5SDimitry Andric  "property declaration specifies '%0' accessor twice">;
7640b57cec5SDimitry Andricdef err_ms_property_expected_accessor_name : Error<
7650b57cec5SDimitry Andric  "expected name of accessor method">;
7660b57cec5SDimitry Andricdef err_ms_property_expected_comma_or_rparen : Error<
7670b57cec5SDimitry Andric  "expected ',' or ')' at end of property accessor list">;
7680b57cec5SDimitry Andricdef err_ms_property_initializer : Error<
769e8d8bef9SDimitry Andric  "property declaration cannot have a default member initializer">;
7700b57cec5SDimitry Andric
7715ffd83dbSDimitry Andricdef warn_cxx20_compat_explicit_bool : Warning<
77247395794SDimitry Andric  "this expression will be parsed as explicit(bool) in C++20">,
77347395794SDimitry Andric  InGroup<CXX20Compat>, DefaultIgnore;
77455e4f9d5SDimitry Andricdef warn_cxx17_compat_explicit_bool : Warning<
77547395794SDimitry Andric  "explicit(bool) is incompatible with C++ standards before C++20">,
77647395794SDimitry Andric  InGroup<CXXPre20Compat>, DefaultIgnore;
77747395794SDimitry Andricdef ext_explicit_bool : ExtWarn<"explicit(bool) is a C++20 extension">,
77847395794SDimitry Andric  InGroup<CXX20>;
77955e4f9d5SDimitry Andric
7800b57cec5SDimitry Andric/// C++ Templates
7810b57cec5SDimitry Andricdef err_expected_template : Error<"expected template">;
7820b57cec5SDimitry Andricdef err_unknown_template_name : Error<
7830b57cec5SDimitry Andric  "unknown template name %0">;
7840b57cec5SDimitry Andricdef err_expected_comma_greater : Error<
7850b57cec5SDimitry Andric  "expected ',' or '>' in template-parameter-list">;
786349cc55cSDimitry Andricdef err_class_on_template_template_param
787349cc55cSDimitry Andric    : Error<"template template parameter requires 'class'%select{| or "
788349cc55cSDimitry Andric            "'typename'}0 after the parameter list">;
7890b57cec5SDimitry Andricdef ext_template_template_param_typename : ExtWarn<
7900b57cec5SDimitry Andric  "template template parameter using 'typename' is a C++17 extension">,
7910b57cec5SDimitry Andric  InGroup<CXX17>;
7920b57cec5SDimitry Andricdef warn_cxx14_compat_template_template_param_typename : Warning<
7930b57cec5SDimitry Andric  "template template parameter using 'typename' is "
7940b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
7950b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
7960b57cec5SDimitry Andricdef err_template_spec_syntax_non_template : Error<
7970b57cec5SDimitry Andric  "identifier followed by '<' indicates a class template specialization but "
7980b57cec5SDimitry Andric  "%0 %select{does not refer to a template|refers to a function template|"
799bdd1243dSDimitry Andric  "<unused>|refers to a variable template|<unused>|<unused>|"
800bdd1243dSDimitry Andric  "refers to a concept}1">;
8010b57cec5SDimitry Andricdef err_id_after_template_in_nested_name_spec : Error<
8020b57cec5SDimitry Andric  "expected template name after 'template' keyword in nested name specifier">;
8030b57cec5SDimitry Andricdef err_unexpected_template_in_unqualified_id : Error<
8040b57cec5SDimitry Andric  "'template' keyword not permitted here">;
8055ffd83dbSDimitry Andricdef err_unexpected_template_in_destructor_name : Error<
8065ffd83dbSDimitry Andric  "'template' keyword not permitted in destructor name">;
8070b57cec5SDimitry Andricdef err_unexpected_template_after_using : Error<
8080b57cec5SDimitry Andric  "'template' keyword not permitted after 'using' keyword">;
8090b57cec5SDimitry Andricdef err_two_right_angle_brackets_need_space : Error<
8100b57cec5SDimitry Andric  "a space is required between consecutive right angle brackets (use '> >')">;
8110b57cec5SDimitry Andricdef err_right_angle_bracket_equal_needs_space : Error<
8120b57cec5SDimitry Andric  "a space is required between a right angle bracket and an equals sign "
8130b57cec5SDimitry Andric  "(use '> =')">;
8140b57cec5SDimitry Andricdef warn_cxx11_right_shift_in_template_arg : Warning<
8150b57cec5SDimitry Andric  "use of right-shift operator ('>>') in template argument will require "
8160b57cec5SDimitry Andric  "parentheses in C++11">, InGroup<CXX11Compat>;
8170b57cec5SDimitry Andricdef warn_cxx98_compat_two_right_angle_brackets : Warning<
8180b57cec5SDimitry Andric  "consecutive right angle brackets are incompatible with C++98 (use '> >')">,
8190b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8200b57cec5SDimitry Andricdef err_templated_invalid_declaration : Error<
8210b57cec5SDimitry Andric  "a static_assert declaration cannot be a template">;
8220b57cec5SDimitry Andricdef err_multiple_template_declarators : Error<
8230b57cec5SDimitry Andric  "%select{|a template declaration|an explicit template specialization|"
8240b57cec5SDimitry Andric  "an explicit template instantiation}0 can "
8250b57cec5SDimitry Andric  "only %select{|declare|declare|instantiate}0 a single entity">;
8260b57cec5SDimitry Andricdef err_explicit_instantiation_with_definition : Error<
8270b57cec5SDimitry Andric  "explicit template instantiation cannot have a definition; if this "
8280b57cec5SDimitry Andric  "definition is meant to be an explicit specialization, add '<>' after the "
8290b57cec5SDimitry Andric  "'template' keyword">;
8300b57cec5SDimitry Andricdef err_template_defn_explicit_instantiation : Error<
8310b57cec5SDimitry Andric  "%select{function|class|variable}0 cannot be defined in an explicit instantiation; if this "
8320b57cec5SDimitry Andric  "declaration is meant to be a %select{function|class|variable}0 definition, remove the 'template' keyword">;
8330b57cec5SDimitry Andricdef err_friend_explicit_instantiation : Error<
8340b57cec5SDimitry Andric  "friend cannot be declared in an explicit instantiation; if this "
8350b57cec5SDimitry Andric  "declaration is meant to be a friend declaration, remove the 'template' keyword">;
8360b57cec5SDimitry Andricdef err_explicit_instantiation_enum : Error<
8370b57cec5SDimitry Andric  "enumerations cannot be explicitly instantiated">;
8380b57cec5SDimitry Andricdef err_expected_template_parameter : Error<"expected template parameter">;
83955e4f9d5SDimitry Andricdef err_empty_requires_expr : Error<
84055e4f9d5SDimitry Andric  "a requires expression must contain at least one requirement">;
84155e4f9d5SDimitry Andricdef err_requires_expr_parameter_list_ellipsis : Error<
84255e4f9d5SDimitry Andric  "varargs not allowed in requires expression">;
84355e4f9d5SDimitry Andricdef err_expected_semi_requirement : Error<
84455e4f9d5SDimitry Andric  "expected ';' at end of requirement">;
84555e4f9d5SDimitry Andricdef err_requires_expr_missing_arrow : Error<
84655e4f9d5SDimitry Andric  "expected '->' before expression type requirement">;
84755e4f9d5SDimitry Andricdef err_requires_expr_expected_type_constraint : Error<
84855e4f9d5SDimitry Andric  "expected concept name with optional arguments">;
84955e4f9d5SDimitry Andricdef err_requires_expr_simple_requirement_noexcept : Error<
85055e4f9d5SDimitry Andric  "'noexcept' can only be used in a compound requirement (with '{' '}' around "
85155e4f9d5SDimitry Andric  "the expression)">;
852349cc55cSDimitry Andricdef err_requires_expr_in_simple_requirement : Error<
853349cc55cSDimitry Andric  "requires expression in requirement body; did "
85455e4f9d5SDimitry Andric  "you intend to place it in a nested requirement? (add another 'requires' "
855349cc55cSDimitry Andric  "before the expression)">;
8560b57cec5SDimitry Andric
8570b57cec5SDimitry Andricdef err_missing_dependent_template_keyword : Error<
8580b57cec5SDimitry Andric  "use 'template' keyword to treat '%0' as a dependent template name">;
8590b57cec5SDimitry Andricdef warn_missing_dependent_template_keyword : ExtWarn<
8600b57cec5SDimitry Andric  "use 'template' keyword to treat '%0' as a dependent template name">;
8610b57cec5SDimitry Andric
8620b57cec5SDimitry Andricdef ext_extern_template : Extension<
8630b57cec5SDimitry Andric  "extern templates are a C++11 extension">, InGroup<CXX11>;
8640b57cec5SDimitry Andricdef warn_cxx98_compat_extern_template : Warning<
8650b57cec5SDimitry Andric  "extern templates are incompatible with C++98">,
8660b57cec5SDimitry Andric  InGroup<CXX98CompatPedantic>, DefaultIgnore;
8670b57cec5SDimitry Andricdef warn_static_inline_explicit_inst_ignored : Warning<
8680b57cec5SDimitry Andric  "ignoring '%select{static|inline}0' keyword on explicit template "
8690b57cec5SDimitry Andric  "instantiation">, InGroup<DiagGroup<"static-inline-explicit-instantiation">>;
8700b57cec5SDimitry Andric
8710b57cec5SDimitry Andric// Constructor template diagnostics.
8720b57cec5SDimitry Andricdef err_out_of_line_constructor_template_id : Error<
8730b57cec5SDimitry Andric  "out-of-line constructor for %0 cannot have template arguments">;
8740b57cec5SDimitry Andric
8750b57cec5SDimitry Andricdef err_expected_qualified_after_typename : Error<
8760b57cec5SDimitry Andric  "expected a qualified name after 'typename'">;
8770b57cec5SDimitry Andricdef warn_expected_qualified_after_typename : ExtWarn<
8780b57cec5SDimitry Andric  "expected a qualified name after 'typename'">;
8790b57cec5SDimitry Andric
8800b57cec5SDimitry Andricdef err_typename_refers_to_non_type_template : Error<
8810b57cec5SDimitry Andric  "typename specifier refers to a non-type template">;
8820b57cec5SDimitry Andricdef err_expected_type_name_after_typename : Error<
8830b57cec5SDimitry Andric  "expected an identifier or template-id after '::'">;
8840b57cec5SDimitry Andricdef err_explicit_spec_non_template : Error<
8850b57cec5SDimitry Andric  "explicit %select{specialization|instantiation}0 of "
8860b57cec5SDimitry Andric  "%select{non-|undeclared }3template %1 %2">;
8870b57cec5SDimitry Andric
8880b57cec5SDimitry Andricdef err_default_template_template_parameter_not_template : Error<
8890b57cec5SDimitry Andric  "default template argument for a template template parameter must be a class "
8900b57cec5SDimitry Andric  "template">;
8910b57cec5SDimitry Andric
8920b57cec5SDimitry Andricdef ext_fold_expression : ExtWarn<
8930b57cec5SDimitry Andric  "pack fold expression is a C++17 extension">,
8940b57cec5SDimitry Andric  InGroup<CXX17>;
8950b57cec5SDimitry Andricdef warn_cxx14_compat_fold_expression : Warning<
8960b57cec5SDimitry Andric  "pack fold expression is incompatible with C++ standards before C++17">,
8970b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
8980b57cec5SDimitry Andricdef err_expected_fold_operator : Error<
8990b57cec5SDimitry Andric  "expected a foldable binary operator in fold expression">;
9000b57cec5SDimitry Andricdef err_fold_operator_mismatch : Error<
9010b57cec5SDimitry Andric  "operators in fold expression must be the same">;
9020b57cec5SDimitry Andric
9030b57cec5SDimitry Andricdef err_ctor_init_missing_comma : Error<
9040b57cec5SDimitry Andric  "missing ',' between base or member initializers">;
9050b57cec5SDimitry Andric
9060b57cec5SDimitry Andric// C++ declarations
9070b57cec5SDimitry Andricdef err_friend_decl_defines_type : Error<
9080b57cec5SDimitry Andric  "cannot define a type in a friend declaration">;
9090b57cec5SDimitry Andricdef err_missing_whitespace_digraph : Error<
9100b57cec5SDimitry Andric  "found '<::' after a "
9115ffd83dbSDimitry Andric  "%select{template name|addrspace_cast|const_cast|dynamic_cast|reinterpret_cast|static_cast}0"
9120b57cec5SDimitry Andric  " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">;
9130b57cec5SDimitry Andric
9140b57cec5SDimitry Andricdef ext_defaulted_deleted_function : ExtWarn<
9150b57cec5SDimitry Andric  "%select{defaulted|deleted}0 function definitions are a C++11 extension">,
9160b57cec5SDimitry Andric  InGroup<CXX11>;
9170b57cec5SDimitry Andricdef warn_cxx98_compat_defaulted_deleted_function : Warning<
9180b57cec5SDimitry Andric  "%select{defaulted|deleted}0 function definitions are incompatible with C++98">,
9190b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
9200b57cec5SDimitry Andric
921e8d8bef9SDimitry Andric// C++11 default member initialization
9220b57cec5SDimitry Andricdef ext_nonstatic_member_init : ExtWarn<
923e8d8bef9SDimitry Andric  "default member initializer for non-static data member is a C++11 "
924e8d8bef9SDimitry Andric  "extension">, InGroup<CXX11>;
9250b57cec5SDimitry Andricdef warn_cxx98_compat_nonstatic_member_init : Warning<
926e8d8bef9SDimitry Andric  "default member initializer for non-static data members is incompatible with "
927e8d8bef9SDimitry Andric  "C++98">, InGroup<CXX98Compat>, DefaultIgnore;
9280b57cec5SDimitry Andricdef ext_bitfield_member_init: ExtWarn<
92947395794SDimitry Andric  "default member initializer for bit-field is a C++20 extension">,
93047395794SDimitry Andric  InGroup<CXX20>;
9310b57cec5SDimitry Andricdef warn_cxx17_compat_bitfield_member_init: Warning<
9320b57cec5SDimitry Andric  "default member initializer for bit-field is incompatible with "
93347395794SDimitry Andric  "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;
934e8d8bef9SDimitry Andricdef err_anon_bitfield_member_init : Error<
935e8d8bef9SDimitry Andric  "anonymous bit-field cannot have a default member initializer">;
9360b57cec5SDimitry Andricdef err_incomplete_array_member_init: Error<
937e8d8bef9SDimitry Andric  "array bound cannot be deduced from a default member initializer">;
9380b57cec5SDimitry Andric
9390b57cec5SDimitry Andric// C++11 alias-declaration
9400b57cec5SDimitry Andricdef ext_alias_declaration : ExtWarn<
9410b57cec5SDimitry Andric  "alias declarations are a C++11 extension">, InGroup<CXX11>;
9420b57cec5SDimitry Andricdef warn_cxx98_compat_alias_declaration : Warning<
9430b57cec5SDimitry Andric  "alias declarations are incompatible with C++98">,
9440b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
9450b57cec5SDimitry Andricdef err_alias_declaration_not_identifier : Error<
9460b57cec5SDimitry Andric  "name defined in alias declaration must be an identifier">;
9470b57cec5SDimitry Andricdef err_alias_declaration_specialization : Error<
9480b57cec5SDimitry Andric  "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">;
9490b57cec5SDimitry Andricdef err_alias_declaration_pack_expansion : Error<
9500b57cec5SDimitry Andric  "alias declaration cannot be a pack expansion">;
9510b57cec5SDimitry Andric
9520b57cec5SDimitry Andric// C++17 using-declaration pack expansions
9530b57cec5SDimitry Andricdef ext_multi_using_declaration : ExtWarn<
9540b57cec5SDimitry Andric  "use of multiple declarators in a single using declaration is "
9550b57cec5SDimitry Andric  "a C++17 extension">, InGroup<CXX17>;
9560b57cec5SDimitry Andricdef warn_cxx17_compat_multi_using_declaration : Warning<
9570b57cec5SDimitry Andric  "use of multiple declarators in a single using declaration is "
9580b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
9590b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
9600b57cec5SDimitry Andricdef ext_using_declaration_pack : ExtWarn<
9610b57cec5SDimitry Andric  "pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>;
9620b57cec5SDimitry Andricdef warn_cxx17_compat_using_declaration_pack : Warning<
9630b57cec5SDimitry Andric  "pack expansion using declaration is incompatible with C++ standards "
9640b57cec5SDimitry Andric  "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore;
9650b57cec5SDimitry Andric
9660b57cec5SDimitry Andric// C++11 override control
9670b57cec5SDimitry Andricdef ext_override_control_keyword : ExtWarn<
9680b57cec5SDimitry Andric  "'%0' keyword is a C++11 extension">, InGroup<CXX11>;
9690b57cec5SDimitry Andricdef warn_cxx98_compat_override_control_keyword : Warning<
9700b57cec5SDimitry Andric  "'%0' keyword is incompatible with C++98">,
9710b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
9720b57cec5SDimitry Andricdef err_override_control_interface : Error<
9730b57cec5SDimitry Andric  "'%0' keyword not permitted with interface types">;
9740b57cec5SDimitry Andricdef ext_ms_sealed_keyword : ExtWarn<
9750b57cec5SDimitry Andric  "'sealed' keyword is a Microsoft extension">,
9760b57cec5SDimitry Andric  InGroup<MicrosoftSealed>;
977fe6060f1SDimitry Andricdef ext_ms_abstract_keyword : ExtWarn<
978fe6060f1SDimitry Andric  "'abstract' keyword is a Microsoft extension">,
979fe6060f1SDimitry Andric  InGroup<MicrosoftAbstract>;
9800b57cec5SDimitry Andric
9810b57cec5SDimitry Andricdef err_access_specifier_interface : Error<
9820b57cec5SDimitry Andric  "interface types cannot specify '%select{private|protected}0' access">;
9830b57cec5SDimitry Andric
984fe6060f1SDimitry Andricdef err_duplicate_class_virt_specifier : Error<
985fe6060f1SDimitry Andric  "class already marked '%0'">;
986fe6060f1SDimitry Andric
9870b57cec5SDimitry Andricdef err_duplicate_virt_specifier : Error<
9880b57cec5SDimitry Andric  "class member already marked '%0'">;
9890b57cec5SDimitry Andric
990349cc55cSDimitry Andricdef err_virt_specifier_outside_class : Error<
991349cc55cSDimitry Andric  "'%0' specifier is not allowed outside a class definition">;
992349cc55cSDimitry Andric
9930b57cec5SDimitry Andricdef err_expected_parameter_pack : Error<
9940b57cec5SDimitry Andric  "expected the name of a parameter pack">;
9950b57cec5SDimitry Andricdef err_paren_sizeof_parameter_pack : Error<
9960b57cec5SDimitry Andric  "missing parentheses around the size of parameter pack %0">;
9970b57cec5SDimitry Andricdef err_sizeof_parameter_pack : Error<
9980b57cec5SDimitry Andric  "expected parenthesized parameter pack name in 'sizeof...' expression">;
9990b57cec5SDimitry Andric
10000b57cec5SDimitry Andric// C++11 lambda expressions
10010b57cec5SDimitry Andricdef err_expected_comma_or_rsquare : Error<
10020b57cec5SDimitry Andric  "expected ',' or ']' in lambda capture list">;
10030b57cec5SDimitry Andricdef err_this_captured_by_reference : Error<
10040b57cec5SDimitry Andric  "'this' cannot be captured by reference">;
10050b57cec5SDimitry Andricdef err_expected_capture : Error<
10060b57cec5SDimitry Andric  "expected variable name or 'this' in lambda capture list">;
10070b57cec5SDimitry Andricdef err_expected_lambda_body : Error<"expected body of lambda expression">;
10080b57cec5SDimitry Andricdef warn_cxx98_compat_lambda : Warning<
10090b57cec5SDimitry Andric  "lambda expressions are incompatible with C++98">,
10100b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
10110b57cec5SDimitry Andricdef err_lambda_decl_specifier_repeated : Error<
1012bdd1243dSDimitry Andric  "%select{'mutable'|'static'|'constexpr'|'consteval'}0 cannot "
1013bdd1243dSDimitry Andric  "appear multiple times in a lambda declarator">;
10140b57cec5SDimitry Andricdef err_lambda_capture_misplaced_ellipsis : Error<
10150b57cec5SDimitry Andric  "ellipsis in pack %select{|init-}0capture must appear %select{after|before}0 "
10160b57cec5SDimitry Andric  "the name of the capture">;
10170b57cec5SDimitry Andricdef err_lambda_capture_multiple_ellipses : Error<
10180b57cec5SDimitry Andric  "multiple ellipses in pack capture">;
1019e8d8bef9SDimitry Andricdef err_capture_default_first : Error<
1020e8d8bef9SDimitry Andric  "capture default must be first">;
1021fe6060f1SDimitry Andricdef ext_decl_attrs_on_lambda : ExtWarn<
1022fe6060f1SDimitry Andric  "an attribute specifier sequence in this position is a C++2b extension">,
1023fe6060f1SDimitry Andric  InGroup<CXX2b>;
1024fe6060f1SDimitry Andricdef ext_lambda_missing_parens : ExtWarn<
1025fe6060f1SDimitry Andric  "lambda without a parameter clause is a C++2b extension">,
1026fe6060f1SDimitry Andric  InGroup<CXX2b>;
1027fe6060f1SDimitry Andricdef warn_cxx20_compat_decl_attrs_on_lambda : Warning<
1028fe6060f1SDimitry Andric  "an attribute specifier sequence in this position is incompatible with C++ "
1029fe6060f1SDimitry Andric  "standards before C++2b">, InGroup<CXXPre2bCompat>, DefaultIgnore;
1030fe6060f1SDimitry Andric
10310b57cec5SDimitry Andric// C++17 lambda expressions
10320b57cec5SDimitry Andricdef err_expected_star_this_capture : Error<
10330b57cec5SDimitry Andric  "expected 'this' following '*' in lambda capture list">;
10340b57cec5SDimitry Andric
10350b57cec5SDimitry Andric// C++17 constexpr lambda expressions
10360b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_on_lambda : Warning<
10370b57cec5SDimitry Andric  "constexpr on lambda expressions is incompatible with C++ standards before C++17">,
10380b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
10390b57cec5SDimitry Andricdef ext_constexpr_on_lambda_cxx17 : ExtWarn<
10400b57cec5SDimitry Andric  "'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>;
10410b57cec5SDimitry Andric
104247395794SDimitry Andric// C++20 template lambdas
10430b57cec5SDimitry Andricdef ext_lambda_template_parameter_list: ExtWarn<
104447395794SDimitry Andric  "explicit template parameter list for lambdas is a C++20 extension">,
104547395794SDimitry Andric  InGroup<CXX20>;
10460b57cec5SDimitry Andricdef warn_cxx17_compat_lambda_template_parameter_list: Warning<
10470b57cec5SDimitry Andric  "explicit template parameter list for lambdas is incompatible with "
104847395794SDimitry Andric  "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore;
10490b57cec5SDimitry Andricdef err_lambda_template_parameter_list_empty : Error<
10500b57cec5SDimitry Andric  "lambda template parameter list cannot be empty">;
10510b57cec5SDimitry Andric
1052bdd1243dSDimitry Andric// C++2b static lambdas
1053bdd1243dSDimitry Andricdef err_static_lambda: ExtWarn<
1054bdd1243dSDimitry Andric  "static lambdas are a C++2b extension">, InGroup<CXX2b>;
10551ac55f4cSDimitry Andricdef warn_cxx20_compat_static_lambda : Warning<
1056bdd1243dSDimitry Andric  "static lambdas are incompatible with C++ standards before C++2b">,
1057bdd1243dSDimitry Andric  InGroup<CXXPre2bCompat>, DefaultIgnore;
1058bdd1243dSDimitry Andricdef err_static_mutable_lambda : Error<
1059bdd1243dSDimitry Andric  "lambda cannot be both mutable and static">;
1060bdd1243dSDimitry Andricdef err_static_lambda_captures : Error<
1061bdd1243dSDimitry Andric  "a static lambda cannot have any captures">;
1062bdd1243dSDimitry Andric
10630b57cec5SDimitry Andric// Availability attribute
10640b57cec5SDimitry Andricdef err_expected_version : Error<
10650b57cec5SDimitry Andric  "expected a version of the form 'major[.minor[.subminor]]'">;
10660b57cec5SDimitry Andricdef warn_expected_consistent_version_separator : Warning<
10670b57cec5SDimitry Andric  "use same version number separators '_' or '.'; as in "
10680b57cec5SDimitry Andric  "'major[.minor[.subminor]]'">, InGroup<Availability>;
10690b57cec5SDimitry Andricdef err_zero_version : Error<
10700b57cec5SDimitry Andric  "version number must have non-zero major, minor, or sub-minor version">;
10710b57cec5SDimitry Andricdef err_availability_expected_platform : Error<
10720b57cec5SDimitry Andric  "expected a platform name, e.g., 'macos'">;
10730b57cec5SDimitry Andric
10740b57cec5SDimitry Andric// objc_bridge_related attribute
10750b57cec5SDimitry Andricdef err_objcbridge_related_expected_related_class : Error<
10760b57cec5SDimitry Andric  "expected a related ObjectiveC class name, e.g., 'NSColor'">;
10770b57cec5SDimitry Andricdef err_objcbridge_related_selector_name : Error<
10780b57cec5SDimitry Andric  "expected a class method selector with single argument, e.g., 'colorWithCGColor:'">;
10790b57cec5SDimitry Andric
10800b57cec5SDimitry Andricdef err_availability_expected_change : Error<
10810b57cec5SDimitry Andric  "expected 'introduced', 'deprecated', or 'obsoleted'">;
10820b57cec5SDimitry Andricdef err_availability_unknown_change : Error<
10830b57cec5SDimitry Andric  "%0 is not an availability stage; use 'introduced', 'deprecated', or "
10840b57cec5SDimitry Andric  "'obsoleted'">;
10850b57cec5SDimitry Andricdef err_availability_redundant : Error<
10860b57cec5SDimitry Andric  "redundant %0 availability change; only the last specified change will "
10870b57cec5SDimitry Andric  "be used">;
10880b57cec5SDimitry Andricdef warn_availability_and_unavailable : Warning<
10890b57cec5SDimitry Andric  "'unavailable' availability overrides all other availability information">,
10900b57cec5SDimitry Andric  InGroup<Availability>;
10910b57cec5SDimitry Andric
10920b57cec5SDimitry Andric// @available(...)
10930b57cec5SDimitry Andricdef err_avail_query_expected_platform_name : Error<
10940b57cec5SDimitry Andric  "expected a platform name here">;
10950b57cec5SDimitry Andric
10960b57cec5SDimitry Andricdef err_avail_query_unrecognized_platform_name : Error<
10970b57cec5SDimitry Andric  "unrecognized platform name %0">;
10980b57cec5SDimitry Andricdef err_availability_query_wildcard_required: Error<
10990b57cec5SDimitry Andric  "must handle potential future platforms with '*'">;
11000b57cec5SDimitry Andricdef err_availability_query_repeated_platform: Error<
11010b57cec5SDimitry Andric  "version for '%0' already specified">;
11020b57cec5SDimitry Andricdef err_availability_query_repeated_star : Error<
11030b57cec5SDimitry Andric  "'*' query has already been specified">;
11040b57cec5SDimitry Andric
11050b57cec5SDimitry Andric// External source symbol attribute
11060b57cec5SDimitry Andricdef err_external_source_symbol_expected_keyword : Error<
11070b57cec5SDimitry Andric  "expected 'language', 'defined_in', or 'generated_declaration'">;
11080b57cec5SDimitry Andricdef err_external_source_symbol_duplicate_clause : Error<
11090b57cec5SDimitry Andric  "duplicate %0 clause in an 'external_source_symbol' attribute">;
11100b57cec5SDimitry Andric
11110b57cec5SDimitry Andric// Type safety attributes
11120b57cec5SDimitry Andricdef err_type_safety_unknown_flag : Error<
11130b57cec5SDimitry Andric  "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">;
11140b57cec5SDimitry Andric
11150b57cec5SDimitry Andric// Type traits
11160b57cec5SDimitry Andricdef err_type_trait_arity : Error<
11170b57cec5SDimitry Andric  "type trait requires %0%select{| or more}1 argument%select{|s}2; have "
11180b57cec5SDimitry Andric  "%3 argument%s3">;
11190b57cec5SDimitry Andric
11200b57cec5SDimitry Andric// Language specific pragmas
11210b57cec5SDimitry Andric// - Generic warnings
11220b57cec5SDimitry Andricdef warn_pragma_expected_lparen : Warning<
11230b57cec5SDimitry Andric  "missing '(' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
11240b57cec5SDimitry Andricdef warn_pragma_expected_rparen : Warning<
11250b57cec5SDimitry Andric  "missing ')' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
11260b57cec5SDimitry Andricdef warn_pragma_expected_identifier : Warning<
11270b57cec5SDimitry Andric  "expected identifier in '#pragma %0' - ignored">, InGroup<IgnoredPragmas>;
11280b57cec5SDimitry Andricdef warn_pragma_expected_string : Warning<
11290b57cec5SDimitry Andric  "expected string literal in '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
11300b57cec5SDimitry Andricdef warn_pragma_missing_argument : Warning<
11310b57cec5SDimitry Andric  "missing argument to '#pragma %0'%select{|; expected %2}1">, InGroup<IgnoredPragmas>;
11320b57cec5SDimitry Andricdef warn_pragma_invalid_argument : Warning<
11330b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma %1'%select{|; expected %3}2">, InGroup<IgnoredPragmas>;
11340b57cec5SDimitry Andric
1135a7dea167SDimitry Andricdef err_pragma_misplaced_in_decl : Error<"this pragma cannot appear in %0 declaration">;
1136a7dea167SDimitry Andric
11370b57cec5SDimitry Andric// '#pragma clang section' related errors
11380b57cec5SDimitry Andricdef err_pragma_expected_clang_section_name : Error<
1139a7dea167SDimitry Andric  "expected one of [bss|data|rodata|text|relro] section kind in '#pragma %0'">;
11400b57cec5SDimitry Andricdef err_pragma_clang_section_expected_equal : Error<
1141a7dea167SDimitry Andric  "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text|relro}0'">;
11420b57cec5SDimitry Andricdef warn_pragma_expected_section_name : Warning<
11430b57cec5SDimitry Andric  "expected a string literal for the section name in '#pragma %0' - ignored">,
11440b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11450b57cec5SDimitry Andric
11460b57cec5SDimitry Andricdef warn_pragma_expected_section_push_pop_or_name : Warning<
11470b57cec5SDimitry Andric  "expected push, pop or a string literal for the section name in '#pragma %0' - ignored">,
11480b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11490b57cec5SDimitry Andricdef warn_pragma_expected_section_label_or_name : Warning<
11500b57cec5SDimitry Andric  "expected a stack label or a string literal for the section name in '#pragma %0' - ignored">,
11510b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11520b57cec5SDimitry Andricdef warn_pragma_expected_init_seg : Warning<
11530b57cec5SDimitry Andric  "expected 'compiler', 'lib', 'user', or a string literal for the section name in '#pragma %0' - ignored">,
11540b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11555ffd83dbSDimitry Andric
11565ffd83dbSDimitry Andricdef err_pragma_expected_integer : Error<"expected an integer argument in '#pragma %0'">;
11570b57cec5SDimitry Andricdef warn_pragma_expected_integer : Warning<
11580b57cec5SDimitry Andric  "expected integer between %0 and %1 inclusive in '#pragma %2' - ignored">,
11590b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11600b57cec5SDimitry Andricdef warn_pragma_ms_struct : Warning<
11610b57cec5SDimitry Andric  "incorrect use of '#pragma ms_struct on|off' - ignored">,
11620b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
1163349cc55cSDimitry Andricdef warn_pragma_ms_fenv_access : Warning<
1164349cc55cSDimitry Andric  "incorrect use of '#pragma fenv_access (on|off)' - ignored">,
1165349cc55cSDimitry Andric  InGroup<IgnoredPragmas>;
11660b57cec5SDimitry Andricdef warn_pragma_extra_tokens_at_eol : Warning<
11670b57cec5SDimitry Andric  "extra tokens at end of '#pragma %0' - ignored">,
11680b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11690b57cec5SDimitry Andricdef warn_pragma_expected_comma : Warning<
11700b57cec5SDimitry Andric  "expected ',' in '#pragma %0'">, InGroup<IgnoredPragmas>;
11710b57cec5SDimitry Andricdef warn_pragma_expected_punc : Warning<
11720b57cec5SDimitry Andric  "expected ')' or ',' in '#pragma %0'">, InGroup<IgnoredPragmas>;
11730b57cec5SDimitry Andricdef warn_pragma_expected_non_wide_string : Warning<
11740b57cec5SDimitry Andric  "expected non-wide string literal in '#pragma %0'">, InGroup<IgnoredPragmas>;
11750b57cec5SDimitry Andric// - Generic errors
11760b57cec5SDimitry Andricdef err_pragma_missing_argument : Error<
11770b57cec5SDimitry Andric  "missing argument to '#pragma %0'%select{|; expected %2}1">;
11780b57cec5SDimitry Andric// - #pragma options
11790b57cec5SDimitry Andricdef warn_pragma_options_expected_align : Warning<
11800b57cec5SDimitry Andric  "expected 'align' following '#pragma options' - ignored">,
11810b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11820b57cec5SDimitry Andricdef warn_pragma_align_expected_equal : Warning<
11830b57cec5SDimitry Andric  "expected '=' following '#pragma %select{align|options align}0' - ignored">,
11840b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11850b57cec5SDimitry Andricdef warn_pragma_align_invalid_option : Warning<
11860b57cec5SDimitry Andric  "invalid alignment option in '#pragma %select{align|options align}0' - ignored">,
11870b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11880b57cec5SDimitry Andric// - #pragma pack
11890b57cec5SDimitry Andricdef warn_pragma_unsupported_action : Warning<
11900b57cec5SDimitry Andric  "known but unsupported action '%1' for '#pragma %0' - ignored">,
11910b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11920b57cec5SDimitry Andricdef warn_pragma_invalid_specific_action : Warning<
11930b57cec5SDimitry Andric  "unknown action '%1' for '#pragma %0' - ignored">,
11940b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11950b57cec5SDimitry Andricdef warn_pragma_expected_action_or_r_paren : Warning<
11960b57cec5SDimitry Andric  "expected action or ')' in '#pragma %0' - ignored">,
11970b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
11980b57cec5SDimitry Andricdef warn_pragma_invalid_action : Warning<
11990b57cec5SDimitry Andric  "unknown action for '#pragma %0' - ignored">,
12000b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12010b57cec5SDimitry Andricdef warn_pragma_pack_malformed : Warning<
12020b57cec5SDimitry Andric  "expected integer or identifier in '#pragma pack' - ignored">,
12030b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12040b57cec5SDimitry Andric// - #pragma intrinsic
12050b57cec5SDimitry Andricdef warn_pragma_intrinsic_builtin : Warning<
12060b57cec5SDimitry Andric  "%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1">,
12070b57cec5SDimitry Andric  InGroup<IgnoredPragmaIntrinsic>;
12080b57cec5SDimitry Andric// - #pragma unused
12090b57cec5SDimitry Andricdef warn_pragma_unused_expected_var : Warning<
12100b57cec5SDimitry Andric  "expected '#pragma unused' argument to be a variable name">,
12110b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12120b57cec5SDimitry Andric// - #pragma init_seg
12130b57cec5SDimitry Andricdef warn_pragma_init_seg_unsupported_target : Warning<
12140b57cec5SDimitry Andric  "'#pragma init_seg' is only supported when targeting a "
12150b57cec5SDimitry Andric  "Microsoft environment">,
12160b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12175ffd83dbSDimitry Andric// - #pragma restricted to file scope or start of compound statement
12185ffd83dbSDimitry Andricdef err_pragma_file_or_compound_scope : Error<
12195ffd83dbSDimitry Andric  "'#pragma %0' can only appear at file scope or at the start of a "
12200b57cec5SDimitry Andric  "compound statement">;
12210b57cec5SDimitry Andric// - #pragma stdc unknown
12220b57cec5SDimitry Andricdef ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">,
12230b57cec5SDimitry Andric   InGroup<UnknownPragmas>;
1224e8d8bef9SDimitry Andric// The C standard 7.6.1p2 says "The [FENV_ACCESS] pragma shall occur either
1225e8d8bef9SDimitry Andric// outside external declarations or preceding all explicit declarations and
1226e8d8bef9SDimitry Andric// statements inside a compound statement.
1227e8d8bef9SDimitry Andricdef warn_stdc_fenv_round_not_supported :
1228e8d8bef9SDimitry Andric   Warning<"pragma STDC FENV_ROUND is not supported">,
12290b57cec5SDimitry Andric   InGroup<UnknownPragmas>;
1230e8d8bef9SDimitry Andricdef warn_stdc_unknown_rounding_mode : Warning<
1231e8d8bef9SDimitry Andric  "invalid or unsupported rounding mode in '#pragma STDC FENV_ROUND' - ignored">,
1232e8d8bef9SDimitry Andric  InGroup<IgnoredPragmas>;
1233e8d8bef9SDimitry Andricdef warn_pragma_fp_ignored : Warning<
1234e8d8bef9SDimitry Andric  "'#pragma %0' is not supported on this target - ignored">,
1235e8d8bef9SDimitry Andric  InGroup<IgnoredPragmas>;
12360b57cec5SDimitry Andric// - #pragma comment
12370b57cec5SDimitry Andricdef err_pragma_comment_malformed : Error<
12380b57cec5SDimitry Andric  "pragma comment requires parenthesized identifier and optional string">;
12390b57cec5SDimitry Andricdef err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
12400b57cec5SDimitry Andric// PS4 recognizes only #pragma comment(lib)
12410b57cec5SDimitry Andricdef warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
12420b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12430b57cec5SDimitry Andric// - #pragma detect_mismatch
12440b57cec5SDimitry Andricdef err_pragma_detect_mismatch_malformed : Error<
12450b57cec5SDimitry Andric  "pragma detect_mismatch is malformed; it requires two comma-separated "
12460b57cec5SDimitry Andric  "string literals">;
12475ffd83dbSDimitry Andric// - #pragma float_control
12485ffd83dbSDimitry Andricdef err_pragma_float_control_malformed : Error<
12495ffd83dbSDimitry Andric  "pragma float_control is malformed; use 'float_control({push|pop})' or "
12505ffd83dbSDimitry Andric  "'float_control({precise|except}, {on|off} [,push])'">;
12510b57cec5SDimitry Andric// - #pragma pointers_to_members
12520b57cec5SDimitry Andricdef err_pragma_pointers_to_members_unknown_kind : Error<
12530b57cec5SDimitry Andric  "unexpected %0, expected to see one of %select{|'best_case', 'full_generality', }1"
12540b57cec5SDimitry Andric  "'single_inheritance', 'multiple_inheritance', or 'virtual_inheritance'">;
12550b57cec5SDimitry Andric// - #pragma clang optimize on/off
12560b57cec5SDimitry Andricdef err_pragma_optimize_invalid_argument : Error<
12570b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma clang optimize'; "
12580b57cec5SDimitry Andric  "expected 'on' or 'off'">;
12590b57cec5SDimitry Andricdef err_pragma_optimize_extra_argument : Error<
12600b57cec5SDimitry Andric  "unexpected extra argument '%0' to '#pragma clang optimize'">;
12610b57cec5SDimitry Andric// - #pragma clang attribute
12620b57cec5SDimitry Andricdef err_pragma_attribute_expected_push_pop_paren : Error<
12630b57cec5SDimitry Andric  "expected 'push', 'pop', or '(' after '#pragma clang attribute'">;
12640b57cec5SDimitry Andricdef err_pragma_attribute_invalid_argument : Error<
12650b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma clang attribute'; "
12660b57cec5SDimitry Andric  "expected 'push' or 'pop'">;
12670b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute : Error<
12680b57cec5SDimitry Andric  "expected an attribute after '('">;
12690b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_name : Error<
12700b57cec5SDimitry Andric  "expected identifier that represents an attribute name">;
12710b57cec5SDimitry Andricdef err_pragma_attribute_extra_tokens_after_attribute : Error<
12720b57cec5SDimitry Andric  "extra tokens after attribute in a '#pragma clang attribute push'">;
12730b57cec5SDimitry Andricdef err_pragma_attribute_unsupported_attribute : Error<
12740b57cec5SDimitry Andric  "attribute %0 is not supported by '#pragma clang attribute'">;
12750b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_syntax : Error<
12760b57cec5SDimitry Andric  "expected an attribute that is specified using the GNU, C++11 or '__declspec'"
12770b57cec5SDimitry Andric  " syntax">;
12780b57cec5SDimitry Andricdef note_pragma_attribute_use_attribute_kw : Note<"use the GNU '__attribute__' "
12790b57cec5SDimitry Andric  "syntax">;
12800b57cec5SDimitry Andricdef err_pragma_attribute_invalid_subject_set_specifier : Error<
12810b57cec5SDimitry Andric  "expected attribute subject set specifier 'apply_to'">;
12820b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_identifier : Error<
12830b57cec5SDimitry Andric  "expected an identifier that corresponds to an attribute subject rule">;
12840b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_rule : Error<
12850b57cec5SDimitry Andric  "unknown attribute subject rule '%0'">;
12860b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_sub_identifier : Error<
12870b57cec5SDimitry Andric  "expected an identifier that corresponds to an attribute subject matcher "
12880b57cec5SDimitry Andric  "sub-rule; '%0' matcher %select{does not support sub-rules|supports the "
12890b57cec5SDimitry Andric  "following sub-rules: %2|}1">;
12900b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_sub_rule : Error<
12910b57cec5SDimitry Andric  "%select{invalid use of|unknown}2 attribute subject matcher sub-rule '%0'; "
12920b57cec5SDimitry Andric  "'%1' matcher %select{does not support sub-rules|supports the following "
12930b57cec5SDimitry Andric  "sub-rules: %3}2">;
12940b57cec5SDimitry Andricdef err_pragma_attribute_duplicate_subject : Error<
12950b57cec5SDimitry Andric  "duplicate attribute subject matcher '%0'">;
12960b57cec5SDimitry Andricdef err_pragma_attribute_expected_period : Error<
12970b57cec5SDimitry Andric  "expected '.' after pragma attribute namespace %0">;
12980b57cec5SDimitry Andricdef err_pragma_attribute_namespace_on_attribute : Error<
12990b57cec5SDimitry Andric  "namespace can only apply to 'push' or 'pop' directives">;
13000b57cec5SDimitry Andricdef note_pragma_attribute_namespace_on_attribute : Note<
13010b57cec5SDimitry Andric  "omit the namespace to add attributes to the most-recently"
13020b57cec5SDimitry Andric  " pushed attribute group">;
130381ad6265SDimitry Andricdef warn_no_support_for_eval_method_source_on_m32 : Warning<
130481ad6265SDimitry Andric  "Setting the floating point evaluation method to `source` on a target"
130581ad6265SDimitry Andric  " without SSE is not supported.">, InGroup<Pragmas>;
13060b57cec5SDimitry Andric
13070b57cec5SDimitry Andric// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
13080b57cec5SDimitry Andricdef warn_pragma_expected_colon : Warning<
13090b57cec5SDimitry Andric  "missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>;
13100b57cec5SDimitry Andricdef warn_pragma_expected_predicate : Warning<
13110b57cec5SDimitry Andric  "expected %select{'enable', 'disable', 'begin' or 'end'|'disable'}0 - ignoring">, InGroup<IgnoredPragmas>;
13120b57cec5SDimitry Andricdef warn_pragma_unknown_extension : Warning<
131381ad6265SDimitry Andric  "OpenCL extension %0 unknown or does not require pragma - ignoring">, InGroup<IgnoredPragmas>;
13140b57cec5SDimitry Andricdef warn_pragma_unsupported_extension : Warning<
13150b57cec5SDimitry Andric  "unsupported OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
13160b57cec5SDimitry Andricdef warn_pragma_extension_is_core : Warning<
1317fe6060f1SDimitry Andric  "OpenCL extension %0 is core feature or supported optional core feature - ignoring">,
1318fe6060f1SDimitry Andric  InGroup<OpenCLCoreFeaturesDiagGroup>, DefaultIgnore;
1319bdd1243dSDimitry Andricdef err_modifier_expected_colon : Error<"missing ':' after %0 modifier">;
13200b57cec5SDimitry Andric
13210b57cec5SDimitry Andric// OpenCL errors.
13220b57cec5SDimitry Andricdef err_opencl_taking_function_address_parser : Error<
13230b57cec5SDimitry Andric  "taking address of function is not allowed">;
13240b57cec5SDimitry Andricdef err_opencl_logical_exclusive_or : Error<
13250b57cec5SDimitry Andric  "^^ is a reserved operator in OpenCL">;
13260b57cec5SDimitry Andric
13270b57cec5SDimitry Andric// C++ for OpenCL.
13280b57cec5SDimitry Andricdef err_openclcxx_virtual_function : Error<
13290b57cec5SDimitry Andric  "virtual functions are not supported in C++ for OpenCL">;
13300b57cec5SDimitry Andric
13310b57cec5SDimitry Andric// OpenMP support.
13320b57cec5SDimitry Andricdef warn_pragma_omp_ignored : Warning<
13330b57cec5SDimitry Andric  "unexpected '#pragma omp ...' in program">, InGroup<SourceUsesOpenMP>, DefaultIgnore;
13340b57cec5SDimitry Andricdef warn_omp_extra_tokens_at_eol : Warning<
13350b57cec5SDimitry Andric  "extra tokens at the end of '#pragma omp %0' are ignored">,
13360b57cec5SDimitry Andric  InGroup<ExtraTokens>;
13370b57cec5SDimitry Andricdef warn_pragma_expected_colon_r_paren : Warning<
13380b57cec5SDimitry Andric  "missing ':' or ')' after %0 - ignoring">, InGroup<IgnoredPragmas>;
13390b57cec5SDimitry Andricdef err_omp_unknown_directive : Error<
13400b57cec5SDimitry Andric  "expected an OpenMP directive">;
13410b57cec5SDimitry Andricdef err_omp_unexpected_directive : Error<
13420b57cec5SDimitry Andric  "unexpected OpenMP directive %select{|'#pragma omp %1'}0">;
13430b57cec5SDimitry Andricdef err_omp_expected_punc : Error<
13440b57cec5SDimitry Andric  "expected ',' or ')' in '%0' %select{clause|directive}1">;
1345bdd1243dSDimitry Andricdef warn_clause_expected_string : Warning<
1346bdd1243dSDimitry Andric  "expected string literal in 'clause %0' - ignoring">, InGroup<IgnoredPragmas>;
13470b57cec5SDimitry Andricdef err_omp_unexpected_clause : Error<
13480b57cec5SDimitry Andric  "unexpected OpenMP clause '%0' in directive '#pragma omp %1'">;
13490b57cec5SDimitry Andricdef err_omp_immediate_directive : Error<
13500b57cec5SDimitry Andric  "'#pragma omp %0' %select{|with '%2' clause }1cannot be an immediate substatement">;
13510b57cec5SDimitry Andricdef err_omp_expected_identifier_for_critical : Error<
13520b57cec5SDimitry Andric  "expected identifier specifying the name of the 'omp critical' directive">;
13530b57cec5SDimitry Andricdef err_omp_expected_reduction_identifier : Error<
13540b57cec5SDimitry Andric  "expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">;
13555ffd83dbSDimitry Andricdef err_omp_expected_equal_in_iterator : Error<
13565ffd83dbSDimitry Andric  "expected '=' in iterator specifier">;
13575ffd83dbSDimitry Andricdef err_omp_expected_punc_after_iterator : Error<
13585ffd83dbSDimitry Andric  "expected ',' or ')' after iterator specifier">;
1359a7dea167SDimitry Andricdef err_omp_decl_in_declare_simd_variant : Error<
1360a7dea167SDimitry Andric  "function declaration is expected after 'declare %select{simd|variant}0' directive">;
13610b57cec5SDimitry Andricdef err_omp_unknown_map_type : Error<
13620b57cec5SDimitry Andric  "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
13630b57cec5SDimitry Andricdef err_omp_unknown_map_type_modifier : Error<
1364349cc55cSDimitry Andric  "incorrect map type modifier, expected one of: 'always', 'close', 'mapper'"
1365bdd1243dSDimitry Andric  "%select{|, 'present'|, 'present', 'iterator'}0%select{|, 'ompx_hold'}1">;
13660b57cec5SDimitry Andricdef err_omp_map_type_missing : Error<
13670b57cec5SDimitry Andric  "missing map type">;
13680b57cec5SDimitry Andricdef err_omp_map_type_modifier_missing : Error<
13690b57cec5SDimitry Andric  "missing map type modifier">;
13700b57cec5SDimitry Andricdef err_omp_declare_simd_inbranch_notinbranch : Error<
13710b57cec5SDimitry Andric  "unexpected '%0' clause, '%1' is specified already">;
13725ffd83dbSDimitry Andricdef err_expected_end_declare_target_or_variant : Error<
13735ffd83dbSDimitry Andric  "expected '#pragma omp end declare %select{target|variant}0'">;
13745ffd83dbSDimitry Andricdef err_expected_begin_declare_variant
13755ffd83dbSDimitry Andric    : Error<"'#pragma omp end declare variant' with no matching '#pragma omp "
13765ffd83dbSDimitry Andric            "begin declare variant'">;
1377e8d8bef9SDimitry Andricdef err_expected_begin_assumes
1378e8d8bef9SDimitry Andric    : Error<"'#pragma omp end assumes' with no matching '#pragma omp begin assumes'">;
1379e8d8bef9SDimitry Andricdef warn_omp_unknown_assumption_clause_missing_id
1380e8d8bef9SDimitry Andric    : Warning<"valid %0 clauses start with %1; %select{token|tokens}2 will be ignored">,
1381e8d8bef9SDimitry Andric      InGroup<OpenMPClauses>;
1382e8d8bef9SDimitry Andricdef warn_omp_unknown_assumption_clause_without_args
1383e8d8bef9SDimitry Andric    : Warning<"%0 clause should not be followed by arguments; tokens will be ignored">,
1384e8d8bef9SDimitry Andric      InGroup<OpenMPClauses>;
1385e8d8bef9SDimitry Andricdef note_omp_assumption_clause_continue_here
1386e8d8bef9SDimitry Andric    : Note<"the ignored tokens spans until here">;
13870b57cec5SDimitry Andricdef err_omp_declare_target_unexpected_clause: Error<
138804eeddc0SDimitry 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">;
1389bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_clause_52: Error<
1390bdd1243dSDimitry 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">;
1391fe6060f1SDimitry Andricdef err_omp_begin_declare_target_unexpected_implicit_to_clause: Error<
1392fe6060f1SDimitry Andric  "unexpected '(', only 'to', 'link' or 'device_type' clauses expected for 'begin declare target' directive">;
1393bdd1243dSDimitry Andricdef err_omp_declare_target_wrong_clause_after_implicit_to: Error<
1394fe6060f1SDimitry Andric  "unexpected clause after an implicit 'to' clause">;
1395bdd1243dSDimitry Andricdef err_omp_declare_target_wrong_clause_after_implicit_enter: Error<
1396bdd1243dSDimitry Andric  "unexpected clause after an implicit 'enter' clause">;
1397fe6060f1SDimitry Andricdef err_omp_declare_target_missing_to_or_link_clause: Error<
139804eeddc0SDimitry Andric  "expected at least one %select{'to' or 'link'|'to', 'link' or 'indirect'}0 clause">;
1399bdd1243dSDimitry Andricdef err_omp_declare_target_missing_enter_or_link_clause: Error<
1400bdd1243dSDimitry Andric  "expected at least one %select{'enter' or 'link'|'enter', 'link' or 'indirect'}0 clause">;
1401bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_to_clause: Error<
1402bdd1243dSDimitry Andric  "unexpected 'to' clause, use 'enter' instead">;
1403bdd1243dSDimitry Andricdef err_omp_declare_target_unexpected_enter_clause: Error<
1404bdd1243dSDimitry Andric  "unexpected 'enter' clause, use 'to' instead">;
1405fe6060f1SDimitry Andricdef err_omp_declare_target_multiple : Error<
1406fe6060f1SDimitry Andric  "%0 appears multiple times in clauses on the same declare target directive">;
140704eeddc0SDimitry Andricdef err_omp_declare_target_indirect_device_type: Error<
140804eeddc0SDimitry Andric  "only 'device_type(any)' clause is allowed with indirect clause">;
14090b57cec5SDimitry Andricdef err_omp_expected_clause: Error<
14100b57cec5SDimitry Andric  "expected at least one clause on '#pragma omp %0' directive">;
14110b57cec5SDimitry Andricdef err_omp_mapper_illegal_identifier : Error<
14120b57cec5SDimitry Andric  "illegal OpenMP user-defined mapper identifier">;
14130b57cec5SDimitry Andricdef err_omp_mapper_expected_declarator : Error<
14140b57cec5SDimitry Andric  "expected declarator on 'omp declare mapper' directive">;
1415349cc55cSDimitry Andricdef err_omp_unexpected_append_op : Error<
1416349cc55cSDimitry Andric  "unexpected operation specified in 'append_args' clause, expected 'interop'">;
1417bdd1243dSDimitry Andricdef err_omp_unexpected_execution_modifier : Error<
1418bdd1243dSDimitry Andric  "unexpected 'execution' modifier in non-executable context">;
1419a7dea167SDimitry Andricdef err_omp_declare_variant_wrong_clause : Error<
1420349cc55cSDimitry Andric  "expected %select{'match'|'match', 'adjust_args', or 'append_args'}0 clause "
1421349cc55cSDimitry Andric  "on 'omp declare variant' directive">;
1422e8d8bef9SDimitry Andricdef err_omp_declare_variant_duplicate_nested_trait : Error<
1423e8d8bef9SDimitry Andric  "nested OpenMP context selector contains duplicated trait '%0'"
1424e8d8bef9SDimitry Andric  " in selector '%1' and set '%2' with different score">;
1425e8d8bef9SDimitry Andricdef err_omp_declare_variant_nested_user_condition : Error<
1426e8d8bef9SDimitry Andric  "nested user conditions in OpenMP context selector not supported (yet)">;
14275ffd83dbSDimitry Andricdef warn_omp_declare_variant_string_literal_or_identifier
14285ffd83dbSDimitry Andric    : Warning<"expected identifier or string literal describing a context "
14295ffd83dbSDimitry Andric              "%select{set|selector|property}0; "
14305ffd83dbSDimitry Andric              "%select{set|selector|property}0 skipped">,
1431a7dea167SDimitry Andric      InGroup<OpenMPClauses>;
143204eeddc0SDimitry Andricdef warn_unknown_declare_variant_isa_trait
1433e8d8bef9SDimitry Andric    : Warning<"isa trait '%0' is not known to the current target; verify the "
1434e8d8bef9SDimitry Andric              "spelling or consider restricting the context selector with the "
1435e8d8bef9SDimitry Andric              "'arch' selector further">,
1436e8d8bef9SDimitry Andric      InGroup<SourceUsesOpenMP>;
14375ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_options
14385ffd83dbSDimitry Andric    : Note<"context %select{set|selector|property}0 options are: %1">;
14395ffd83dbSDimitry Andricdef warn_omp_declare_variant_expected
14405ffd83dbSDimitry Andric    : Warning<"expected '%0' after the %1; '%0' assumed">,
1441a7dea167SDimitry Andric      InGroup<OpenMPClauses>;
14425ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_property
14435ffd83dbSDimitry Andric    : Warning<"'%0' is not a valid context property for the context selector "
14445ffd83dbSDimitry Andric              "'%1' and the context set '%2'; property ignored">,
14455ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14465ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_is_a
14475ffd83dbSDimitry Andric    : Note<"'%0' is a context %select{set|selector|property}1 not a context "
14485ffd83dbSDimitry Andric           "%select{set|selector|property}2">;
14495ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_try : Note<"try 'match(%0={%1%2})'">;
14505ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_selector
14515ffd83dbSDimitry Andric    : Warning<"'%0' is not a valid context selector for the context set '%1'; "
14525ffd83dbSDimitry Andric              "selector ignored">,
14535ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14545ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_not_a_set
14555ffd83dbSDimitry Andric    : Warning<"'%0' is not a valid context set in a `declare variant`; set "
14565ffd83dbSDimitry Andric              "ignored">,
14575ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14585ffd83dbSDimitry Andricdef warn_omp_declare_variant_ctx_mutiple_use
14595ffd83dbSDimitry Andric    : Warning<"the context %select{set|selector|property}0 '%1' was used "
14605ffd83dbSDimitry Andric              "already in the same 'omp declare variant' directive; "
14615ffd83dbSDimitry Andric              "%select{set|selector|property}0 ignored">,
14625ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14635ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_used_here
14645ffd83dbSDimitry Andric    : Note<"the previous context %select{set|selector|property}0 '%1' used "
14655ffd83dbSDimitry Andric           "here">;
14665ffd83dbSDimitry Andricdef note_omp_declare_variant_ctx_continue_here
14675ffd83dbSDimitry Andric    : Note<"the ignored %select{set|selector|property}0 spans until here">;
14685ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_selector_for_set
14695ffd83dbSDimitry Andric    : Warning<"the context selector '%0' is not valid for the context set "
14705ffd83dbSDimitry Andric              "'%1'; selector ignored">,
14715ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14725ffd83dbSDimitry Andricdef note_omp_ctx_compatible_set_for_selector
14735ffd83dbSDimitry Andric    : Note<"the context selector '%0' can be nested in the context set '%1'; "
14745ffd83dbSDimitry Andric           "try 'match(%1={%0%select{|(property)}2})'">;
14755ffd83dbSDimitry Andricdef warn_omp_ctx_selector_without_properties
14765ffd83dbSDimitry Andric    : Warning<"the context selector '%0' in context set '%1' requires a "
14775ffd83dbSDimitry Andric              "context property defined in parentheses; selector ignored">,
14785ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14795ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_property_for_selector
14805ffd83dbSDimitry Andric    : Warning<"the context property '%0' is not valid for the context selector "
14815ffd83dbSDimitry Andric              "'%1' and the context set '%2'; property ignored">,
14825ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14835ffd83dbSDimitry Andricdef note_omp_ctx_compatible_set_and_selector_for_property
14845ffd83dbSDimitry Andric    : Note<"the context property '%0' can be nested in the context selector "
14855ffd83dbSDimitry Andric           "'%1' which is nested in the context set '%2'; try "
14865ffd83dbSDimitry Andric           "'match(%2={%1(%0)})'">;
14875ffd83dbSDimitry Andricdef warn_omp_ctx_incompatible_score_for_property
14885ffd83dbSDimitry Andric    : Warning<"the context selector '%0' in the context set '%1' cannot have a "
14895ffd83dbSDimitry Andric              "score ('%2'); score ignored">,
14905ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14915ffd83dbSDimitry Andricdef warn_omp_more_one_device_type_clause
14925ffd83dbSDimitry Andric    : Warning<"more than one 'device_type' clause is specified">,
14935ffd83dbSDimitry Andric      InGroup<OpenMPClauses>;
14945ffd83dbSDimitry Andricdef err_omp_variant_ctx_second_match_extension : Error<
14955ffd83dbSDimitry Andric  "only a single match extension allowed per OpenMP context selector">;
14965ffd83dbSDimitry Andricdef err_omp_invalid_dsa: Error<
14975ffd83dbSDimitry Andric  "data-sharing attribute '%0' in '%1' clause requires OpenMP version %2 or above">;
1498fe6060f1SDimitry Andricdef err_omp_expected_punc_after_interop_mod : Error<
1499fe6060f1SDimitry Andric  "expected ',' after interop modifier">;
1500fe6060f1SDimitry Andricdef err_omp_expected_interop_type : Error<
1501fe6060f1SDimitry Andric  "expected interop type: 'target' and/or 'targetsync'">;
1502fe6060f1SDimitry Andricdef warn_omp_more_one_interop_type
1503fe6060f1SDimitry Andric  : Warning<"interop type '%0' cannot be specified more than once">,
1504fe6060f1SDimitry Andric    InGroup<OpenMPClauses>;
1505fe6060f1SDimitry Andricdef err_expected_sequence_or_directive : Error<
1506fe6060f1SDimitry Andric  "expected an OpenMP 'directive' or 'sequence' attribute argument">;
1507fe6060f1SDimitry Andricdef ext_omp_attributes : ExtWarn<
1508fe6060f1SDimitry Andric  "specifying OpenMP directives with [[]] is an OpenMP 5.1 extension">,
1509fe6060f1SDimitry Andric  InGroup<OpenMP51Ext>;
1510fe6060f1SDimitry Andricdef warn_omp51_compat_attributes : Warning<
1511fe6060f1SDimitry Andric  "specifying OpenMP directives with [[]] is incompatible with OpenMP "
1512fe6060f1SDimitry Andric  "standards before OpenMP 5.1">,
1513fe6060f1SDimitry Andric  InGroup<OpenMPPre51Compat>, DefaultIgnore;
1514349cc55cSDimitry Andricdef err_omp_expected_colon : Error<"missing ':' in %0">;
1515349cc55cSDimitry Andricdef err_omp_expected_context_selector
1516349cc55cSDimitry Andric    : Error<"expected valid context selector in %0">;
151781ad6265SDimitry Andricdef err_omp_requires_out_inout_depend_type : Error<
151881ad6265SDimitry Andric  "reserved locator 'omp_all_memory' requires 'out' or 'inout' "
151981ad6265SDimitry Andric  "dependency types">;
152081ad6265SDimitry Andricdef warn_omp_more_one_omp_all_memory : Warning<
152181ad6265SDimitry Andric  "reserved locator 'omp_all_memory' cannot be specified more than once">,
152281ad6265SDimitry Andric  InGroup<OpenMPClauses>;
15230b57cec5SDimitry Andric
15240b57cec5SDimitry Andric// Pragma loop support.
15250b57cec5SDimitry Andricdef err_pragma_loop_missing_argument : Error<
15260b57cec5SDimitry Andric  "missing argument; expected %select{an integer value|"
15270b57cec5SDimitry Andric  "'enable'%select{|, 'full'}1%select{|, 'assume_safety'}2 or 'disable'}0">;
15280b57cec5SDimitry Andricdef err_pragma_loop_invalid_option : Error<
15290b57cec5SDimitry Andric  "%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, "
15300b57cec5SDimitry Andric  "vectorize_width, interleave, interleave_count, unroll, unroll_count, "
1531a7dea167SDimitry Andric  "pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute">;
1532e8d8bef9SDimitry Andricdef err_pragma_loop_invalid_vectorize_option : Error<
1533e8d8bef9SDimitry Andric  "vectorize_width loop hint malformed; use vectorize_width(X, fixed) or "
1534e8d8bef9SDimitry Andric  "vectorize_width(X, scalable) where X is an integer, or vectorize_width('fixed' or 'scalable')">;
1535e8d8bef9SDimitry Andricdef note_pragma_loop_invalid_vectorize_option : Note<
1536e8d8bef9SDimitry Andric  "vectorize_width loop hint malformed; use vectorize_width(X, fixed) or "
1537e8d8bef9SDimitry Andric  "vectorize_width(X, scalable) where X is an integer, or vectorize_width('fixed' or 'scalable')">;
15380b57cec5SDimitry Andric
15390b57cec5SDimitry Andricdef err_pragma_fp_invalid_option : Error<
1540e8d8bef9SDimitry Andric  "%select{invalid|missing}0 option%select{ %1|}0; expected 'contract', 'reassociate' or 'exceptions'">;
15410b57cec5SDimitry Andricdef err_pragma_fp_invalid_argument : Error<
1542e8d8bef9SDimitry Andric  "unexpected argument '%0' to '#pragma clang fp %1'; expected "
15435ffd83dbSDimitry Andric  "%select{"
1544e8d8bef9SDimitry Andric  "'fast' or 'on' or 'off'|"
1545e8d8bef9SDimitry Andric  "'on' or 'off'|"
154681ad6265SDimitry Andric  "'ignore', 'maytrap' or 'strict'|"
154781ad6265SDimitry Andric  "'source', 'double' or 'extended'}2">;
15480b57cec5SDimitry Andric
15490b57cec5SDimitry Andricdef err_pragma_invalid_keyword : Error<
15500b57cec5SDimitry Andric  "invalid argument; expected 'enable'%select{|, 'full'}0%select{|, 'assume_safety'}1 or 'disable'">;
15510b57cec5SDimitry Andricdef err_pragma_pipeline_invalid_keyword : Error<
15520b57cec5SDimitry Andric    "invalid argument; expected 'disable'">;
15530b57cec5SDimitry Andric
15540b57cec5SDimitry Andric// Pragma unroll support.
15550b57cec5SDimitry Andricdef warn_pragma_unroll_cuda_value_in_parens : Warning<
15560b57cec5SDimitry Andric  "argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
15570b57cec5SDimitry Andric  InGroup<CudaCompat>;
15580b57cec5SDimitry Andric
15590b57cec5SDimitry Andricdef warn_cuda_attr_lambda_position : Warning<
1560349cc55cSDimitry Andric  "nvcc does not allow '__%0__' to appear after the parameter list in lambdas">,
15610b57cec5SDimitry Andric  InGroup<CudaCompat>;
15620b57cec5SDimitry Andricdef warn_pragma_force_cuda_host_device_bad_arg : Warning<
15630b57cec5SDimitry Andric  "incorrect use of #pragma clang force_cuda_host_device begin|end">,
15640b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
15650b57cec5SDimitry Andricdef err_pragma_cannot_end_force_cuda_host_device : Error<
15660b57cec5SDimitry Andric  "force_cuda_host_device end pragma without matching "
15670b57cec5SDimitry Andric  "force_cuda_host_device begin">;
15680eae32dcSDimitry Andric
15690eae32dcSDimitry Andricdef warn_ext_int_deprecated : Warning<
15700eae32dcSDimitry Andric  "'_ExtInt' is deprecated; use '_BitInt' instead">, InGroup<DeprecatedType>;
15710eae32dcSDimitry Andricdef ext_bit_int : Extension<
15720eae32dcSDimitry Andric  "'_BitInt' in %select{C17 and earlier|C++}0 is a Clang extension">,
15730eae32dcSDimitry Andric  InGroup<DiagGroup<"bit-int-extension">>;
15740eae32dcSDimitry Andricdef warn_c17_compat_bit_int : Warning<
15750eae32dcSDimitry Andric  "'_BitInt' is incompatible with C standards before C2x">,
15760eae32dcSDimitry Andric  InGroup<CPre2xCompat>, DefaultIgnore;
15770b57cec5SDimitry Andric} // end of Parse Issue category.
15780b57cec5SDimitry Andric
15790b57cec5SDimitry Andriclet CategoryName = "Modules Issue" in {
15800b57cec5SDimitry Andricdef err_unexpected_module_decl : Error<
15810b57cec5SDimitry Andric  "module declaration can only appear at the top level">;
15820b57cec5SDimitry Andricdef err_module_expected_ident : Error<
15830b57cec5SDimitry Andric  "expected a module name after '%select{module|import}0'">;
15840b57cec5SDimitry Andricdef err_attribute_not_module_attr : Error<
15850b57cec5SDimitry Andric  "%0 attribute cannot be applied to a module">;
15860b57cec5SDimitry Andricdef err_attribute_not_import_attr : Error<
15870b57cec5SDimitry Andric  "%0 attribute cannot be applied to a module import">;
15880b57cec5SDimitry Andricdef err_module_expected_semi : Error<
15890b57cec5SDimitry Andric  "expected ';' after module name">;
15900b57cec5SDimitry Andricdef err_global_module_introducer_not_at_start : Error<
15910b57cec5SDimitry Andric  "'module;' introducing a global module fragment can appear only "
15920b57cec5SDimitry Andric  "at the start of the translation unit">;
15930b57cec5SDimitry Andricdef err_module_fragment_exported : Error<
15940b57cec5SDimitry Andric  "%select{global|private}0 module fragment cannot be exported">;
15950b57cec5SDimitry Andricdef err_private_module_fragment_expected_semi : Error<
15960b57cec5SDimitry Andric  "expected ';' after private module fragment declaration">;
15970b57cec5SDimitry Andricdef err_missing_before_module_end : Error<"expected %0 at end of module">;
15980b57cec5SDimitry Andricdef err_unsupported_module_partition : Error<
159981ad6265SDimitry Andric  "module partitions are only supported for C++20 onwards">;
160081ad6265SDimitry Andricdef err_import_not_allowed_here : Error<
160181ad6265SDimitry Andric  "imports must immediately follow the module declaration">;
160281ad6265SDimitry Andricdef err_partition_import_outside_module : Error<
160381ad6265SDimitry Andric  "module partition imports must be within a module purview">;
160481ad6265SDimitry Andricdef err_import_in_wrong_fragment : Error<
160581ad6265SDimitry Andric  "module%select{| partition}0 imports cannot be in the %select{global|private}1 module fragment">;
16060b57cec5SDimitry Andric
16070b57cec5SDimitry Andricdef err_export_empty : Error<"export declaration cannot be empty">;
16080b57cec5SDimitry Andric}
16090b57cec5SDimitry Andric
16100b57cec5SDimitry Andriclet CategoryName = "Generics Issue" in {
16110b57cec5SDimitry Andric
16120b57cec5SDimitry Andricdef err_objc_expected_type_parameter : Error<
16130b57cec5SDimitry Andric  "expected type parameter name">;
16140b57cec5SDimitry Andric
16150b57cec5SDimitry Andricdef err_objc_parameterized_implementation : Error<
16160b57cec5SDimitry Andric  "@implementation cannot have type parameters">;
16170b57cec5SDimitry Andric
16180b57cec5SDimitry Andricdef err_objc_type_args_after_protocols : Error<
16190b57cec5SDimitry Andric  "protocol qualifiers must precede type arguments">;
16200b57cec5SDimitry Andric
16210b57cec5SDimitry Andricdef note_meant_to_use_typename : Note<
16220b57cec5SDimitry Andric  "did you mean to use 'typename'?">;
16230b57cec5SDimitry Andric}
16240b57cec5SDimitry Andric
16250b57cec5SDimitry Andriclet CategoryName = "Coroutines Issue" in {
16260b57cec5SDimitry Andricdef err_for_co_await_not_range_for : Error<
16270b57cec5SDimitry Andric  "'co_await' modifier can only be applied to range-based for loop">;
16284824e7fdSDimitry Andricdef warn_deprecated_for_co_await : Warning<
16294824e7fdSDimitry Andric  "'for co_await' belongs to CoroutineTS instead of C++20, which is deprecated">,
16304824e7fdSDimitry Andric  InGroup<DeprecatedCoroutine>;
16310b57cec5SDimitry Andric}
16320b57cec5SDimitry Andric
16330b57cec5SDimitry Andriclet CategoryName = "Concepts Issue" in {
16340b57cec5SDimitry Andricdef err_concept_definition_not_identifier : Error<
16350b57cec5SDimitry Andric  "name defined in concept definition must be an identifier">;
1636bdd1243dSDimitry Andricdef err_concept_legacy_bool_keyword : Error<
1637bdd1243dSDimitry Andric  "ISO C++ does not permit the 'bool' keyword after 'concept'">;
163855e4f9d5SDimitry Andricdef err_placeholder_expected_auto_or_decltype_auto : Error<
163955e4f9d5SDimitry Andric  "expected 'auto' or 'decltype(auto)' after concept name">;
16400b57cec5SDimitry Andric}
16410b57cec5SDimitry Andric
16425ffd83dbSDimitry Andricdef warn_max_tokens : Warning<
16435ffd83dbSDimitry Andric  "the number of preprocessor source tokens (%0) exceeds this token limit (%1)">,
16445ffd83dbSDimitry Andric  InGroup<MaxTokens>, DefaultIgnore;
16455ffd83dbSDimitry Andric
16465ffd83dbSDimitry Andricdef warn_max_tokens_total : Warning<
16475ffd83dbSDimitry Andric  "the total number of preprocessor source tokens (%0) exceeds the token limit (%1)">,
16485ffd83dbSDimitry Andric  InGroup<MaxTokens>, DefaultIgnore;
16495ffd83dbSDimitry Andric
16505ffd83dbSDimitry Andricdef note_max_tokens_total_override : Note<"total token limit set here">;
16515ffd83dbSDimitry Andric
165281ad6265SDimitry Andric// HLSL Parser Diagnostics
165381ad6265SDimitry Andric
165481ad6265SDimitry Andricdef err_expected_semantic_identifier : Error<
165581ad6265SDimitry Andric  "expected HLSL Semantic identifier">;
1656bdd1243dSDimitry Andricdef err_invalid_declaration_in_hlsl_buffer : Error<
1657bdd1243dSDimitry Andric  "invalid declaration inside %select{tbuffer|cbuffer}0">;
165881ad6265SDimitry Andricdef err_unknown_hlsl_semantic : Error<"unknown HLSL semantic %0">;
1659bdd1243dSDimitry Andricdef err_hlsl_separate_attr_arg_and_number : Error<"wrong argument format for hlsl attribute, use %0 instead">;
166081ad6265SDimitry Andricdef ext_hlsl_access_specifiers : ExtWarn<
166181ad6265SDimitry Andric  "access specifiers are a clang HLSL extension">,
166281ad6265SDimitry Andric  InGroup<HLSLExtension>;
166381ad6265SDimitry Andric
16640b57cec5SDimitry Andric} // end of Parser diagnostics
1665