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
150b57cec5SDimitry Andricdef warn_asm_qualifier_ignored : Warning<
160b57cec5SDimitry Andric  "ignored %0 qualifier on asm">, CatInlineAsm, InGroup<ASMIgnoredQualifier>;
170b57cec5SDimitry Andricdef warn_file_asm_volatile : Warning<
180b57cec5SDimitry Andric  "meaningless 'volatile' on asm outside function">, CatInlineAsm,
190b57cec5SDimitry Andric  InGroup<ASMIgnoredQualifier>;
200b57cec5SDimitry Andric
210b57cec5SDimitry Andriclet CategoryName = "Inline Assembly Issue" in {
220b57cec5SDimitry Andricdef err_asm_empty : Error<"__asm used with no assembly instructions">;
230b57cec5SDimitry Andricdef err_inline_ms_asm_parsing : Error<"%0">;
240b57cec5SDimitry Andricdef err_msasm_unsupported_arch : Error<
250b57cec5SDimitry Andric  "Unsupported architecture '%0' for MS-style inline assembly">;
260b57cec5SDimitry Andricdef err_msasm_unable_to_create_target : Error<
270b57cec5SDimitry Andric  "MS-style inline assembly is not available: %0">;
280b57cec5SDimitry Andricdef err_gnu_inline_asm_disabled : Error<
290b57cec5SDimitry Andric  "GNU-style inline assembly is disabled">;
300b57cec5SDimitry Andricdef err_asm_goto_cannot_have_output : Error<
310b57cec5SDimitry Andric  "'asm goto' cannot have output constraints">;
320b57cec5SDimitry Andric}
330b57cec5SDimitry Andric
340b57cec5SDimitry Andriclet CategoryName = "Parse Issue" in {
350b57cec5SDimitry Andric
360b57cec5SDimitry Andricdef warn_cxx2a_compat_explicit_bool : Warning<
370b57cec5SDimitry Andric  "this expression will be parsed as explicit(bool) in C++2a">,
380b57cec5SDimitry Andric  InGroup<CXX2aCompat>, DefaultIgnore;
390b57cec5SDimitry Andric
400b57cec5SDimitry Andricdef ext_empty_translation_unit : Extension<
410b57cec5SDimitry Andric  "ISO C requires a translation unit to contain at least one declaration">,
420b57cec5SDimitry Andric  InGroup<DiagGroup<"empty-translation-unit">>;
430b57cec5SDimitry Andricdef warn_cxx98_compat_top_level_semi : Warning<
440b57cec5SDimitry Andric  "extra ';' outside of a function is incompatible with C++98">,
450b57cec5SDimitry Andric  InGroup<CXX98CompatExtraSemi>, DefaultIgnore;
460b57cec5SDimitry Andricdef ext_extra_semi : Extension<
470b57cec5SDimitry Andric  "extra ';' %select{"
480b57cec5SDimitry Andric  "outside of a function|"
490b57cec5SDimitry Andric  "inside a %1|"
500b57cec5SDimitry Andric  "inside instance variable list|"
510b57cec5SDimitry Andric  "after member function definition}0">,
520b57cec5SDimitry Andric  InGroup<ExtraSemi>;
530b57cec5SDimitry Andricdef ext_extra_semi_cxx11 : Extension<
540b57cec5SDimitry Andric  "extra ';' outside of a function is a C++11 extension">,
550b57cec5SDimitry Andric  InGroup<CXX11ExtraSemi>;
560b57cec5SDimitry Andricdef warn_extra_semi_after_mem_fn_def : Warning<
570b57cec5SDimitry Andric  "extra ';' after member function definition">,
580b57cec5SDimitry Andric  InGroup<ExtraSemi>, DefaultIgnore;
590b57cec5SDimitry Andricdef warn_null_statement : Warning<
600b57cec5SDimitry Andric  "empty expression statement has no effect; "
610b57cec5SDimitry Andric  "remove unnecessary ';' to silence this warning">,
620b57cec5SDimitry Andric  InGroup<ExtraSemiStmt>, DefaultIgnore;
630b57cec5SDimitry Andric
64480093f4SDimitry Andricdef warn_misleading_indentation : Warning<
65480093f4SDimitry Andric  "misleading indentation; statement is not part of "
66480093f4SDimitry Andric  "the previous '%select{if|else|for|while}0'">,
67480093f4SDimitry Andric  InGroup<MisleadingIndentation>, DefaultIgnore;
68480093f4SDimitry Andricdef note_previous_statement : Note<
69480093f4SDimitry Andric  "previous statement is here">;
70480093f4SDimitry Andric
710b57cec5SDimitry Andricdef ext_thread_before : Extension<"'__thread' before '%0'">;
720b57cec5SDimitry Andricdef ext_keyword_as_ident : ExtWarn<
730b57cec5SDimitry Andric  "keyword '%0' will be made available as an identifier "
740b57cec5SDimitry Andric  "%select{here|for the remainder of the translation unit}1">,
750b57cec5SDimitry Andric  InGroup<KeywordCompat>;
760b57cec5SDimitry Andric
770b57cec5SDimitry Andricdef ext_nullability : Extension<
780b57cec5SDimitry Andric  "type nullability specifier %0 is a Clang extension">,
790b57cec5SDimitry Andric  InGroup<DiagGroup<"nullability-extension">>;
800b57cec5SDimitry Andric
810b57cec5SDimitry Andricdef err_empty_enum : Error<"use of empty enum">;
820b57cec5SDimitry Andric
830b57cec5SDimitry Andricdef ext_ident_list_in_param : Extension<
840b57cec5SDimitry Andric  "type-less parameter names in function declaration">;
850b57cec5SDimitry Andricdef ext_c99_variable_decl_in_for_loop : Extension<
860b57cec5SDimitry Andric  "variable declaration in for loop is a C99-specific feature">, InGroup<C99>;
870b57cec5SDimitry Andricdef ext_c99_compound_literal : Extension<
880b57cec5SDimitry Andric  "compound literals are a C99-specific feature">, InGroup<C99>;
890b57cec5SDimitry Andricdef ext_enumerator_list_comma_c : Extension<
900b57cec5SDimitry Andric  "commas at the end of enumerator lists are a C99-specific "
910b57cec5SDimitry Andric  "feature">, InGroup<C99>;
920b57cec5SDimitry Andricdef ext_enumerator_list_comma_cxx : Extension<
930b57cec5SDimitry Andric  "commas at the end of enumerator lists are a C++11 extension">,
940b57cec5SDimitry Andric  InGroup<CXX11>;
950b57cec5SDimitry Andricdef warn_cxx98_compat_enumerator_list_comma : Warning<
960b57cec5SDimitry Andric  "commas at the end of enumerator lists are incompatible with C++98">,
970b57cec5SDimitry Andric  InGroup<CXX98CompatPedantic>, DefaultIgnore;
980b57cec5SDimitry Andricdef err_enumerator_list_missing_comma : Error<
990b57cec5SDimitry Andric  "missing ',' between enumerators">;
1000b57cec5SDimitry Andricdef err_enumerator_unnamed_no_def : Error<
1010b57cec5SDimitry Andric  "unnamed enumeration must be a definition">;
1020b57cec5SDimitry Andricdef ext_cxx11_enum_fixed_underlying_type : Extension<
1030b57cec5SDimitry Andric  "enumeration types with a fixed underlying type are a C++11 extension">,
1040b57cec5SDimitry Andric  InGroup<CXX11>;
1050b57cec5SDimitry Andricdef ext_ms_c_enum_fixed_underlying_type : Extension<
1060b57cec5SDimitry Andric  "enumeration types with a fixed underlying type are a Microsoft extension">,
1070b57cec5SDimitry Andric  InGroup<MicrosoftFixedEnum>;
1080b57cec5SDimitry Andricdef ext_clang_c_enum_fixed_underlying_type : Extension<
1090b57cec5SDimitry Andric  "enumeration types with a fixed underlying type are a Clang extension">,
1100b57cec5SDimitry Andric  InGroup<DiagGroup<"fixed-enum-extension">>;
1110b57cec5SDimitry Andricdef warn_cxx98_compat_enum_fixed_underlying_type : Warning<
1120b57cec5SDimitry Andric  "enumeration types with a fixed underlying type are incompatible with C++98">,
1130b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
1140b57cec5SDimitry Andricdef warn_cxx98_compat_alignof : Warning<
1150b57cec5SDimitry Andric  "alignof expressions are incompatible with C++98">,
1160b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
1170b57cec5SDimitry Andricdef ext_alignof_expr : ExtWarn<
1180b57cec5SDimitry Andric  "%0 applied to an expression is a GNU extension">, InGroup<GNUAlignofExpression>;
1190b57cec5SDimitry Andricdef err_lambda_after_delete : Error<
1200b57cec5SDimitry Andric  "'[]' after delete interpreted as 'delete[]'; add parentheses to treat this as a lambda-expression">;
1210b57cec5SDimitry Andric
1220b57cec5SDimitry Andricdef warn_microsoft_dependent_exists : Warning<
1230b57cec5SDimitry Andric  "dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">,
1240b57cec5SDimitry Andric  InGroup<DiagGroup<"microsoft-exists">>;
1250b57cec5SDimitry Andricdef warn_microsoft_qualifiers_ignored : Warning<
1260b57cec5SDimitry Andric  "qualifiers after comma in declarator list are ignored">,
1270b57cec5SDimitry Andric  InGroup<IgnoredAttributes>;
1280b57cec5SDimitry Andric
1290b57cec5SDimitry Andricdef err_duplicate_default_assoc : Error<
1300b57cec5SDimitry Andric  "duplicate default generic association">;
1310b57cec5SDimitry Andricdef note_previous_default_assoc : Note<
1320b57cec5SDimitry Andric  "previous default generic association is here">;
1330b57cec5SDimitry Andric
134a7dea167SDimitry Andricdef ext_c99_feature : Extension<
135a7dea167SDimitry Andric  "'%0' is a C99 extension">, InGroup<C99>;
136a7dea167SDimitry Andricdef ext_c11_feature : Extension<
137a7dea167SDimitry Andric  "'%0' is a C11 extension">, InGroup<C11>;
1380b57cec5SDimitry Andric
1390b57cec5SDimitry Andricdef err_c11_noreturn_misplaced : Error<
1400b57cec5SDimitry Andric  "'_Noreturn' keyword must precede function declarator">;
1410b57cec5SDimitry Andric
1420b57cec5SDimitry Andricdef ext_gnu_indirect_goto : Extension<
1430b57cec5SDimitry Andric  "use of GNU indirect-goto extension">, InGroup<GNULabelsAsValue>;
1440b57cec5SDimitry Andricdef ext_gnu_address_of_label : Extension<
1450b57cec5SDimitry Andric  "use of GNU address-of-label extension">, InGroup<GNULabelsAsValue>;
1460b57cec5SDimitry Andricdef err_stmtexpr_file_scope : Error<
1470b57cec5SDimitry Andric  "statement expression not allowed at file scope">;
1480b57cec5SDimitry Andricdef ext_gnu_statement_expr : Extension<
1490b57cec5SDimitry Andric  "use of GNU statement expression extension">, InGroup<GNUStatementExpression>;
1500b57cec5SDimitry Andricdef ext_gnu_conditional_expr : Extension<
1510b57cec5SDimitry Andric  "use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>;
1520b57cec5SDimitry Andricdef ext_gnu_empty_initializer : Extension<
1530b57cec5SDimitry Andric  "use of GNU empty initializer extension">, InGroup<GNUEmptyInitializer>;
1540b57cec5SDimitry Andricdef ext_gnu_array_range : Extension<"use of GNU array range extension">,
1550b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1560b57cec5SDimitry Andricdef ext_gnu_missing_equal_designator : ExtWarn<
1570b57cec5SDimitry Andric  "use of GNU 'missing =' extension in designator">,
1580b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1590b57cec5SDimitry Andricdef err_expected_equal_designator : Error<"expected '=' or another designator">;
1600b57cec5SDimitry Andricdef ext_gnu_old_style_field_designator : ExtWarn<
1610b57cec5SDimitry Andric  "use of GNU old-style field designator extension">,
1620b57cec5SDimitry Andric  InGroup<GNUDesignator>;
1630b57cec5SDimitry Andricdef ext_gnu_case_range : Extension<"use of GNU case range extension">,
1640b57cec5SDimitry Andric  InGroup<GNUCaseRange>;
1650b57cec5SDimitry Andric
1660b57cec5SDimitry Andric// Generic errors.
1670b57cec5SDimitry Andricdef err_expected_expression : Error<"expected expression">;
1680b57cec5SDimitry Andricdef err_expected_type : Error<"expected a type">;
1690b57cec5SDimitry Andricdef err_expected_external_declaration : Error<"expected external declaration">;
1700b57cec5SDimitry Andricdef err_extraneous_closing_brace : Error<"extraneous closing brace ('}')">;
1710b57cec5SDimitry Andricdef err_expected_semi_declaration : Error<
1720b57cec5SDimitry Andric  "expected ';' at end of declaration">;
1730b57cec5SDimitry Andricdef err_expected_semi_decl_list : Error<
1740b57cec5SDimitry Andric  "expected ';' at end of declaration list">;
1750b57cec5SDimitry Andricdef ext_expected_semi_decl_list : ExtWarn<
1760b57cec5SDimitry Andric  "expected ';' at end of declaration list">;
1770b57cec5SDimitry Andricdef err_expected_member_name_or_semi : Error<
1780b57cec5SDimitry Andric  "expected member name or ';' after declaration specifiers">;
1790b57cec5SDimitry Andricdef err_function_declared_typedef : Error<
1800b57cec5SDimitry Andric  "function definition declared 'typedef'">;
1810b57cec5SDimitry Andricdef err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">;
1820b57cec5SDimitry Andricdef err_at_in_class : Error<"unexpected '@' in member specification">;
1830b57cec5SDimitry Andricdef err_unexpected_semi : Error<"unexpected ';' before %0">;
184480093f4SDimitry Andricdef err_unparenthesized_non_primary_expr_in_requires_clause : Error<
185480093f4SDimitry Andric  "parentheses are required around this expression in a requires clause">;
186480093f4SDimitry Andricdef note_unparenthesized_non_primary_expr_in_requires_clause : Note<
187480093f4SDimitry Andric  "parentheses are required around this expression in a requires clause">;
188480093f4SDimitry Andricdef err_potential_function_call_in_constraint_logical_or : Error<
189480093f4SDimitry Andric  "function call must be parenthesized to be considered part of the requires "
190480093f4SDimitry Andric  "clause">;
1910b57cec5SDimitry Andric
1920b57cec5SDimitry Andricdef err_expected_fn_body : Error<
1930b57cec5SDimitry Andric  "expected function body after function declarator">;
1940b57cec5SDimitry Andricdef warn_attribute_on_function_definition : Warning<
1950b57cec5SDimitry Andric  "GCC does not allow %0 attribute in this position on a function definition">,
1960b57cec5SDimitry Andric  InGroup<GccCompat>;
1970b57cec5SDimitry Andricdef warn_gcc_attribute_location : Warning<
1980b57cec5SDimitry Andric  "GCC does not allow an attribute in this position on a function declaration">,
1990b57cec5SDimitry Andric  InGroup<GccCompat>;
2000b57cec5SDimitry Andricdef warn_gcc_variable_decl_in_for_loop : Warning<
2010b57cec5SDimitry Andric  "GCC does not allow variable declarations in for loop initializers before "
2020b57cec5SDimitry Andric  "C99">, InGroup<GccCompat>;
2030b57cec5SDimitry Andricdef warn_attribute_no_decl : Warning<
2040b57cec5SDimitry Andric  "attribute %0 ignored, because it is not attached to a declaration">,
2050b57cec5SDimitry Andric  InGroup<IgnoredAttributes>;
2060b57cec5SDimitry Andricdef err_ms_attributes_not_enabled : Error<
2070b57cec5SDimitry Andric  "'__declspec' attributes are not enabled; use '-fdeclspec' or "
2080b57cec5SDimitry Andric  "'-fms-extensions' to enable support for __declspec attributes">;
2090b57cec5SDimitry Andricdef err_expected_method_body : Error<"expected method body">;
2100b57cec5SDimitry Andricdef err_declspec_after_virtspec : Error<
2110b57cec5SDimitry Andric  "'%0' qualifier may not appear after the virtual specifier '%1'">;
2120b57cec5SDimitry Andricdef err_invalid_token_after_toplevel_declarator : Error<
2130b57cec5SDimitry Andric  "expected ';' after top level declarator">;
2140b57cec5SDimitry Andricdef err_invalid_token_after_declarator_suggest_equal : Error<
2150b57cec5SDimitry Andric  "invalid %0 at end of declaration; did you mean '='?">;
2160b57cec5SDimitry Andricdef err_expected_statement : Error<"expected statement">;
2170b57cec5SDimitry Andricdef err_expected_lparen_after : Error<"expected '(' after '%0'">;
218a7dea167SDimitry Andricdef err_expected_lbrace_after : Error<"expected '{' after '%0'">;
2190b57cec5SDimitry Andricdef err_expected_rparen_after : Error<"expected ')' after '%0'">;
2200b57cec5SDimitry Andricdef err_expected_punc : Error<"expected ')' or ',' after '%0'">;
2210b57cec5SDimitry Andricdef err_expected_less_after : Error<"expected '<' after '%0'">;
2220b57cec5SDimitry Andricdef err_expected_lbrace_in_compound_literal : Error<
2230b57cec5SDimitry Andric  "expected '{' in compound literal">;
2240b57cec5SDimitry Andricdef err_expected_while : Error<"expected 'while' in do/while loop">;
2250b57cec5SDimitry Andric
2260b57cec5SDimitry Andricdef err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">;
2270b57cec5SDimitry Andricdef err_expected_semi_after_expr : Error<"expected ';' after expression">;
2280b57cec5SDimitry Andricdef err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">;
2290b57cec5SDimitry Andric
2300b57cec5SDimitry Andricdef err_expected_semi_after_method_proto : Error<
2310b57cec5SDimitry Andric  "expected ';' after method prototype">;
2320b57cec5SDimitry Andricdef err_expected_semi_after_namespace_name : Error<
2330b57cec5SDimitry Andric  "expected ';' after namespace name">;
2340b57cec5SDimitry Andricdef err_unexpected_namespace_attributes_alias : Error<
2350b57cec5SDimitry Andric  "attributes cannot be specified on namespace alias">;
2360b57cec5SDimitry Andricdef err_unexpected_nested_namespace_attribute : Error<
2370b57cec5SDimitry Andric  "attributes cannot be specified on a nested namespace definition">;
2380b57cec5SDimitry Andricdef err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
2390b57cec5SDimitry Andricdef err_namespace_nonnamespace_scope : Error<
2400b57cec5SDimitry Andric  "namespaces can only be defined in global or namespace scope">;
2410b57cec5SDimitry Andricdef ext_nested_namespace_definition : ExtWarn<
2420b57cec5SDimitry Andric  "nested namespace definition is a C++17 extension; "
2430b57cec5SDimitry Andric  "define each namespace separately">, InGroup<CXX17>;
2440b57cec5SDimitry Andricdef warn_cxx14_compat_nested_namespace_definition : Warning<
2450b57cec5SDimitry Andric  "nested namespace definition is incompatible with C++ standards before C++17">,
2460b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
2470b57cec5SDimitry Andricdef ext_inline_nested_namespace_definition : ExtWarn<
2480b57cec5SDimitry Andric  "inline nested namespace definition is a C++2a extension">, InGroup<CXX2a>;
2490b57cec5SDimitry Andricdef warn_cxx17_compat_inline_nested_namespace_definition : Warning<
2500b57cec5SDimitry Andric  "inline nested namespace definition is incompatible with C++ standards before"
2510b57cec5SDimitry Andric  " C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore;
2520b57cec5SDimitry Andricdef err_inline_nested_namespace_definition : Error<
2530b57cec5SDimitry Andric  "nested namespace definition cannot be 'inline'">;
2540b57cec5SDimitry Andricdef err_expected_semi_after_attribute_list : Error<
2550b57cec5SDimitry Andric  "expected ';' after attribute list">;
2560b57cec5SDimitry Andricdef err_expected_semi_after_static_assert : Error<
2570b57cec5SDimitry Andric  "expected ';' after static_assert">;
2580b57cec5SDimitry Andricdef err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
2590b57cec5SDimitry Andricdef err_single_decl_assign_in_for_range : Error<
2600b57cec5SDimitry Andric  "range-based 'for' statement uses ':', not '='">;
2610b57cec5SDimitry Andricdef warn_missing_selector_name : Warning<
2620b57cec5SDimitry Andric  "%0 used as the name of the previous parameter rather than as part "
2630b57cec5SDimitry Andric  "of the selector">,
2640b57cec5SDimitry Andric  InGroup<DiagGroup<"missing-selector-name">>;
2650b57cec5SDimitry Andricdef note_missing_selector_name : Note<
2660b57cec5SDimitry Andric  "introduce a parameter name to make %0 part of the selector">;
2670b57cec5SDimitry Andricdef note_force_empty_selector_name : Note<
2680b57cec5SDimitry Andric  "or insert whitespace before ':' to use %0 as parameter name "
2690b57cec5SDimitry Andric  "and have an empty entry in the selector">;
2700b57cec5SDimitry Andricdef err_label_end_of_compound_statement : Error<
2710b57cec5SDimitry Andric  "label at end of compound statement: expected statement">;
2720b57cec5SDimitry Andricdef err_address_of_label_outside_fn : Error<
2730b57cec5SDimitry Andric  "use of address-of-label extension outside of a function body">;
2740b57cec5SDimitry Andricdef err_asm_operand_wide_string_literal : Error<
275480093f4SDimitry Andric  "cannot use %select{unicode|wide|an empty}0 string literal in 'asm'">;
2760b57cec5SDimitry Andricdef err_expected_selector_for_method : Error<
2770b57cec5SDimitry Andric  "expected selector for Objective-C method">;
2780b57cec5SDimitry Andricdef err_expected_property_name : Error<"expected property name">;
2790b57cec5SDimitry Andric
2800b57cec5SDimitry Andricdef err_unexpected_at : Error<"unexpected '@' in program">;
2810b57cec5SDimitry Andricdef err_atimport : Error<
2820b57cec5SDimitry Andric"use of '@import' when modules are disabled">;
2830b57cec5SDimitry Andric
2840b57cec5SDimitry Andricdef warn_atimport_in_framework_header : Warning<
2850b57cec5SDimitry Andric  "use of '@import' in framework header is discouraged, "
2860b57cec5SDimitry Andric  "including this header requires -fmodules">,
2870b57cec5SDimitry Andric  InGroup<FrameworkHdrAtImport>;
2880b57cec5SDimitry Andric
2890b57cec5SDimitry Andricdef err_invalid_reference_qualifier_application : Error<
2900b57cec5SDimitry Andric  "'%0' qualifier may not be applied to a reference">;
2910b57cec5SDimitry Andricdef err_illegal_decl_reference_to_reference : Error<
2920b57cec5SDimitry Andric  "%0 declared as a reference to a reference">;
2930b57cec5SDimitry Andricdef ext_rvalue_reference : ExtWarn<
2940b57cec5SDimitry Andric  "rvalue references are a C++11 extension">, InGroup<CXX11>;
2950b57cec5SDimitry Andricdef warn_cxx98_compat_rvalue_reference : Warning<
2960b57cec5SDimitry Andric  "rvalue references are incompatible with C++98">,
2970b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
2980b57cec5SDimitry Andricdef ext_ref_qualifier : ExtWarn<
2990b57cec5SDimitry Andric  "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>;
3000b57cec5SDimitry Andricdef warn_cxx98_compat_ref_qualifier : Warning<
3010b57cec5SDimitry Andric  "reference qualifiers on functions are incompatible with C++98">,
3020b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3030b57cec5SDimitry Andricdef ext_inline_namespace : ExtWarn<
3040b57cec5SDimitry Andric  "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
3050b57cec5SDimitry Andricdef warn_cxx98_compat_inline_namespace : Warning<
3060b57cec5SDimitry Andric  "inline namespaces are incompatible with C++98">,
3070b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3080b57cec5SDimitry Andricdef ext_generalized_initializer_lists : ExtWarn<
3090b57cec5SDimitry Andric  "generalized initializer lists are a C++11 extension">,
3100b57cec5SDimitry Andric  InGroup<CXX11>;
3110b57cec5SDimitry Andricdef warn_cxx98_compat_generalized_initializer_lists : Warning<
3120b57cec5SDimitry Andric  "generalized initializer lists are incompatible with C++98">,
3130b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3140b57cec5SDimitry Andricdef err_init_list_bin_op : Error<"initializer list cannot be used on the "
3150b57cec5SDimitry Andric  "%select{left|right}0 hand side of operator '%1'">;
3160b57cec5SDimitry Andricdef warn_cxx98_compat_trailing_return_type : Warning<
3170b57cec5SDimitry Andric  "trailing return types are incompatible with C++98">,
3180b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
319480093f4SDimitry Andricdef err_requires_clause_must_appear_after_trailing_return : Error<
320480093f4SDimitry Andric  "trailing return type must appear before trailing requires clause">;
321480093f4SDimitry Andricdef err_requires_clause_on_declarator_not_declaring_a_function : Error<
322480093f4SDimitry Andric  "trailing requires clause can only be used when declaring a function">;
323480093f4SDimitry Andricdef err_requires_clause_inside_parens : Error<
324480093f4SDimitry Andric  "trailing requires clause should be placed outside parentheses">;
3250b57cec5SDimitry Andricdef ext_auto_storage_class : ExtWarn<
3260b57cec5SDimitry Andric  "'auto' storage class specifier is not permitted in C++11, and will not "
3270b57cec5SDimitry Andric  "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
3280b57cec5SDimitry Andricdef ext_decltype_auto_type_specifier : ExtWarn<
3290b57cec5SDimitry Andric  "'decltype(auto)' type specifier is a C++14 extension">, InGroup<CXX14>;
3300b57cec5SDimitry Andricdef warn_cxx11_compat_decltype_auto_type_specifier : Warning<
3310b57cec5SDimitry Andric  "'decltype(auto)' type specifier is incompatible with C++ standards before "
3320b57cec5SDimitry Andric  "C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
3330b57cec5SDimitry Andricdef ext_auto_type : Extension<
3340b57cec5SDimitry Andric  "'__auto_type' is a GNU extension">,
3350b57cec5SDimitry Andric  InGroup<GNUAutoType>;
3360b57cec5SDimitry Andricdef ext_for_range : ExtWarn<
3370b57cec5SDimitry Andric  "range-based for loop is a C++11 extension">, InGroup<CXX11>;
3380b57cec5SDimitry Andricdef warn_cxx98_compat_for_range : Warning<
3390b57cec5SDimitry Andric  "range-based for loop is incompatible with C++98">,
3400b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3410b57cec5SDimitry Andricdef err_for_range_identifier : Error<
3420b57cec5SDimitry Andric  "range-based for loop requires type for loop variable">;
3430b57cec5SDimitry Andricdef err_for_range_expected_decl : Error<
3440b57cec5SDimitry Andric  "for range declaration must declare a variable">;
3450b57cec5SDimitry Andricdef err_argument_required_after_attribute : Error<
3460b57cec5SDimitry Andric  "argument required after attribute">;
3470b57cec5SDimitry Andricdef err_missing_param : Error<"expected parameter declarator">;
348480093f4SDimitry Andricdef err_function_scope_depth_exceeded : Error<
349480093f4SDimitry Andric  "function scope depth exceeded maximum of %0">, DefaultFatal;
3500b57cec5SDimitry Andricdef err_missing_comma_before_ellipsis : Error<
3510b57cec5SDimitry Andric  "C requires a comma prior to the ellipsis in a variadic function type">;
3520b57cec5SDimitry Andricdef err_unexpected_typedef_ident : Error<
3530b57cec5SDimitry Andric  "unexpected type name %0: expected identifier">;
3540b57cec5SDimitry Andricdef warn_cxx98_compat_decltype : Warning<
3550b57cec5SDimitry Andric  "'decltype' type specifier is incompatible with C++98">,
3560b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
3570b57cec5SDimitry Andricdef err_unexpected_scope_on_base_decltype : Error<
3580b57cec5SDimitry Andric  "unexpected namespace scope prior to decltype">;
3590b57cec5SDimitry Andricdef err_expected_class_name : Error<"expected class name">;
3600b57cec5SDimitry Andricdef err_expected_class_name_not_template :
3610b57cec5SDimitry Andric  Error<"'typename' is redundant; base classes are implicitly types">;
3620b57cec5SDimitry Andricdef err_unspecified_vla_size_with_static : Error<
3630b57cec5SDimitry Andric  "'static' may not be used with an unspecified variable length array size">;
3640b57cec5SDimitry Andricdef err_unspecified_size_with_static : Error<
3650b57cec5SDimitry Andric  "'static' may not be used without an array size">;
3660b57cec5SDimitry Andricdef err_expected_parentheses_around_typename : Error<
3670b57cec5SDimitry Andric  "expected parentheses around type name in %0 expression">;
3680b57cec5SDimitry Andric
3690b57cec5SDimitry Andricdef err_expected_case_before_expression: Error<
3700b57cec5SDimitry Andric  "expected 'case' keyword before expression">;
3710b57cec5SDimitry Andric
3720b57cec5SDimitry Andricdef ext_warn_gnu_final : ExtWarn<
3730b57cec5SDimitry Andric  "__final is a GNU extension, consider using C++11 final">,
3740b57cec5SDimitry Andric  InGroup<GccCompat>;
3750b57cec5SDimitry Andric
3760b57cec5SDimitry Andric// Declarations.
3770b57cec5SDimitry Andricdef err_typename_requires_specqual : Error<
3780b57cec5SDimitry Andric  "type name requires a specifier or qualifier">;
3790b57cec5SDimitry Andricdef err_typename_invalid_storageclass : Error<
3800b57cec5SDimitry Andric  "type name does not allow storage class to be specified">;
3810b57cec5SDimitry Andricdef err_typename_invalid_functionspec : Error<
3820b57cec5SDimitry Andric  "type name does not allow function specifier to be specified">;
3830b57cec5SDimitry Andricdef err_typename_invalid_constexpr : Error<
384a7dea167SDimitry Andric  "type name does not allow %sub{select_constexpr_spec_kind}0 specifier "
385a7dea167SDimitry Andric  "to be specified">;
3860b57cec5SDimitry Andricdef err_typename_identifiers_only : Error<
3870b57cec5SDimitry Andric  "typename is allowed for identifiers only">;
3880b57cec5SDimitry Andric
3890b57cec5SDimitry Andricdef err_friend_invalid_in_context : Error<
3900b57cec5SDimitry Andric  "'friend' used outside of class">;
3910b57cec5SDimitry Andricdef err_templated_using_directive_declaration : Error<
3920b57cec5SDimitry Andric  "cannot template a using %select{directive|declaration}0">;
3930b57cec5SDimitry Andricdef err_unexpected_colon_in_nested_name_spec : Error<
3940b57cec5SDimitry Andric  "unexpected ':' in nested name specifier; did you mean '::'?">;
3950b57cec5SDimitry Andricdef err_unexpected_token_in_nested_name_spec : Error<
3960b57cec5SDimitry Andric  "'%0' cannot be a part of nested name specifier; did you mean ':'?">;
3970b57cec5SDimitry Andricdef err_bool_redeclaration : Error<
3980b57cec5SDimitry Andric  "redeclaration of C++ built-in type 'bool'">;
3990b57cec5SDimitry Andricdef warn_cxx98_compat_static_assert : Warning<
4000b57cec5SDimitry Andric  "static_assert declarations are incompatible with C++98">,
4010b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
4020b57cec5SDimitry Andricdef ext_static_assert_no_message : ExtWarn<
4030b57cec5SDimitry Andric  "static_assert with no message is a C++17 extension">, InGroup<CXX17>;
4040b57cec5SDimitry Andricdef warn_cxx14_compat_static_assert_no_message : Warning<
4050b57cec5SDimitry Andric  "static_assert with no message is incompatible with C++ standards before "
4060b57cec5SDimitry Andric  "C++17">,
4070b57cec5SDimitry Andric  DefaultIgnore, InGroup<CXXPre17Compat>;
4080b57cec5SDimitry Andricdef err_function_definition_not_allowed : Error<
4090b57cec5SDimitry Andric  "function definition is not allowed here">;
4100b57cec5SDimitry Andricdef err_expected_end_of_enumerator : Error<
4110b57cec5SDimitry Andric  "expected '= constant-expression' or end of enumerator definition">;
4120b57cec5SDimitry Andricdef err_expected_coloncolon_after_super : Error<
4130b57cec5SDimitry Andric  "expected '::' after '__super'">;
4140b57cec5SDimitry Andric
4150b57cec5SDimitry Andricdef ext_decomp_decl_empty : ExtWarn<
4160b57cec5SDimitry Andric  "ISO C++17 does not allow a decomposition group to be empty">,
4170b57cec5SDimitry Andric  InGroup<DiagGroup<"empty-decomposition">>;
4180b57cec5SDimitry Andric
4190b57cec5SDimitry Andric/// Objective-C parser diagnostics
4200b57cec5SDimitry Andricdef err_expected_minus_or_plus : Error<
4210b57cec5SDimitry Andric  "method type specifier must start with '-' or '+'">;
4220b57cec5SDimitry Andricdef err_objc_missing_end : Error<"missing '@end'">;
4230b57cec5SDimitry Andricdef note_objc_container_start : Note<
4240b57cec5SDimitry Andric  "%select{class|protocol|category|class extension|implementation"
4250b57cec5SDimitry Andric  "|category implementation}0 started here">;
4260b57cec5SDimitry Andricdef warn_objc_protocol_qualifier_missing_id : Warning<
4270b57cec5SDimitry Andric  "protocol has no object type specified; defaults to qualified 'id'">;
4280b57cec5SDimitry Andricdef err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">;
4290b57cec5SDimitry Andricdef err_illegal_super_cast : Error<
4300b57cec5SDimitry Andric  "cannot cast 'super' (it isn't an expression)">;
4310b57cec5SDimitry Andricdef err_nsnumber_nonliteral_unary : Error<
4320b57cec5SDimitry Andric  "@%0 must be followed by a number to form an NSNumber object">;
4330b57cec5SDimitry Andricdef warn_cstyle_param : Warning<
4340b57cec5SDimitry Andric  "use of C-style parameters in Objective-C method declarations"
4350b57cec5SDimitry Andric  " is deprecated">, InGroup<DeprecatedDeclarations>;
4360b57cec5SDimitry Andric
4370b57cec5SDimitry Andriclet CategoryName = "ARC Parse Issue" in {
4380b57cec5SDimitry Andricdef err_arc_bridge_retain : Error<
4390b57cec5SDimitry Andric  "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">;
4400b57cec5SDimitry Andric// To be default mapped to an error later.
4410b57cec5SDimitry Andricdef warn_arc_bridge_cast_nonarc : Warning<
4420b57cec5SDimitry Andric  "'%0' casts have no effect when not using ARC">,
4430b57cec5SDimitry Andric  InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>;
4440b57cec5SDimitry Andric}
4450b57cec5SDimitry Andric
4460b57cec5SDimitry Andricdef err_objc_illegal_visibility_spec : Error<
4470b57cec5SDimitry Andric  "illegal visibility specification">;
4480b57cec5SDimitry Andricdef err_objc_illegal_interface_qual : Error<"illegal interface qualifier">;
4490b57cec5SDimitry Andricdef err_objc_expected_equal_for_getter : Error<
4500b57cec5SDimitry Andric  "expected '=' for Objective-C getter">;
4510b57cec5SDimitry Andricdef err_objc_expected_equal_for_setter : Error<
4520b57cec5SDimitry Andric  "expected '=' for Objective-C setter">;
4530b57cec5SDimitry Andricdef err_objc_expected_selector_for_getter_setter : Error<
4540b57cec5SDimitry Andric  "expected selector for Objective-C %select{setter|getter}0">;
4550b57cec5SDimitry Andricdef err_objc_property_requires_field_name : Error<
4560b57cec5SDimitry Andric  "property requires fields to be named">;
4570b57cec5SDimitry Andricdef err_objc_property_bitfield : Error<"property name cannot be a bit-field">;
4580b57cec5SDimitry Andricdef err_objc_expected_property_attr : Error<"unknown property attribute %0">;
4590b57cec5SDimitry Andricdef err_objc_unexpected_attr : Error<
4600b57cec5SDimitry Andric  "prefix attribute must be followed by an interface, protocol, or implementation">;
4610b57cec5SDimitry Andricdef err_objc_postfix_attribute : Error <
4620b57cec5SDimitry Andric  "postfix attributes are not allowed on Objective-C directives">;
4630b57cec5SDimitry Andricdef err_objc_postfix_attribute_hint : Error <
4640b57cec5SDimitry Andric  "postfix attributes are not allowed on Objective-C directives, place"
4650b57cec5SDimitry Andric  " them in front of '%select{@interface|@protocol}0'">;
4660b57cec5SDimitry Andricdef err_objc_directive_only_in_protocol : Error<
4670b57cec5SDimitry Andric  "directive may only be specified in protocols only">;
4680b57cec5SDimitry Andricdef err_missing_catch_finally : Error<
4690b57cec5SDimitry Andric  "@try statement without a @catch and @finally clause">;
4700b57cec5SDimitry Andricdef err_objc_concat_string : Error<"unexpected token after Objective-C string">;
4710b57cec5SDimitry Andricdef err_expected_objc_container : Error<
4720b57cec5SDimitry Andric  "'@end' must appear in an Objective-C context">;
4730b57cec5SDimitry Andricdef err_unexpected_protocol_qualifier : Error<
4740b57cec5SDimitry Andric  "@implementation declaration cannot be protocol qualified">;
4750b57cec5SDimitry Andricdef err_objc_unexpected_atend : Error<
4760b57cec5SDimitry Andric  "'@end' appears where closing brace '}' is expected">;
4770b57cec5SDimitry Andricdef err_synthesized_property_name : Error<
4780b57cec5SDimitry Andric  "expected a property name in @synthesize">;
4790b57cec5SDimitry Andricdef warn_semicolon_before_method_body : Warning<
4800b57cec5SDimitry Andric  "semicolon before method body is ignored">,
4810b57cec5SDimitry Andric  InGroup<SemiBeforeMethodBody>, DefaultIgnore;
4820b57cec5SDimitry Andricdef note_extra_comma_message_arg : Note<
4830b57cec5SDimitry Andric  "comma separating Objective-C messaging arguments">;
4840b57cec5SDimitry Andric
4850b57cec5SDimitry Andricdef err_expected_field_designator : Error<
4860b57cec5SDimitry Andric  "expected a field designator, such as '.field = 4'">;
4870b57cec5SDimitry Andric
4880b57cec5SDimitry Andricdef err_declaration_does_not_declare_param : Error<
4890b57cec5SDimitry Andric  "declaration does not declare a parameter">;
4900b57cec5SDimitry Andricdef err_no_matching_param : Error<"parameter named %0 is missing">;
4910b57cec5SDimitry Andric
4920b57cec5SDimitry Andric/// Objective-C++ parser diagnostics
4930b57cec5SDimitry Andricdef err_expected_token_instead_of_objcxx_keyword : Error<
4940b57cec5SDimitry Andric  "expected %0; %1 is a keyword in Objective-C++">;
4950b57cec5SDimitry Andricdef err_expected_member_name_or_semi_objcxx_keyword : Error<
4960b57cec5SDimitry Andric  "expected member name or ';' after declaration specifiers; "
4970b57cec5SDimitry Andric  "%0 is a keyword in Objective-C++">;
4980b57cec5SDimitry Andric
4990b57cec5SDimitry Andric/// C++ parser diagnostics
5000b57cec5SDimitry Andricdef err_invalid_operator_on_type : Error<
5010b57cec5SDimitry Andric  "cannot use %select{dot|arrow}0 operator on a type">;
5020b57cec5SDimitry Andricdef err_expected_unqualified_id : Error<
5030b57cec5SDimitry Andric  "expected %select{identifier|unqualified-id}0">;
5040b57cec5SDimitry Andricdef err_brackets_go_after_unqualified_id : Error<
5050b57cec5SDimitry Andric  "brackets are not allowed here; to declare an array, "
5060b57cec5SDimitry Andric  "place the brackets after the %select{identifier|name}0">;
5070b57cec5SDimitry Andricdef err_unexpected_unqualified_id : Error<"type-id cannot have a name">;
5080b57cec5SDimitry Andricdef err_func_def_no_params : Error<
5090b57cec5SDimitry Andric  "function definition does not declare parameters">;
5100b57cec5SDimitry Andricdef err_expected_lparen_after_type : Error<
5110b57cec5SDimitry Andric  "expected '(' for function-style cast or type construction">;
5120b57cec5SDimitry Andricdef err_expected_init_in_condition : Error<
5130b57cec5SDimitry Andric  "variable declaration in condition must have an initializer">;
5140b57cec5SDimitry Andricdef err_expected_init_in_condition_lparen : Error<
5150b57cec5SDimitry Andric  "variable declaration in condition cannot have a parenthesized initializer">;
5160b57cec5SDimitry Andricdef err_extraneous_rparen_in_condition : Error<
5170b57cec5SDimitry Andric  "extraneous ')' after condition, expected a statement">;
5180b57cec5SDimitry Andricdef warn_dangling_else : Warning<
5190b57cec5SDimitry Andric  "add explicit braces to avoid dangling else">,
5200b57cec5SDimitry Andric  InGroup<DanglingElse>;
5210b57cec5SDimitry Andricdef err_expected_member_or_base_name : Error<
5220b57cec5SDimitry Andric  "expected class member or base class name">;
5230b57cec5SDimitry Andricdef err_expected_lbrace_after_base_specifiers : Error<
5240b57cec5SDimitry Andric  "expected '{' after base class list">;
5250b57cec5SDimitry Andricdef err_missing_end_of_definition : Error<
5260b57cec5SDimitry Andric  "missing '}' at end of definition of %q0">;
5270b57cec5SDimitry Andricdef note_missing_end_of_definition_before : Note<
5280b57cec5SDimitry Andric  "still within definition of %q0 here">;
5290b57cec5SDimitry Andricdef ext_ellipsis_exception_spec : Extension<
5300b57cec5SDimitry Andric  "exception specification of '...' is a Microsoft extension">,
5310b57cec5SDimitry Andric  InGroup<MicrosoftExceptionSpec>;
5320b57cec5SDimitry Andricdef err_dynamic_and_noexcept_specification : Error<
5330b57cec5SDimitry Andric  "cannot have both throw() and noexcept() clause on the same function">;
5340b57cec5SDimitry Andricdef err_except_spec_unparsed : Error<
5350b57cec5SDimitry Andric  "unexpected end of exception specification">;
5360b57cec5SDimitry Andricdef ext_dynamic_exception_spec : ExtWarn<
5370b57cec5SDimitry Andric  "ISO C++17 does not allow dynamic exception specifications">,
5380b57cec5SDimitry Andric  InGroup<DynamicExceptionSpec>, DefaultError;
5390b57cec5SDimitry Andricdef warn_exception_spec_deprecated : Warning<
5400b57cec5SDimitry Andric  "dynamic exception specifications are deprecated">,
5410b57cec5SDimitry Andric  InGroup<DeprecatedDynamicExceptionSpec>, DefaultIgnore;
5420b57cec5SDimitry Andricdef note_exception_spec_deprecated : Note<"use '%0' instead">;
5430b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_decl : Warning<
5440b57cec5SDimitry Andric  "noexcept specifications are incompatible with C++98">,
5450b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
5460b57cec5SDimitry Andricdef err_expected_catch : Error<"expected catch">;
5470b57cec5SDimitry Andricdef err_using_namespace_in_class : Error<
5480b57cec5SDimitry Andric  "'using namespace' is not allowed in classes">;
5490b57cec5SDimitry Andricdef err_constructor_bad_name : Error<
5500b57cec5SDimitry Andric  "missing return type for function %0; did you mean the constructor name %1?">;
5510b57cec5SDimitry Andricdef err_destructor_tilde_identifier : Error<
5520b57cec5SDimitry Andric  "expected a class name after '~' to name a destructor">;
5530b57cec5SDimitry Andricdef err_destructor_tilde_scope : Error<
5540b57cec5SDimitry Andric  "'~' in destructor name should be after nested name specifier">;
5550b57cec5SDimitry Andricdef err_destructor_template_id : Error<
5560b57cec5SDimitry Andric  "destructor name %0 does not refer to a template">;
5570b57cec5SDimitry Andricdef err_default_arg_unparsed : Error<
5580b57cec5SDimitry Andric  "unexpected end of default argument expression">;
5590b57cec5SDimitry Andricdef err_bracket_depth_exceeded : Error<
5600b57cec5SDimitry Andric  "bracket nesting level exceeded maximum of %0">, DefaultFatal;
5610b57cec5SDimitry Andricdef note_bracket_depth : Note<
5620b57cec5SDimitry Andric  "use -fbracket-depth=N to increase maximum nesting level">;
5630b57cec5SDimitry Andricdef err_misplaced_ellipsis_in_declaration : Error<
5640b57cec5SDimitry Andric  "'...' must %select{immediately precede declared identifier|"
5650b57cec5SDimitry Andric  "be innermost component of anonymous pack declaration}0">;
5660b57cec5SDimitry Andricdef warn_misplaced_ellipsis_vararg : Warning<
5670b57cec5SDimitry Andric  "'...' in this location creates a C-style varargs function"
5680b57cec5SDimitry Andric  "%select{, not a function parameter pack|}0">,
5690b57cec5SDimitry Andric  InGroup<DiagGroup<"ambiguous-ellipsis">>;
5700b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_existing_ellipsis : Note<
5710b57cec5SDimitry Andric  "preceding '...' declares a function parameter pack">;
5720b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_ellipsis : Note<
5730b57cec5SDimitry Andric  "place '...' %select{immediately before declared identifier|here}0 "
5740b57cec5SDimitry Andric  "to declare a function parameter pack">;
5750b57cec5SDimitry Andricdef note_misplaced_ellipsis_vararg_add_comma : Note<
5760b57cec5SDimitry Andric  "insert ',' before '...' to silence this warning">;
5770b57cec5SDimitry Andricdef ext_abstract_pack_declarator_parens : ExtWarn<
5780b57cec5SDimitry Andric  "ISO C++11 requires a parenthesized pack declaration to have a name">,
5790b57cec5SDimitry Andric  InGroup<DiagGroup<"anonymous-pack-parens">>;
5800b57cec5SDimitry Andricdef err_function_is_not_record : Error<
5810b57cec5SDimitry Andric  "unexpected %0 in function call; perhaps remove the %0?">;
5820b57cec5SDimitry Andricdef err_super_in_using_declaration : Error<
5830b57cec5SDimitry Andric  "'__super' cannot be used with a using declaration">;
5840b57cec5SDimitry Andricdef ext_constexpr_if : ExtWarn<
5850b57cec5SDimitry Andric  "constexpr if is a C++17 extension">, InGroup<CXX17>;
5860b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_if : Warning<
5870b57cec5SDimitry Andric  "constexpr if is incompatible with C++ standards before C++17">,
5880b57cec5SDimitry Andric  DefaultIgnore, InGroup<CXXPre17Compat>;
5890b57cec5SDimitry Andricdef ext_init_statement : ExtWarn<
5900b57cec5SDimitry Andric  "'%select{if|switch}0' initialization statements are a C++17 extension">,
5910b57cec5SDimitry Andric  InGroup<CXX17>;
5920b57cec5SDimitry Andricdef warn_cxx14_compat_init_statement : Warning<
5930b57cec5SDimitry Andric  "%select{if|switch}0 initialization statements are incompatible with "
5940b57cec5SDimitry Andric  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>;
5950b57cec5SDimitry Andricdef ext_for_range_init_stmt : ExtWarn<
5960b57cec5SDimitry Andric  "range-based for loop initialization statements are a C++2a extension">,
5970b57cec5SDimitry Andric  InGroup<CXX2a>;
5980b57cec5SDimitry Andricdef warn_cxx17_compat_for_range_init_stmt : Warning<
5990b57cec5SDimitry Andric  "range-based for loop initialization statements are incompatible with "
6000b57cec5SDimitry Andric  "C++ standards before C++2a">, DefaultIgnore, InGroup<CXXPre2aCompat>;
6010b57cec5SDimitry Andricdef warn_empty_init_statement : Warning<
6020b57cec5SDimitry Andric  "empty initialization statement of '%select{if|switch|range-based for}0' "
6030b57cec5SDimitry Andric  "has no effect">, InGroup<EmptyInitStatement>, DefaultIgnore;
6040b57cec5SDimitry Andric
6050b57cec5SDimitry Andric// C++ derived classes
6060b57cec5SDimitry Andricdef err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
6070b57cec5SDimitry Andric
6080b57cec5SDimitry Andric// C++ operator overloading
6090b57cec5SDimitry Andricdef err_literal_operator_string_prefix : Error<
6100b57cec5SDimitry Andric  "string literal after 'operator' cannot have an encoding prefix">;
6110b57cec5SDimitry Andricdef err_literal_operator_string_not_empty : Error<
6120b57cec5SDimitry Andric  "string literal after 'operator' must be '\"\"'">;
6130b57cec5SDimitry Andricdef warn_cxx98_compat_literal_operator : Warning<
6140b57cec5SDimitry Andric  "literal operators are incompatible with C++98">,
6150b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6160b57cec5SDimitry Andric
6170b57cec5SDimitry Andric// Classes.
6180b57cec5SDimitry Andricdef err_anon_type_definition : Error<
6190b57cec5SDimitry Andric  "declaration of anonymous %0 must be a definition">;
6200b57cec5SDimitry Andricdef err_default_delete_in_multiple_declaration : Error<
6210b57cec5SDimitry Andric  "'= %select{default|delete}0' is a function definition and must occur in a "
6220b57cec5SDimitry Andric  "standalone declaration">;
6230b57cec5SDimitry Andric
6240b57cec5SDimitry Andricdef warn_cxx98_compat_noexcept_expr : Warning<
6250b57cec5SDimitry Andric  "noexcept expressions are incompatible with C++98">,
6260b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6270b57cec5SDimitry Andricdef warn_cxx98_compat_nullptr : Warning<
6280b57cec5SDimitry Andric  "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
6290b57cec5SDimitry Andric
6300b57cec5SDimitry Andricdef warn_wrong_clang_attr_namespace : Warning<
6310b57cec5SDimitry Andric  "'__clang__' is a predefined macro name, not an attribute scope specifier; "
6320b57cec5SDimitry Andric  "did you mean '_Clang' instead?">, InGroup<IgnoredAttributes>;
6330b57cec5SDimitry Andricdef ext_ns_enum_attribute : Extension<
6340b57cec5SDimitry Andric  "attributes on %select{a namespace|an enumerator}0 declaration are "
6350b57cec5SDimitry Andric  "a C++17 extension">, InGroup<CXX17>;
6360b57cec5SDimitry Andricdef warn_cxx14_compat_ns_enum_attribute : Warning<
6370b57cec5SDimitry Andric  "attributes on %select{a namespace|an enumerator}0 declaration are "
6380b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
6390b57cec5SDimitry Andric  InGroup<CXXPre17CompatPedantic>, DefaultIgnore;
6400b57cec5SDimitry Andricdef warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
6410b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6420b57cec5SDimitry Andricdef warn_cxx98_compat_attribute : Warning<
6430b57cec5SDimitry Andric  "C++11 attribute syntax is incompatible with C++98">,
6440b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
6450b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_arguments : Error<
6460b57cec5SDimitry Andric  "attribute %0 cannot have an argument list">;
6470b57cec5SDimitry Andricdef err_attribute_requires_arguments : Error<
6480b57cec5SDimitry Andric  "parentheses must be omitted if %0 attribute's argument list is empty">;
6490b57cec5SDimitry Andricdef err_cxx11_attribute_forbids_ellipsis : Error<
6500b57cec5SDimitry Andric  "attribute %0 cannot be used as an attribute pack">;
6510b57cec5SDimitry Andricdef err_cxx11_attribute_repeated : Error<
6520b57cec5SDimitry Andric  "attribute %0 cannot appear multiple times in an attribute specifier">;
6530b57cec5SDimitry Andricdef warn_cxx14_compat_using_attribute_ns : Warning<
6540b57cec5SDimitry Andric  "default scope specifier for attributes is incompatible with C++ standards "
6550b57cec5SDimitry Andric  "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore;
6560b57cec5SDimitry Andricdef ext_using_attribute_ns : ExtWarn<
6570b57cec5SDimitry Andric  "default scope specifier for attributes is a C++17 extension">,
6580b57cec5SDimitry Andric  InGroup<CXX17>;
6590b57cec5SDimitry Andricdef err_using_attribute_ns_conflict : Error<
6600b57cec5SDimitry Andric  "attribute with scope specifier cannot follow default scope specifier">;
6610b57cec5SDimitry Andricdef err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
6620b57cec5SDimitry Andricdef err_attributes_misplaced : Error<"misplaced attributes; expected attributes here">;
6630b57cec5SDimitry Andricdef err_l_square_l_square_not_attribute : Error<
6640b57cec5SDimitry Andric  "C++11 only allows consecutive left square brackets when "
6650b57cec5SDimitry Andric  "introducing an attribute">;
6660b57cec5SDimitry Andricdef err_ms_declspec_type : Error<
6670b57cec5SDimitry Andric  "__declspec attributes must be an identifier or string literal">;
6680b57cec5SDimitry Andricdef err_ms_property_no_getter_or_putter : Error<
6690b57cec5SDimitry Andric  "property does not specify a getter or a putter">;
6700b57cec5SDimitry Andricdef err_ms_property_unknown_accessor : Error<
6710b57cec5SDimitry Andric  "expected 'get' or 'put' in property declaration">;
6720b57cec5SDimitry Andricdef err_ms_property_has_set_accessor : Error<
6730b57cec5SDimitry Andric  "putter for property must be specified as 'put', not 'set'">;
6740b57cec5SDimitry Andricdef err_ms_property_missing_accessor_kind : Error<
6750b57cec5SDimitry Andric  "missing 'get=' or 'put='">;
6760b57cec5SDimitry Andricdef err_ms_property_expected_equal : Error<
6770b57cec5SDimitry Andric  "expected '=' after '%0'">;
6780b57cec5SDimitry Andricdef err_ms_property_duplicate_accessor : Error<
6790b57cec5SDimitry Andric  "property declaration specifies '%0' accessor twice">;
6800b57cec5SDimitry Andricdef err_ms_property_expected_accessor_name : Error<
6810b57cec5SDimitry Andric  "expected name of accessor method">;
6820b57cec5SDimitry Andricdef err_ms_property_expected_comma_or_rparen : Error<
6830b57cec5SDimitry Andric  "expected ',' or ')' at end of property accessor list">;
6840b57cec5SDimitry Andricdef err_ms_property_initializer : Error<
6850b57cec5SDimitry Andric  "property declaration cannot have an in-class initializer">;
6860b57cec5SDimitry Andric
6870b57cec5SDimitry Andric/// C++ Templates
6880b57cec5SDimitry Andricdef err_expected_template : Error<"expected template">;
6890b57cec5SDimitry Andricdef err_unknown_template_name : Error<
6900b57cec5SDimitry Andric  "unknown template name %0">;
6910b57cec5SDimitry Andricdef err_expected_comma_greater : Error<
6920b57cec5SDimitry Andric  "expected ',' or '>' in template-parameter-list">;
6930b57cec5SDimitry Andricdef err_class_on_template_template_param : Error<
6940b57cec5SDimitry Andric  "template template parameter requires 'class' after the parameter list">;
6950b57cec5SDimitry Andricdef ext_template_template_param_typename : ExtWarn<
6960b57cec5SDimitry Andric  "template template parameter using 'typename' is a C++17 extension">,
6970b57cec5SDimitry Andric  InGroup<CXX17>;
6980b57cec5SDimitry Andricdef warn_cxx14_compat_template_template_param_typename : Warning<
6990b57cec5SDimitry Andric  "template template parameter using 'typename' is "
7000b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
7010b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
7020b57cec5SDimitry Andricdef err_template_spec_syntax_non_template : Error<
7030b57cec5SDimitry Andric  "identifier followed by '<' indicates a class template specialization but "
7040b57cec5SDimitry Andric  "%0 %select{does not refer to a template|refers to a function template|"
7050b57cec5SDimitry Andric  "<unused>|refers to a variable template|<unused>|refers to a concept}1">;
7060b57cec5SDimitry Andricdef err_id_after_template_in_nested_name_spec : Error<
7070b57cec5SDimitry Andric  "expected template name after 'template' keyword in nested name specifier">;
7080b57cec5SDimitry Andricdef err_unexpected_template_in_unqualified_id : Error<
7090b57cec5SDimitry Andric  "'template' keyword not permitted here">;
7100b57cec5SDimitry Andricdef err_unexpected_template_after_using : Error<
7110b57cec5SDimitry Andric  "'template' keyword not permitted after 'using' keyword">;
7120b57cec5SDimitry Andricdef err_two_right_angle_brackets_need_space : Error<
7130b57cec5SDimitry Andric  "a space is required between consecutive right angle brackets (use '> >')">;
7140b57cec5SDimitry Andricdef err_right_angle_bracket_equal_needs_space : Error<
7150b57cec5SDimitry Andric  "a space is required between a right angle bracket and an equals sign "
7160b57cec5SDimitry Andric  "(use '> =')">;
7170b57cec5SDimitry Andricdef warn_cxx11_right_shift_in_template_arg : Warning<
7180b57cec5SDimitry Andric  "use of right-shift operator ('>>') in template argument will require "
7190b57cec5SDimitry Andric  "parentheses in C++11">, InGroup<CXX11Compat>;
7200b57cec5SDimitry Andricdef warn_cxx98_compat_two_right_angle_brackets : Warning<
7210b57cec5SDimitry Andric  "consecutive right angle brackets are incompatible with C++98 (use '> >')">,
7220b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
7230b57cec5SDimitry Andricdef err_templated_invalid_declaration : Error<
7240b57cec5SDimitry Andric  "a static_assert declaration cannot be a template">;
7250b57cec5SDimitry Andricdef err_multiple_template_declarators : Error<
7260b57cec5SDimitry Andric  "%select{|a template declaration|an explicit template specialization|"
7270b57cec5SDimitry Andric  "an explicit template instantiation}0 can "
7280b57cec5SDimitry Andric  "only %select{|declare|declare|instantiate}0 a single entity">;
7290b57cec5SDimitry Andricdef err_explicit_instantiation_with_definition : Error<
7300b57cec5SDimitry Andric  "explicit template instantiation cannot have a definition; if this "
7310b57cec5SDimitry Andric  "definition is meant to be an explicit specialization, add '<>' after the "
7320b57cec5SDimitry Andric  "'template' keyword">;
7330b57cec5SDimitry Andricdef err_template_defn_explicit_instantiation : Error<
7340b57cec5SDimitry Andric  "%select{function|class|variable}0 cannot be defined in an explicit instantiation; if this "
7350b57cec5SDimitry Andric  "declaration is meant to be a %select{function|class|variable}0 definition, remove the 'template' keyword">;
7360b57cec5SDimitry Andricdef err_friend_explicit_instantiation : Error<
7370b57cec5SDimitry Andric  "friend cannot be declared in an explicit instantiation; if this "
7380b57cec5SDimitry Andric  "declaration is meant to be a friend declaration, remove the 'template' keyword">;
7390b57cec5SDimitry Andricdef err_explicit_instantiation_enum : Error<
7400b57cec5SDimitry Andric  "enumerations cannot be explicitly instantiated">;
7410b57cec5SDimitry Andricdef err_expected_template_parameter : Error<"expected template parameter">;
7420b57cec5SDimitry Andric
7430b57cec5SDimitry Andricdef err_missing_dependent_template_keyword : Error<
7440b57cec5SDimitry Andric  "use 'template' keyword to treat '%0' as a dependent template name">;
7450b57cec5SDimitry Andricdef warn_missing_dependent_template_keyword : ExtWarn<
7460b57cec5SDimitry Andric  "use 'template' keyword to treat '%0' as a dependent template name">;
7470b57cec5SDimitry Andric
7480b57cec5SDimitry Andricdef ext_extern_template : Extension<
7490b57cec5SDimitry Andric  "extern templates are a C++11 extension">, InGroup<CXX11>;
7500b57cec5SDimitry Andricdef warn_cxx98_compat_extern_template : Warning<
7510b57cec5SDimitry Andric  "extern templates are incompatible with C++98">,
7520b57cec5SDimitry Andric  InGroup<CXX98CompatPedantic>, DefaultIgnore;
7530b57cec5SDimitry Andricdef warn_static_inline_explicit_inst_ignored : Warning<
7540b57cec5SDimitry Andric  "ignoring '%select{static|inline}0' keyword on explicit template "
7550b57cec5SDimitry Andric  "instantiation">, InGroup<DiagGroup<"static-inline-explicit-instantiation">>;
7560b57cec5SDimitry Andric
7570b57cec5SDimitry Andric// Constructor template diagnostics.
7580b57cec5SDimitry Andricdef err_out_of_line_constructor_template_id : Error<
7590b57cec5SDimitry Andric  "out-of-line constructor for %0 cannot have template arguments">;
7600b57cec5SDimitry Andric
7610b57cec5SDimitry Andricdef err_expected_qualified_after_typename : Error<
7620b57cec5SDimitry Andric  "expected a qualified name after 'typename'">;
7630b57cec5SDimitry Andricdef warn_expected_qualified_after_typename : ExtWarn<
7640b57cec5SDimitry Andric  "expected a qualified name after 'typename'">;
7650b57cec5SDimitry Andric
7660b57cec5SDimitry Andricdef err_typename_refers_to_non_type_template : Error<
7670b57cec5SDimitry Andric  "typename specifier refers to a non-type template">;
7680b57cec5SDimitry Andricdef err_expected_type_name_after_typename : Error<
7690b57cec5SDimitry Andric  "expected an identifier or template-id after '::'">;
7700b57cec5SDimitry Andricdef err_explicit_spec_non_template : Error<
7710b57cec5SDimitry Andric  "explicit %select{specialization|instantiation}0 of "
7720b57cec5SDimitry Andric  "%select{non-|undeclared }3template %1 %2">;
7730b57cec5SDimitry Andric
7740b57cec5SDimitry Andricdef err_default_template_template_parameter_not_template : Error<
7750b57cec5SDimitry Andric  "default template argument for a template template parameter must be a class "
7760b57cec5SDimitry Andric  "template">;
7770b57cec5SDimitry Andric
7780b57cec5SDimitry Andricdef ext_fold_expression : ExtWarn<
7790b57cec5SDimitry Andric  "pack fold expression is a C++17 extension">,
7800b57cec5SDimitry Andric  InGroup<CXX17>;
7810b57cec5SDimitry Andricdef warn_cxx14_compat_fold_expression : Warning<
7820b57cec5SDimitry Andric  "pack fold expression is incompatible with C++ standards before C++17">,
7830b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
7840b57cec5SDimitry Andricdef err_expected_fold_operator : Error<
7850b57cec5SDimitry Andric  "expected a foldable binary operator in fold expression">;
7860b57cec5SDimitry Andricdef err_fold_operator_mismatch : Error<
7870b57cec5SDimitry Andric  "operators in fold expression must be the same">;
7880b57cec5SDimitry Andric
7890b57cec5SDimitry Andricdef err_ctor_init_missing_comma : Error<
7900b57cec5SDimitry Andric  "missing ',' between base or member initializers">;
7910b57cec5SDimitry Andric
7920b57cec5SDimitry Andric// C++ declarations
7930b57cec5SDimitry Andricdef err_friend_decl_defines_type : Error<
7940b57cec5SDimitry Andric  "cannot define a type in a friend declaration">;
7950b57cec5SDimitry Andricdef err_missing_whitespace_digraph : Error<
7960b57cec5SDimitry Andric  "found '<::' after a "
7970b57cec5SDimitry Andric  "%select{template name|const_cast|dynamic_cast|reinterpret_cast|static_cast}0"
7980b57cec5SDimitry Andric  " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">;
7990b57cec5SDimitry Andric
8000b57cec5SDimitry Andricdef ext_defaulted_deleted_function : ExtWarn<
8010b57cec5SDimitry Andric  "%select{defaulted|deleted}0 function definitions are a C++11 extension">,
8020b57cec5SDimitry Andric  InGroup<CXX11>;
8030b57cec5SDimitry Andricdef warn_cxx98_compat_defaulted_deleted_function : Warning<
8040b57cec5SDimitry Andric  "%select{defaulted|deleted}0 function definitions are incompatible with C++98">,
8050b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8060b57cec5SDimitry Andric
8070b57cec5SDimitry Andric// C++11 in-class member initialization
8080b57cec5SDimitry Andricdef ext_nonstatic_member_init : ExtWarn<
8090b57cec5SDimitry Andric  "in-class initialization of non-static data member is a C++11 extension">,
8100b57cec5SDimitry Andric  InGroup<CXX11>;
8110b57cec5SDimitry Andricdef warn_cxx98_compat_nonstatic_member_init : Warning<
8120b57cec5SDimitry Andric  "in-class initialization of non-static data members is incompatible with C++98">,
8130b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8140b57cec5SDimitry Andricdef ext_bitfield_member_init: ExtWarn<
8150b57cec5SDimitry Andric  "default member initializer for bit-field is a C++2a extension">,
8160b57cec5SDimitry Andric  InGroup<CXX2a>;
8170b57cec5SDimitry Andricdef warn_cxx17_compat_bitfield_member_init: Warning<
8180b57cec5SDimitry Andric  "default member initializer for bit-field is incompatible with "
8190b57cec5SDimitry Andric  "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore;
8200b57cec5SDimitry Andricdef err_incomplete_array_member_init: Error<
8210b57cec5SDimitry Andric  "array bound cannot be deduced from an in-class initializer">;
8220b57cec5SDimitry Andric
8230b57cec5SDimitry Andric// C++11 alias-declaration
8240b57cec5SDimitry Andricdef ext_alias_declaration : ExtWarn<
8250b57cec5SDimitry Andric  "alias declarations are a C++11 extension">, InGroup<CXX11>;
8260b57cec5SDimitry Andricdef warn_cxx98_compat_alias_declaration : Warning<
8270b57cec5SDimitry Andric  "alias declarations are incompatible with C++98">,
8280b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8290b57cec5SDimitry Andricdef err_alias_declaration_not_identifier : Error<
8300b57cec5SDimitry Andric  "name defined in alias declaration must be an identifier">;
8310b57cec5SDimitry Andricdef err_alias_declaration_specialization : Error<
8320b57cec5SDimitry Andric  "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">;
8330b57cec5SDimitry Andricdef err_alias_declaration_pack_expansion : Error<
8340b57cec5SDimitry Andric  "alias declaration cannot be a pack expansion">;
8350b57cec5SDimitry Andric
8360b57cec5SDimitry Andric// C++17 using-declaration pack expansions
8370b57cec5SDimitry Andricdef ext_multi_using_declaration : ExtWarn<
8380b57cec5SDimitry Andric  "use of multiple declarators in a single using declaration is "
8390b57cec5SDimitry Andric  "a C++17 extension">, InGroup<CXX17>;
8400b57cec5SDimitry Andricdef warn_cxx17_compat_multi_using_declaration : Warning<
8410b57cec5SDimitry Andric  "use of multiple declarators in a single using declaration is "
8420b57cec5SDimitry Andric  "incompatible with C++ standards before C++17">,
8430b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
8440b57cec5SDimitry Andricdef ext_using_declaration_pack : ExtWarn<
8450b57cec5SDimitry Andric  "pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>;
8460b57cec5SDimitry Andricdef warn_cxx17_compat_using_declaration_pack : Warning<
8470b57cec5SDimitry Andric  "pack expansion using declaration is incompatible with C++ standards "
8480b57cec5SDimitry Andric  "before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore;
8490b57cec5SDimitry Andric
8500b57cec5SDimitry Andric// C++11 override control
8510b57cec5SDimitry Andricdef ext_override_control_keyword : ExtWarn<
8520b57cec5SDimitry Andric  "'%0' keyword is a C++11 extension">, InGroup<CXX11>;
8530b57cec5SDimitry Andricdef warn_cxx98_compat_override_control_keyword : Warning<
8540b57cec5SDimitry Andric  "'%0' keyword is incompatible with C++98">,
8550b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8560b57cec5SDimitry Andricdef err_override_control_interface : Error<
8570b57cec5SDimitry Andric  "'%0' keyword not permitted with interface types">;
8580b57cec5SDimitry Andricdef ext_ms_sealed_keyword : ExtWarn<
8590b57cec5SDimitry Andric  "'sealed' keyword is a Microsoft extension">,
8600b57cec5SDimitry Andric  InGroup<MicrosoftSealed>;
8610b57cec5SDimitry Andric
8620b57cec5SDimitry Andricdef err_access_specifier_interface : Error<
8630b57cec5SDimitry Andric  "interface types cannot specify '%select{private|protected}0' access">;
8640b57cec5SDimitry Andric
8650b57cec5SDimitry Andricdef err_duplicate_virt_specifier : Error<
8660b57cec5SDimitry Andric  "class member already marked '%0'">;
8670b57cec5SDimitry Andric
8680b57cec5SDimitry Andricdef err_scoped_enum_missing_identifier : Error<
8690b57cec5SDimitry Andric  "scoped enumeration requires a name">;
8700b57cec5SDimitry Andricdef ext_scoped_enum : ExtWarn<
8710b57cec5SDimitry Andric  "scoped enumerations are a C++11 extension">, InGroup<CXX11>;
8720b57cec5SDimitry Andricdef warn_cxx98_compat_scoped_enum : Warning<
8730b57cec5SDimitry Andric  "scoped enumerations are incompatible with C++98">,
8740b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8750b57cec5SDimitry Andric
8760b57cec5SDimitry Andricdef err_expected_parameter_pack : Error<
8770b57cec5SDimitry Andric  "expected the name of a parameter pack">;
8780b57cec5SDimitry Andricdef err_paren_sizeof_parameter_pack : Error<
8790b57cec5SDimitry Andric  "missing parentheses around the size of parameter pack %0">;
8800b57cec5SDimitry Andricdef err_sizeof_parameter_pack : Error<
8810b57cec5SDimitry Andric  "expected parenthesized parameter pack name in 'sizeof...' expression">;
8820b57cec5SDimitry Andric
8830b57cec5SDimitry Andric// C++11 lambda expressions
8840b57cec5SDimitry Andricdef err_expected_comma_or_rsquare : Error<
8850b57cec5SDimitry Andric  "expected ',' or ']' in lambda capture list">;
8860b57cec5SDimitry Andricdef err_this_captured_by_reference : Error<
8870b57cec5SDimitry Andric  "'this' cannot be captured by reference">;
8880b57cec5SDimitry Andricdef err_expected_capture : Error<
8890b57cec5SDimitry Andric  "expected variable name or 'this' in lambda capture list">;
8900b57cec5SDimitry Andricdef err_expected_lambda_body : Error<"expected body of lambda expression">;
8910b57cec5SDimitry Andricdef warn_cxx98_compat_lambda : Warning<
8920b57cec5SDimitry Andric  "lambda expressions are incompatible with C++98">,
8930b57cec5SDimitry Andric  InGroup<CXX98Compat>, DefaultIgnore;
8940b57cec5SDimitry Andricdef err_lambda_missing_parens : Error<
8950b57cec5SDimitry Andric  "lambda requires '()' before %select{'mutable'|return type|"
896480093f4SDimitry Andric  "attribute specifier|'constexpr'|'consteval'|'requires' clause}0">;
8970b57cec5SDimitry Andricdef err_lambda_decl_specifier_repeated : Error<
8980b57cec5SDimitry Andric  "%select{'mutable'|'constexpr'|'consteval'}0 cannot appear multiple times in a lambda declarator">;
8990b57cec5SDimitry Andricdef err_lambda_capture_misplaced_ellipsis : Error<
9000b57cec5SDimitry Andric  "ellipsis in pack %select{|init-}0capture must appear %select{after|before}0 "
9010b57cec5SDimitry Andric  "the name of the capture">;
9020b57cec5SDimitry Andricdef err_lambda_capture_multiple_ellipses : Error<
9030b57cec5SDimitry Andric  "multiple ellipses in pack capture">;
9040b57cec5SDimitry Andric// C++17 lambda expressions
9050b57cec5SDimitry Andricdef err_expected_star_this_capture : Error<
9060b57cec5SDimitry Andric  "expected 'this' following '*' in lambda capture list">;
9070b57cec5SDimitry Andric
9080b57cec5SDimitry Andric// C++17 constexpr lambda expressions
9090b57cec5SDimitry Andricdef warn_cxx14_compat_constexpr_on_lambda : Warning<
9100b57cec5SDimitry Andric  "constexpr on lambda expressions is incompatible with C++ standards before C++17">,
9110b57cec5SDimitry Andric  InGroup<CXXPre17Compat>, DefaultIgnore;
9120b57cec5SDimitry Andricdef ext_constexpr_on_lambda_cxx17 : ExtWarn<
9130b57cec5SDimitry Andric  "'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>;
9140b57cec5SDimitry Andric
9150b57cec5SDimitry Andric// C++2a template lambdas
9160b57cec5SDimitry Andricdef ext_lambda_template_parameter_list: ExtWarn<
9170b57cec5SDimitry Andric  "explicit template parameter list for lambdas is a C++2a extension">,
9180b57cec5SDimitry Andric  InGroup<CXX2a>;
9190b57cec5SDimitry Andricdef warn_cxx17_compat_lambda_template_parameter_list: Warning<
9200b57cec5SDimitry Andric  "explicit template parameter list for lambdas is incompatible with "
9210b57cec5SDimitry Andric  "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore;
9220b57cec5SDimitry Andricdef err_lambda_template_parameter_list_empty : Error<
9230b57cec5SDimitry Andric  "lambda template parameter list cannot be empty">;
9240b57cec5SDimitry Andric
9250b57cec5SDimitry Andric// Availability attribute
9260b57cec5SDimitry Andricdef err_expected_version : Error<
9270b57cec5SDimitry Andric  "expected a version of the form 'major[.minor[.subminor]]'">;
9280b57cec5SDimitry Andricdef warn_expected_consistent_version_separator : Warning<
9290b57cec5SDimitry Andric  "use same version number separators '_' or '.'; as in "
9300b57cec5SDimitry Andric  "'major[.minor[.subminor]]'">, InGroup<Availability>;
9310b57cec5SDimitry Andricdef err_zero_version : Error<
9320b57cec5SDimitry Andric  "version number must have non-zero major, minor, or sub-minor version">;
9330b57cec5SDimitry Andricdef err_availability_expected_platform : Error<
9340b57cec5SDimitry Andric  "expected a platform name, e.g., 'macos'">;
9350b57cec5SDimitry Andric
9360b57cec5SDimitry Andric// objc_bridge_related attribute
9370b57cec5SDimitry Andricdef err_objcbridge_related_expected_related_class : Error<
9380b57cec5SDimitry Andric  "expected a related ObjectiveC class name, e.g., 'NSColor'">;
9390b57cec5SDimitry Andricdef err_objcbridge_related_selector_name : Error<
9400b57cec5SDimitry Andric  "expected a class method selector with single argument, e.g., 'colorWithCGColor:'">;
9410b57cec5SDimitry Andric
9420b57cec5SDimitry Andricdef err_availability_expected_change : Error<
9430b57cec5SDimitry Andric  "expected 'introduced', 'deprecated', or 'obsoleted'">;
9440b57cec5SDimitry Andricdef err_availability_unknown_change : Error<
9450b57cec5SDimitry Andric  "%0 is not an availability stage; use 'introduced', 'deprecated', or "
9460b57cec5SDimitry Andric  "'obsoleted'">;
9470b57cec5SDimitry Andricdef err_availability_redundant : Error<
9480b57cec5SDimitry Andric  "redundant %0 availability change; only the last specified change will "
9490b57cec5SDimitry Andric  "be used">;
9500b57cec5SDimitry Andricdef warn_availability_and_unavailable : Warning<
9510b57cec5SDimitry Andric  "'unavailable' availability overrides all other availability information">,
9520b57cec5SDimitry Andric  InGroup<Availability>;
9530b57cec5SDimitry Andric
9540b57cec5SDimitry Andric// @available(...)
9550b57cec5SDimitry Andricdef err_avail_query_expected_platform_name : Error<
9560b57cec5SDimitry Andric  "expected a platform name here">;
9570b57cec5SDimitry Andric
9580b57cec5SDimitry Andricdef err_avail_query_unrecognized_platform_name : Error<
9590b57cec5SDimitry Andric  "unrecognized platform name %0">;
9600b57cec5SDimitry Andricdef err_availability_query_wildcard_required: Error<
9610b57cec5SDimitry Andric  "must handle potential future platforms with '*'">;
9620b57cec5SDimitry Andricdef err_availability_query_repeated_platform: Error<
9630b57cec5SDimitry Andric  "version for '%0' already specified">;
9640b57cec5SDimitry Andricdef err_availability_query_repeated_star : Error<
9650b57cec5SDimitry Andric  "'*' query has already been specified">;
9660b57cec5SDimitry Andric
9670b57cec5SDimitry Andric// External source symbol attribute
9680b57cec5SDimitry Andricdef err_external_source_symbol_expected_keyword : Error<
9690b57cec5SDimitry Andric  "expected 'language', 'defined_in', or 'generated_declaration'">;
9700b57cec5SDimitry Andricdef err_external_source_symbol_duplicate_clause : Error<
9710b57cec5SDimitry Andric  "duplicate %0 clause in an 'external_source_symbol' attribute">;
9720b57cec5SDimitry Andric
9730b57cec5SDimitry Andric// Type safety attributes
9740b57cec5SDimitry Andricdef err_type_safety_unknown_flag : Error<
9750b57cec5SDimitry Andric  "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">;
9760b57cec5SDimitry Andric
9770b57cec5SDimitry Andric// Type traits
9780b57cec5SDimitry Andricdef err_type_trait_arity : Error<
9790b57cec5SDimitry Andric  "type trait requires %0%select{| or more}1 argument%select{|s}2; have "
9800b57cec5SDimitry Andric  "%3 argument%s3">;
9810b57cec5SDimitry Andric
9820b57cec5SDimitry Andric// Language specific pragmas
9830b57cec5SDimitry Andric// - Generic warnings
9840b57cec5SDimitry Andricdef warn_pragma_expected_lparen : Warning<
9850b57cec5SDimitry Andric  "missing '(' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
9860b57cec5SDimitry Andricdef warn_pragma_expected_rparen : Warning<
9870b57cec5SDimitry Andric  "missing ')' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
9880b57cec5SDimitry Andricdef warn_pragma_expected_identifier : Warning<
9890b57cec5SDimitry Andric  "expected identifier in '#pragma %0' - ignored">, InGroup<IgnoredPragmas>;
9900b57cec5SDimitry Andricdef warn_pragma_expected_string : Warning<
9910b57cec5SDimitry Andric  "expected string literal in '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
9920b57cec5SDimitry Andricdef warn_pragma_missing_argument : Warning<
9930b57cec5SDimitry Andric  "missing argument to '#pragma %0'%select{|; expected %2}1">, InGroup<IgnoredPragmas>;
9940b57cec5SDimitry Andricdef warn_pragma_invalid_argument : Warning<
9950b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma %1'%select{|; expected %3}2">, InGroup<IgnoredPragmas>;
9960b57cec5SDimitry Andric
997a7dea167SDimitry Andricdef err_pragma_misplaced_in_decl : Error<"this pragma cannot appear in %0 declaration">;
998a7dea167SDimitry Andric
9990b57cec5SDimitry Andric// '#pragma clang section' related errors
10000b57cec5SDimitry Andricdef err_pragma_expected_clang_section_name : Error<
1001a7dea167SDimitry Andric  "expected one of [bss|data|rodata|text|relro] section kind in '#pragma %0'">;
10020b57cec5SDimitry Andricdef err_pragma_clang_section_expected_equal : Error<
1003a7dea167SDimitry Andric  "expected '=' following '#pragma clang section %select{invalid|bss|data|rodata|text|relro}0'">;
10040b57cec5SDimitry Andricdef warn_pragma_expected_section_name : Warning<
10050b57cec5SDimitry Andric  "expected a string literal for the section name in '#pragma %0' - ignored">,
10060b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10070b57cec5SDimitry Andric
10080b57cec5SDimitry Andricdef warn_pragma_expected_section_push_pop_or_name : Warning<
10090b57cec5SDimitry Andric  "expected push, pop or a string literal for the section name in '#pragma %0' - ignored">,
10100b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10110b57cec5SDimitry Andricdef warn_pragma_expected_section_label_or_name : Warning<
10120b57cec5SDimitry Andric  "expected a stack label or a string literal for the section name in '#pragma %0' - ignored">,
10130b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10140b57cec5SDimitry Andricdef warn_pragma_expected_init_seg : Warning<
10150b57cec5SDimitry Andric  "expected 'compiler', 'lib', 'user', or a string literal for the section name in '#pragma %0' - ignored">,
10160b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10170b57cec5SDimitry Andricdef warn_pragma_expected_integer : Warning<
10180b57cec5SDimitry Andric  "expected integer between %0 and %1 inclusive in '#pragma %2' - ignored">,
10190b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10200b57cec5SDimitry Andricdef warn_pragma_ms_struct : Warning<
10210b57cec5SDimitry Andric  "incorrect use of '#pragma ms_struct on|off' - ignored">,
10220b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10230b57cec5SDimitry Andricdef warn_pragma_extra_tokens_at_eol : Warning<
10240b57cec5SDimitry Andric  "extra tokens at end of '#pragma %0' - ignored">,
10250b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10260b57cec5SDimitry Andricdef warn_pragma_expected_comma : Warning<
10270b57cec5SDimitry Andric  "expected ',' in '#pragma %0'">, InGroup<IgnoredPragmas>;
10280b57cec5SDimitry Andricdef warn_pragma_expected_punc : Warning<
10290b57cec5SDimitry Andric  "expected ')' or ',' in '#pragma %0'">, InGroup<IgnoredPragmas>;
10300b57cec5SDimitry Andricdef warn_pragma_expected_non_wide_string : Warning<
10310b57cec5SDimitry Andric  "expected non-wide string literal in '#pragma %0'">, InGroup<IgnoredPragmas>;
10320b57cec5SDimitry Andric// - Generic errors
10330b57cec5SDimitry Andricdef err_pragma_missing_argument : Error<
10340b57cec5SDimitry Andric  "missing argument to '#pragma %0'%select{|; expected %2}1">;
10350b57cec5SDimitry Andric// - #pragma options
10360b57cec5SDimitry Andricdef warn_pragma_options_expected_align : Warning<
10370b57cec5SDimitry Andric  "expected 'align' following '#pragma options' - ignored">,
10380b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10390b57cec5SDimitry Andricdef warn_pragma_align_expected_equal : Warning<
10400b57cec5SDimitry Andric  "expected '=' following '#pragma %select{align|options align}0' - ignored">,
10410b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10420b57cec5SDimitry Andricdef warn_pragma_align_invalid_option : Warning<
10430b57cec5SDimitry Andric  "invalid alignment option in '#pragma %select{align|options align}0' - ignored">,
10440b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10450b57cec5SDimitry Andric// - #pragma pack
10460b57cec5SDimitry Andricdef warn_pragma_unsupported_action : Warning<
10470b57cec5SDimitry Andric  "known but unsupported action '%1' for '#pragma %0' - ignored">,
10480b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10490b57cec5SDimitry Andricdef warn_pragma_invalid_specific_action : Warning<
10500b57cec5SDimitry Andric  "unknown action '%1' for '#pragma %0' - ignored">,
10510b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10520b57cec5SDimitry Andricdef warn_pragma_expected_action_or_r_paren : Warning<
10530b57cec5SDimitry Andric  "expected action or ')' in '#pragma %0' - ignored">,
10540b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10550b57cec5SDimitry Andricdef warn_pragma_invalid_action : Warning<
10560b57cec5SDimitry Andric  "unknown action for '#pragma %0' - ignored">,
10570b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10580b57cec5SDimitry Andricdef warn_pragma_pack_malformed : Warning<
10590b57cec5SDimitry Andric  "expected integer or identifier in '#pragma pack' - ignored">,
10600b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10610b57cec5SDimitry Andric// - #pragma intrinsic
10620b57cec5SDimitry Andricdef warn_pragma_intrinsic_builtin : Warning<
10630b57cec5SDimitry Andric  "%0 is not a recognized builtin%select{|; consider including <intrin.h> to access non-builtin intrinsics}1">,
10640b57cec5SDimitry Andric  InGroup<IgnoredPragmaIntrinsic>;
10650b57cec5SDimitry Andric// - #pragma optimize
10660b57cec5SDimitry Andricdef warn_pragma_optimize : Warning<
10670b57cec5SDimitry Andric  "'#pragma optimize' is not supported">,
10680b57cec5SDimitry Andric  InGroup<IgnoredPragmaOptimize>;
10690b57cec5SDimitry Andric// - #pragma unused
10700b57cec5SDimitry Andricdef warn_pragma_unused_expected_var : Warning<
10710b57cec5SDimitry Andric  "expected '#pragma unused' argument to be a variable name">,
10720b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10730b57cec5SDimitry Andric// - #pragma init_seg
10740b57cec5SDimitry Andricdef warn_pragma_init_seg_unsupported_target : Warning<
10750b57cec5SDimitry Andric  "'#pragma init_seg' is only supported when targeting a "
10760b57cec5SDimitry Andric  "Microsoft environment">,
10770b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10780b57cec5SDimitry Andric// - #pragma fp_contract
10790b57cec5SDimitry Andricdef err_pragma_fp_contract_scope : Error<
10800b57cec5SDimitry Andric  "'#pragma fp_contract' can only appear at file scope or at the start of a "
10810b57cec5SDimitry Andric  "compound statement">;
10820b57cec5SDimitry Andric// - #pragma stdc unknown
10830b57cec5SDimitry Andricdef ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">,
10840b57cec5SDimitry Andric   InGroup<UnknownPragmas>;
10850b57cec5SDimitry Andricdef warn_stdc_fenv_access_not_supported :
10860b57cec5SDimitry Andric   Warning<"pragma STDC FENV_ACCESS ON is not supported, ignoring pragma">,
10870b57cec5SDimitry Andric   InGroup<UnknownPragmas>;
10880b57cec5SDimitry Andric// - #pragma comment
10890b57cec5SDimitry Andricdef err_pragma_comment_malformed : Error<
10900b57cec5SDimitry Andric  "pragma comment requires parenthesized identifier and optional string">;
10910b57cec5SDimitry Andricdef err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
10920b57cec5SDimitry Andric// PS4 recognizes only #pragma comment(lib)
10930b57cec5SDimitry Andricdef warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
10940b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
10950b57cec5SDimitry Andric// - #pragma detect_mismatch
10960b57cec5SDimitry Andricdef err_pragma_detect_mismatch_malformed : Error<
10970b57cec5SDimitry Andric  "pragma detect_mismatch is malformed; it requires two comma-separated "
10980b57cec5SDimitry Andric  "string literals">;
10990b57cec5SDimitry Andric// - #pragma pointers_to_members
11000b57cec5SDimitry Andricdef err_pragma_pointers_to_members_unknown_kind : Error<
11010b57cec5SDimitry Andric  "unexpected %0, expected to see one of %select{|'best_case', 'full_generality', }1"
11020b57cec5SDimitry Andric  "'single_inheritance', 'multiple_inheritance', or 'virtual_inheritance'">;
11030b57cec5SDimitry Andric// - #pragma clang optimize on/off
11040b57cec5SDimitry Andricdef err_pragma_optimize_invalid_argument : Error<
11050b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma clang optimize'; "
11060b57cec5SDimitry Andric  "expected 'on' or 'off'">;
11070b57cec5SDimitry Andricdef err_pragma_optimize_extra_argument : Error<
11080b57cec5SDimitry Andric  "unexpected extra argument '%0' to '#pragma clang optimize'">;
11090b57cec5SDimitry Andric// - #pragma clang attribute
11100b57cec5SDimitry Andricdef err_pragma_attribute_expected_push_pop_paren : Error<
11110b57cec5SDimitry Andric  "expected 'push', 'pop', or '(' after '#pragma clang attribute'">;
11120b57cec5SDimitry Andricdef err_pragma_attribute_invalid_argument : Error<
11130b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma clang attribute'; "
11140b57cec5SDimitry Andric  "expected 'push' or 'pop'">;
11150b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute : Error<
11160b57cec5SDimitry Andric  "expected an attribute after '('">;
11170b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_name : Error<
11180b57cec5SDimitry Andric  "expected identifier that represents an attribute name">;
11190b57cec5SDimitry Andricdef err_pragma_attribute_extra_tokens_after_attribute : Error<
11200b57cec5SDimitry Andric  "extra tokens after attribute in a '#pragma clang attribute push'">;
11210b57cec5SDimitry Andricdef err_pragma_attribute_unsupported_attribute : Error<
11220b57cec5SDimitry Andric  "attribute %0 is not supported by '#pragma clang attribute'">;
11230b57cec5SDimitry Andricdef err_pragma_attribute_multiple_attributes : Error<
11240b57cec5SDimitry Andric  "more than one attribute specified in '#pragma clang attribute push'">;
11250b57cec5SDimitry Andricdef err_pragma_attribute_expected_attribute_syntax : Error<
11260b57cec5SDimitry Andric  "expected an attribute that is specified using the GNU, C++11 or '__declspec'"
11270b57cec5SDimitry Andric  " syntax">;
11280b57cec5SDimitry Andricdef note_pragma_attribute_use_attribute_kw : Note<"use the GNU '__attribute__' "
11290b57cec5SDimitry Andric  "syntax">;
11300b57cec5SDimitry Andricdef err_pragma_attribute_invalid_subject_set_specifier : Error<
11310b57cec5SDimitry Andric  "expected attribute subject set specifier 'apply_to'">;
11320b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_identifier : Error<
11330b57cec5SDimitry Andric  "expected an identifier that corresponds to an attribute subject rule">;
11340b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_rule : Error<
11350b57cec5SDimitry Andric  "unknown attribute subject rule '%0'">;
11360b57cec5SDimitry Andricdef err_pragma_attribute_expected_subject_sub_identifier : Error<
11370b57cec5SDimitry Andric  "expected an identifier that corresponds to an attribute subject matcher "
11380b57cec5SDimitry Andric  "sub-rule; '%0' matcher %select{does not support sub-rules|supports the "
11390b57cec5SDimitry Andric  "following sub-rules: %2|}1">;
11400b57cec5SDimitry Andricdef err_pragma_attribute_unknown_subject_sub_rule : Error<
11410b57cec5SDimitry Andric  "%select{invalid use of|unknown}2 attribute subject matcher sub-rule '%0'; "
11420b57cec5SDimitry Andric  "'%1' matcher %select{does not support sub-rules|supports the following "
11430b57cec5SDimitry Andric  "sub-rules: %3}2">;
11440b57cec5SDimitry Andricdef err_pragma_attribute_duplicate_subject : Error<
11450b57cec5SDimitry Andric  "duplicate attribute subject matcher '%0'">;
11460b57cec5SDimitry Andricdef err_pragma_attribute_expected_period : Error<
11470b57cec5SDimitry Andric  "expected '.' after pragma attribute namespace %0">;
11480b57cec5SDimitry Andricdef err_pragma_attribute_namespace_on_attribute : Error<
11490b57cec5SDimitry Andric  "namespace can only apply to 'push' or 'pop' directives">;
11500b57cec5SDimitry Andricdef note_pragma_attribute_namespace_on_attribute : Note<
11510b57cec5SDimitry Andric  "omit the namespace to add attributes to the most-recently"
11520b57cec5SDimitry Andric  " pushed attribute group">;
11530b57cec5SDimitry Andric
11540b57cec5SDimitry Andricdef err_opencl_unroll_hint_on_non_loop : Error<
11550b57cec5SDimitry Andric  "OpenCL only supports 'opencl_unroll_hint' attribute on for, while, and do statements">;
11560b57cec5SDimitry Andric
11570b57cec5SDimitry Andric// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
11580b57cec5SDimitry Andricdef warn_pragma_expected_colon : Warning<
11590b57cec5SDimitry Andric  "missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>;
11600b57cec5SDimitry Andricdef warn_pragma_expected_predicate : Warning<
11610b57cec5SDimitry Andric  "expected %select{'enable', 'disable', 'begin' or 'end'|'disable'}0 - ignoring">, InGroup<IgnoredPragmas>;
11620b57cec5SDimitry Andricdef warn_pragma_begin_end_mismatch : Warning<
11630b57cec5SDimitry Andric  "OpenCL extension end directive mismatches begin directive - ignoring">, InGroup<IgnoredPragmas>;
11640b57cec5SDimitry Andricdef warn_pragma_unknown_extension : Warning<
11650b57cec5SDimitry Andric  "unknown OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
11660b57cec5SDimitry Andricdef warn_pragma_unsupported_extension : Warning<
11670b57cec5SDimitry Andric  "unsupported OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
11680b57cec5SDimitry Andricdef warn_pragma_extension_is_core : Warning<
11690b57cec5SDimitry Andric  "OpenCL extension %0 is core feature or supported optional core feature - ignoring">, InGroup<DiagGroup<"pedantic-core-features">>, DefaultIgnore;
11700b57cec5SDimitry Andric
11710b57cec5SDimitry Andric// OpenCL errors.
11720b57cec5SDimitry Andricdef err_opencl_taking_function_address_parser : Error<
11730b57cec5SDimitry Andric  "taking address of function is not allowed">;
11740b57cec5SDimitry Andricdef err_opencl_logical_exclusive_or : Error<
11750b57cec5SDimitry Andric  "^^ is a reserved operator in OpenCL">;
11760b57cec5SDimitry Andric
11770b57cec5SDimitry Andric// C++ for OpenCL.
11780b57cec5SDimitry Andricdef err_openclcxx_virtual_function : Error<
11790b57cec5SDimitry Andric  "virtual functions are not supported in C++ for OpenCL">;
11800b57cec5SDimitry Andric
11810b57cec5SDimitry Andric// OpenMP support.
11820b57cec5SDimitry Andricdef warn_pragma_omp_ignored : Warning<
11830b57cec5SDimitry Andric  "unexpected '#pragma omp ...' in program">, InGroup<SourceUsesOpenMP>, DefaultIgnore;
11840b57cec5SDimitry Andricdef warn_omp_extra_tokens_at_eol : Warning<
11850b57cec5SDimitry Andric  "extra tokens at the end of '#pragma omp %0' are ignored">,
11860b57cec5SDimitry Andric  InGroup<ExtraTokens>;
11870b57cec5SDimitry Andricdef warn_pragma_expected_colon_r_paren : Warning<
11880b57cec5SDimitry Andric  "missing ':' or ')' after %0 - ignoring">, InGroup<IgnoredPragmas>;
11890b57cec5SDimitry Andricdef err_omp_unknown_directive : Error<
11900b57cec5SDimitry Andric  "expected an OpenMP directive">;
11910b57cec5SDimitry Andricdef err_omp_unexpected_directive : Error<
11920b57cec5SDimitry Andric  "unexpected OpenMP directive %select{|'#pragma omp %1'}0">;
11930b57cec5SDimitry Andricdef err_omp_expected_punc : Error<
11940b57cec5SDimitry Andric  "expected ',' or ')' in '%0' %select{clause|directive}1">;
11950b57cec5SDimitry Andricdef err_omp_unexpected_clause : Error<
11960b57cec5SDimitry Andric  "unexpected OpenMP clause '%0' in directive '#pragma omp %1'">;
11970b57cec5SDimitry Andricdef err_omp_immediate_directive : Error<
11980b57cec5SDimitry Andric  "'#pragma omp %0' %select{|with '%2' clause }1cannot be an immediate substatement">;
11990b57cec5SDimitry Andricdef err_omp_expected_identifier_for_critical : Error<
12000b57cec5SDimitry Andric  "expected identifier specifying the name of the 'omp critical' directive">;
12010b57cec5SDimitry Andricdef err_omp_expected_reduction_identifier : Error<
12020b57cec5SDimitry Andric  "expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">;
1203a7dea167SDimitry Andricdef err_omp_decl_in_declare_simd_variant : Error<
1204a7dea167SDimitry Andric  "function declaration is expected after 'declare %select{simd|variant}0' directive">;
12050b57cec5SDimitry Andricdef err_omp_unknown_map_type : Error<
12060b57cec5SDimitry Andric  "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
12070b57cec5SDimitry Andricdef err_omp_unknown_map_type_modifier : Error<
12080b57cec5SDimitry Andric  "incorrect map type modifier, expected 'always', 'close', or 'mapper'">;
12090b57cec5SDimitry Andricdef err_omp_map_type_missing : Error<
12100b57cec5SDimitry Andric  "missing map type">;
12110b57cec5SDimitry Andricdef err_omp_map_type_modifier_missing : Error<
12120b57cec5SDimitry Andric  "missing map type modifier">;
12130b57cec5SDimitry Andricdef err_omp_declare_simd_inbranch_notinbranch : Error<
12140b57cec5SDimitry Andric  "unexpected '%0' clause, '%1' is specified already">;
12150b57cec5SDimitry Andricdef err_expected_end_declare_target : Error<
12160b57cec5SDimitry Andric  "expected '#pragma omp end declare target'">;
12170b57cec5SDimitry Andricdef err_omp_declare_target_unexpected_clause: Error<
1218a7dea167SDimitry Andric  "unexpected '%0' clause, only %select{'to' or 'link'|'to', 'link' or 'device_type'}1 clauses expected">;
12190b57cec5SDimitry Andricdef err_omp_expected_clause: Error<
12200b57cec5SDimitry Andric  "expected at least one clause on '#pragma omp %0' directive">;
12210b57cec5SDimitry Andricdef err_omp_mapper_illegal_identifier : Error<
12220b57cec5SDimitry Andric  "illegal OpenMP user-defined mapper identifier">;
12230b57cec5SDimitry Andricdef err_omp_mapper_expected_declarator : Error<
12240b57cec5SDimitry Andric  "expected declarator on 'omp declare mapper' directive">;
1225a7dea167SDimitry Andricdef err_omp_declare_variant_wrong_clause : Error<
1226a7dea167SDimitry Andric  "expected '%0' clause on 'omp declare variant' directive">;
1227a7dea167SDimitry Andricdef err_omp_declare_variant_no_ctx_selector : Error<
1228a7dea167SDimitry Andric  "expected context selector in '%0' clause on 'omp declare variant' directive">;
1229a7dea167SDimitry Andricdef err_omp_declare_variant_equal_expected : Error<
1230a7dea167SDimitry Andric  "expected '=' after '%0' context selector set name on 'omp declare variant' directive">;
1231a7dea167SDimitry Andricdef warn_omp_declare_variant_cs_name_expected : Warning<
1232a7dea167SDimitry Andric  "unknown context selector in '%0' context selector set of 'omp declare variant' directive, ignored">,
1233a7dea167SDimitry Andric  InGroup<OpenMPClauses>;
1234a7dea167SDimitry Andricdef err_omp_declare_variant_item_expected : Error<
1235a7dea167SDimitry Andric  "expected %0 in '%1' context selector of '%2' selector set of 'omp declare variant' directive">;
1236a7dea167SDimitry Andricdef err_omp_declare_variant_ctx_set_mutiple_use : Error<
1237a7dea167SDimitry Andric  "context selector set '%0' is used already in the same 'omp declare variant' directive">;
1238a7dea167SDimitry Andricdef note_omp_declare_variant_ctx_set_used_here : Note<
1239a7dea167SDimitry Andric  "previously context selector set '%0' used here">;
1240a7dea167SDimitry Andricdef err_omp_expected_comma_brace : Error<"expected '}' or ',' after '%0'">;
1241a7dea167SDimitry Andricdef err_omp_declare_variant_ctx_mutiple_use : Error<
1242a7dea167SDimitry Andric  "context trait selector '%0' is used already in the same '%1' context selector set of 'omp declare variant' directive">;
1243a7dea167SDimitry Andricdef note_omp_declare_variant_ctx_used_here : Note<
1244a7dea167SDimitry Andric  "previously context trait selector '%0' used here">;
1245a7dea167SDimitry Andricdef warn_omp_more_one_device_type_clause : Warning<
1246a7dea167SDimitry Andric  "more than one 'device_type' clause is specified">,
1247a7dea167SDimitry Andric  InGroup<OpenMPClauses>;
1248480093f4SDimitry Andricdef err_omp_wrong_device_kind_trait : Error<
1249480093f4SDimitry Andric  "unknown '%0' device kind trait in the 'device' context selector set, expected"
1250480093f4SDimitry Andric  " one of 'host', 'nohost', 'cpu', 'gpu' or 'fpga'">;
12510b57cec5SDimitry Andric
12520b57cec5SDimitry Andric// Pragma loop support.
12530b57cec5SDimitry Andricdef err_pragma_loop_missing_argument : Error<
12540b57cec5SDimitry Andric  "missing argument; expected %select{an integer value|"
12550b57cec5SDimitry Andric  "'enable'%select{|, 'full'}1%select{|, 'assume_safety'}2 or 'disable'}0">;
12560b57cec5SDimitry Andricdef err_pragma_loop_invalid_option : Error<
12570b57cec5SDimitry Andric  "%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, "
12580b57cec5SDimitry Andric  "vectorize_width, interleave, interleave_count, unroll, unroll_count, "
1259a7dea167SDimitry Andric  "pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute">;
12600b57cec5SDimitry Andric
12610b57cec5SDimitry Andricdef err_pragma_fp_invalid_option : Error<
12620b57cec5SDimitry Andric  "%select{invalid|missing}0 option%select{ %1|}0; expected contract">;
12630b57cec5SDimitry Andricdef err_pragma_fp_invalid_argument : Error<
12640b57cec5SDimitry Andric  "unexpected argument '%0' to '#pragma clang fp %1'; "
12650b57cec5SDimitry Andric  "expected 'on', 'fast' or 'off'">;
12660b57cec5SDimitry Andricdef err_pragma_fp_scope : Error<
12670b57cec5SDimitry Andric  "'#pragma clang fp' can only appear at file scope or at the start of a "
12680b57cec5SDimitry Andric  "compound statement">;
12690b57cec5SDimitry Andric
12700b57cec5SDimitry Andricdef err_pragma_invalid_keyword : Error<
12710b57cec5SDimitry Andric  "invalid argument; expected 'enable'%select{|, 'full'}0%select{|, 'assume_safety'}1 or 'disable'">;
12720b57cec5SDimitry Andricdef err_pragma_pipeline_invalid_keyword : Error<
12730b57cec5SDimitry Andric    "invalid argument; expected 'disable'">;
12740b57cec5SDimitry Andric
12750b57cec5SDimitry Andric// Pragma unroll support.
12760b57cec5SDimitry Andricdef warn_pragma_unroll_cuda_value_in_parens : Warning<
12770b57cec5SDimitry Andric  "argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
12780b57cec5SDimitry Andric  InGroup<CudaCompat>;
12790b57cec5SDimitry Andric
12800b57cec5SDimitry Andricdef warn_cuda_attr_lambda_position : Warning<
12810b57cec5SDimitry Andric  "nvcc does not allow '__%0__' to appear after '()' in lambdas">,
12820b57cec5SDimitry Andric  InGroup<CudaCompat>;
12830b57cec5SDimitry Andricdef warn_pragma_force_cuda_host_device_bad_arg : Warning<
12840b57cec5SDimitry Andric  "incorrect use of #pragma clang force_cuda_host_device begin|end">,
12850b57cec5SDimitry Andric  InGroup<IgnoredPragmas>;
12860b57cec5SDimitry Andricdef err_pragma_cannot_end_force_cuda_host_device : Error<
12870b57cec5SDimitry Andric  "force_cuda_host_device end pragma without matching "
12880b57cec5SDimitry Andric  "force_cuda_host_device begin">;
12890b57cec5SDimitry Andric} // end of Parse Issue category.
12900b57cec5SDimitry Andric
12910b57cec5SDimitry Andriclet CategoryName = "Modules Issue" in {
12920b57cec5SDimitry Andricdef err_unexpected_module_decl : Error<
12930b57cec5SDimitry Andric  "module declaration can only appear at the top level">;
12940b57cec5SDimitry Andricdef err_module_expected_ident : Error<
12950b57cec5SDimitry Andric  "expected a module name after '%select{module|import}0'">;
12960b57cec5SDimitry Andricdef err_attribute_not_module_attr : Error<
12970b57cec5SDimitry Andric  "%0 attribute cannot be applied to a module">;
12980b57cec5SDimitry Andricdef err_attribute_not_import_attr : Error<
12990b57cec5SDimitry Andric  "%0 attribute cannot be applied to a module import">;
13000b57cec5SDimitry Andricdef err_module_expected_semi : Error<
13010b57cec5SDimitry Andric  "expected ';' after module name">;
13020b57cec5SDimitry Andricdef err_global_module_introducer_not_at_start : Error<
13030b57cec5SDimitry Andric  "'module;' introducing a global module fragment can appear only "
13040b57cec5SDimitry Andric  "at the start of the translation unit">;
13050b57cec5SDimitry Andricdef err_module_fragment_exported : Error<
13060b57cec5SDimitry Andric  "%select{global|private}0 module fragment cannot be exported">;
13070b57cec5SDimitry Andricdef err_private_module_fragment_expected_semi : Error<
13080b57cec5SDimitry Andric  "expected ';' after private module fragment declaration">;
13090b57cec5SDimitry Andricdef err_missing_before_module_end : Error<"expected %0 at end of module">;
13100b57cec5SDimitry Andricdef err_unsupported_module_partition : Error<
13110b57cec5SDimitry Andric  "sorry, module partitions are not yet supported">;
13120b57cec5SDimitry Andric
13130b57cec5SDimitry Andricdef err_export_empty : Error<"export declaration cannot be empty">;
13140b57cec5SDimitry Andric}
13150b57cec5SDimitry Andric
13160b57cec5SDimitry Andriclet CategoryName = "Generics Issue" in {
13170b57cec5SDimitry Andric
13180b57cec5SDimitry Andricdef err_objc_expected_type_parameter : Error<
13190b57cec5SDimitry Andric  "expected type parameter name">;
13200b57cec5SDimitry Andric
13210b57cec5SDimitry Andricdef err_objc_parameterized_implementation : Error<
13220b57cec5SDimitry Andric  "@implementation cannot have type parameters">;
13230b57cec5SDimitry Andric
13240b57cec5SDimitry Andricdef err_objc_type_args_after_protocols : Error<
13250b57cec5SDimitry Andric  "protocol qualifiers must precede type arguments">;
13260b57cec5SDimitry Andric
13270b57cec5SDimitry Andricdef note_meant_to_use_typename : Note<
13280b57cec5SDimitry Andric  "did you mean to use 'typename'?">;
13290b57cec5SDimitry Andric}
13300b57cec5SDimitry Andric
13310b57cec5SDimitry Andriclet CategoryName = "Coroutines Issue" in {
13320b57cec5SDimitry Andricdef err_for_co_await_not_range_for : Error<
13330b57cec5SDimitry Andric  "'co_await' modifier can only be applied to range-based for loop">;
13340b57cec5SDimitry Andric}
13350b57cec5SDimitry Andric
13360b57cec5SDimitry Andriclet CategoryName = "Concepts Issue" in {
13370b57cec5SDimitry Andricdef err_concept_definition_not_identifier : Error<
13380b57cec5SDimitry Andric  "name defined in concept definition must be an identifier">;
13390b57cec5SDimitry Andricdef ext_concept_legacy_bool_keyword : ExtWarn<
13400b57cec5SDimitry Andric  "ISO C++2a does not permit the 'bool' keyword after 'concept'">,
13410b57cec5SDimitry Andric  InGroup<DiagGroup<"concepts-ts-compat">>;
13420b57cec5SDimitry Andric}
13430b57cec5SDimitry Andric
13440b57cec5SDimitry Andric} // end of Parser diagnostics
1345