xref: /aosp_15_r20/external/clang/include/clang/Basic/DiagnosticParseKinds.td (revision 67e74705e28f6214e480b399dd47ea732279e315)
1//==--- DiagnosticParseKinds.td - libparse diagnostics --------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10//===----------------------------------------------------------------------===//
11// Parser Diagnostics
12//===----------------------------------------------------------------------===//
13
14let Component = "Parse" in {
15
16def w_asm_qualifier_ignored : Warning<"ignored %0 qualifier on asm">,
17                              CatInlineAsm;
18def warn_file_asm_volatile : Warning<
19  "meaningless 'volatile' on asm outside function">, CatInlineAsm;
20
21let CategoryName = "Inline Assembly Issue" in {
22def err_asm_empty : Error<"__asm used with no assembly instructions">;
23def err_inline_ms_asm_parsing : Error<"%0">;
24def err_msasm_unsupported_arch : Error<
25  "Unsupported architecture '%0' for MS-style inline assembly">;
26def err_msasm_unable_to_create_target : Error<
27  "MS-style inline assembly is not available: %0">;
28def err_gnu_inline_asm_disabled : Error<
29  "GNU-style inline assembly is disabled">;
30def err_asm_goto_not_supported_yet : Error<
31  "'asm goto' constructs are not supported yet">;
32}
33
34let CategoryName = "Parse Issue" in {
35
36def ext_empty_translation_unit : Extension<
37  "ISO C requires a translation unit to contain at least one declaration">,
38  InGroup<DiagGroup<"empty-translation-unit">>;
39def warn_cxx98_compat_top_level_semi : Warning<
40  "extra ';' outside of a function is incompatible with C++98">,
41  InGroup<CXX98CompatPedantic>, DefaultIgnore;
42def ext_extra_semi : Extension<
43  "extra ';' %select{"
44  "outside of a function|"
45  "inside a %1|"
46  "inside instance variable list|"
47  "after member function definition}0">,
48  InGroup<ExtraSemi>;
49def ext_extra_semi_cxx11 : Extension<
50  "extra ';' outside of a function is a C++11 extension">,
51  InGroup<CXX11ExtraSemi>;
52def warn_extra_semi_after_mem_fn_def : Warning<
53  "extra ';' after member function definition">,
54  InGroup<ExtraSemi>, DefaultIgnore;
55
56def ext_thread_before : Extension<"'__thread' before '%0'">;
57def ext_keyword_as_ident : ExtWarn<
58  "keyword '%0' will be made available as an identifier "
59  "%select{here|for the remainder of the translation unit}1">,
60  InGroup<KeywordCompat>;
61
62def ext_nullability : Extension<
63  "type nullability specifier %0 is a Clang extension">,
64  InGroup<DiagGroup<"nullability-extension">>;
65
66def error_empty_enum : Error<"use of empty enum">;
67
68def ext_ident_list_in_param : Extension<
69  "type-less parameter names in function declaration">;
70def ext_c99_variable_decl_in_for_loop : Extension<
71  "variable declaration in for loop is a C99-specific feature">, InGroup<C99>;
72def ext_c99_compound_literal : Extension<
73  "compound literals are a C99-specific feature">, InGroup<C99>;
74def ext_enumerator_list_comma_c : Extension<
75  "commas at the end of enumerator lists are a C99-specific "
76  "feature">, InGroup<C99>;
77def ext_enumerator_list_comma_cxx : Extension<
78  "commas at the end of enumerator lists are a C++11 extension">,
79  InGroup<CXX11>;
80def warn_cxx98_compat_enumerator_list_comma : Warning<
81  "commas at the end of enumerator lists are incompatible with C++98">,
82  InGroup<CXX98CompatPedantic>, DefaultIgnore;
83def err_enumerator_list_missing_comma : Error<
84  "missing ',' between enumerators">;
85def err_enumerator_unnamed_no_def : Error<
86  "unnamed enumeration must be a definition">;
87def ext_cxx11_enum_fixed_underlying_type : Extension<
88  "enumeration types with a fixed underlying type are a C++11 extension">,
89  InGroup<CXX11>;
90def ext_c_enum_fixed_underlying_type : Extension<
91  "enumeration types with a fixed underlying type are a Microsoft extension">,
92  InGroup<MicrosoftFixedEnum>;
93def warn_cxx98_compat_enum_fixed_underlying_type : Warning<
94  "enumeration types with a fixed underlying type are incompatible with C++98">,
95  InGroup<CXX98Compat>, DefaultIgnore;
96def warn_cxx98_compat_alignof : Warning<
97  "alignof expressions are incompatible with C++98">,
98  InGroup<CXX98Compat>, DefaultIgnore;
99def ext_alignof_expr : ExtWarn<
100  "%0 applied to an expression is a GNU extension">, InGroup<GNUAlignofExpression>;
101
102def warn_microsoft_dependent_exists : Warning<
103  "dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">,
104  InGroup<DiagGroup<"microsoft-exists">>;
105def warn_microsoft_qualifiers_ignored : Warning<
106  "qualifiers after comma in declarator list are ignored">,
107  InGroup<IgnoredAttributes>;
108
109def ext_c11_generic_selection : Extension<
110  "generic selections are a C11-specific feature">, InGroup<C11>;
111def err_duplicate_default_assoc : Error<
112  "duplicate default generic association">;
113def note_previous_default_assoc : Note<
114  "previous default generic association is here">;
115
116def ext_c11_alignment : Extension<
117  "%0 is a C11-specific feature">, InGroup<C11>;
118
119def ext_c11_noreturn : Extension<
120  "_Noreturn functions are a C11-specific feature">, InGroup<C11>;
121def err_c11_noreturn_misplaced : Error<
122  "'_Noreturn' keyword must precede function declarator">;
123
124def ext_gnu_indirect_goto : Extension<
125  "use of GNU indirect-goto extension">, InGroup<GNULabelsAsValue>;
126def ext_gnu_address_of_label : Extension<
127  "use of GNU address-of-label extension">, InGroup<GNULabelsAsValue>;
128def err_stmtexpr_file_scope : Error<
129  "statement expression not allowed at file scope">;
130def ext_gnu_statement_expr : Extension<
131  "use of GNU statement expression extension">, InGroup<GNUStatementExpression>;
132def ext_gnu_conditional_expr : Extension<
133  "use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>;
134def ext_gnu_empty_initializer : Extension<
135  "use of GNU empty initializer extension">, InGroup<GNUEmptyInitializer>;
136def ext_gnu_array_range : Extension<"use of GNU array range extension">,
137  InGroup<GNUDesignator>;
138def ext_gnu_missing_equal_designator : ExtWarn<
139  "use of GNU 'missing =' extension in designator">,
140  InGroup<GNUDesignator>;
141def err_expected_equal_designator : Error<"expected '=' or another designator">;
142def ext_gnu_old_style_field_designator : ExtWarn<
143  "use of GNU old-style field designator extension">,
144  InGroup<GNUDesignator>;
145def ext_gnu_case_range : Extension<"use of GNU case range extension">,
146  InGroup<GNUCaseRange>;
147
148// Generic errors.
149def err_expected_expression : Error<"expected expression">;
150def err_expected_type : Error<"expected a type">;
151def err_expected_external_declaration : Error<"expected external declaration">;
152def err_extraneous_closing_brace : Error<"extraneous closing brace ('}')">;
153def err_expected_semi_declaration : Error<
154  "expected ';' at end of declaration">;
155def err_expected_semi_decl_list : Error<
156  "expected ';' at end of declaration list">;
157def ext_expected_semi_decl_list : ExtWarn<
158  "expected ';' at end of declaration list">;
159def err_expected_member_name_or_semi : Error<
160  "expected member name or ';' after declaration specifiers">;
161def err_function_declared_typedef : Error<
162  "function definition declared 'typedef'">;
163def err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">;
164def err_at_in_class : Error<"unexpected '@' in member specification">;
165def err_unexpected_semi : Error<"unexpected ';' before %0">;
166
167def err_expected_fn_body : Error<
168  "expected function body after function declarator">;
169def warn_attribute_on_function_definition : Warning<
170  "GCC does not allow %0 attribute in this position on a function definition">,
171  InGroup<GccCompat>;
172def warn_gcc_attribute_location : Warning<
173  "GCC does not allow an attribute in this position on a function declaration">,
174  InGroup<GccCompat>;
175def warn_attribute_no_decl : Warning<
176  "attribute %0 ignored, because it is not attached to a declaration">,
177  InGroup<IgnoredAttributes>;
178def err_expected_method_body : Error<"expected method body">;
179def err_declspec_after_virtspec : Error<
180  "'%0' qualifier may not appear after the virtual specifier '%1'">;
181def err_invalid_token_after_toplevel_declarator : Error<
182  "expected ';' after top level declarator">;
183def err_invalid_token_after_declarator_suggest_equal : Error<
184  "invalid %0 at end of declaration; did you mean '='?">;
185def err_expected_statement : Error<"expected statement">;
186def err_expected_lparen_after : Error<"expected '(' after '%0'">;
187def err_expected_rparen_after : Error<"expected ')' after '%0'">;
188def err_expected_punc : Error<"expected ')' or ',' after '%0'">;
189def err_expected_less_after : Error<"expected '<' after '%0'">;
190def err_expected_lbrace_in_compound_literal : Error<
191  "expected '{' in compound literal">;
192def err_expected_while : Error<"expected 'while' in do/while loop">;
193
194def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">;
195def err_expected_semi_after_expr : Error<"expected ';' after expression">;
196def err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">;
197
198def err_expected_semi_after_method_proto : Error<
199  "expected ';' after method prototype">;
200def err_expected_semi_after_namespace_name : Error<
201  "expected ';' after namespace name">;
202def err_unexpected_namespace_attributes_alias : Error<
203  "attributes cannot be specified on namespace alias">;
204def err_unexpected_nested_namespace_attribute : Error<
205  "attributes cannot be specified on a nested namespace definition">;
206def err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
207def err_namespace_nonnamespace_scope : Error<
208  "namespaces can only be defined in global or namespace scope">;
209def ext_nested_namespace_definition : ExtWarn<
210  "nested namespace definition is a C++1z extension; "
211  "define each namespace separately">, InGroup<CXX1z>;
212def warn_cxx14_compat_nested_namespace_definition : Warning<
213  "nested namespace definition is incompatible with C++ standards before C++1z">,
214  InGroup<CXXPre1zCompat>, DefaultIgnore;
215def err_inline_nested_namespace_definition : Error<
216  "nested namespace definition cannot be 'inline'">;
217def err_expected_semi_after_attribute_list : Error<
218  "expected ';' after attribute list">;
219def err_expected_semi_after_static_assert : Error<
220  "expected ';' after static_assert">;
221def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
222def err_single_decl_assign_in_for_range : Error<
223  "range-based 'for' statement uses ':', not '='">;
224def warn_missing_selector_name : Warning<
225  "%0 used as the name of the previous parameter rather than as part "
226  "of the selector">,
227  InGroup<DiagGroup<"missing-selector-name">>;
228def note_missing_selector_name : Note<
229  "introduce a parameter name to make %0 part of the selector">;
230def note_force_empty_selector_name : Note<
231  "or insert whitespace before ':' to use %0 as parameter name "
232  "and have an empty entry in the selector">;
233def err_label_end_of_compound_statement : Error<
234  "label at end of compound statement: expected statement">;
235def err_address_of_label_outside_fn : Error<
236  "use of address-of-label extension outside of a function body">;
237def err_asm_operand_wide_string_literal : Error<
238  "cannot use %select{unicode|wide}0 string literal in 'asm'">;
239def err_expected_selector_for_method : Error<
240  "expected selector for Objective-C method">;
241def err_expected_property_name : Error<"expected property name">;
242
243def err_unexpected_at : Error<"unexpected '@' in program">;
244def err_atimport : Error<
245"use of '@import' when modules are disabled">;
246
247def err_invalid_reference_qualifier_application : Error<
248  "'%0' qualifier may not be applied to a reference">;
249def err_illegal_decl_reference_to_reference : Error<
250  "%0 declared as a reference to a reference">;
251def ext_rvalue_reference : ExtWarn<
252  "rvalue references are a C++11 extension">, InGroup<CXX11>;
253def warn_cxx98_compat_rvalue_reference : Warning<
254  "rvalue references are incompatible with C++98">,
255  InGroup<CXX98Compat>, DefaultIgnore;
256def ext_ref_qualifier : ExtWarn<
257  "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>;
258def warn_cxx98_compat_ref_qualifier : Warning<
259  "reference qualifiers on functions are incompatible with C++98">,
260  InGroup<CXX98Compat>, DefaultIgnore;
261def ext_inline_namespace : ExtWarn<
262  "inline namespaces are a C++11 feature">, InGroup<CXX11InlineNamespace>;
263def warn_cxx98_compat_inline_namespace : Warning<
264  "inline namespaces are incompatible with C++98">,
265  InGroup<CXX98Compat>, DefaultIgnore;
266def ext_generalized_initializer_lists : ExtWarn<
267  "generalized initializer lists are a C++11 extension">,
268  InGroup<CXX11>;
269def warn_cxx98_compat_generalized_initializer_lists : Warning<
270  "generalized initializer lists are incompatible with C++98">,
271  InGroup<CXX98Compat>, DefaultIgnore;
272def err_init_list_bin_op : Error<"initializer list cannot be used on the "
273  "%select{left|right}0 hand side of operator '%1'">;
274def warn_cxx98_compat_trailing_return_type : Warning<
275  "trailing return types are incompatible with C++98">,
276  InGroup<CXX98Compat>, DefaultIgnore;
277def ext_auto_storage_class : ExtWarn<
278  "'auto' storage class specifier is not permitted in C++11, and will not "
279  "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
280def ext_decltype_auto_type_specifier : ExtWarn<
281  "'decltype(auto)' type specifier is a C++14 extension">, InGroup<CXX14>;
282def warn_cxx11_compat_decltype_auto_type_specifier : Warning<
283  "'decltype(auto)' type specifier is incompatible with C++ standards before "
284  "C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
285def ext_auto_type : Extension<
286  "'__auto_type' is a GNU extension">,
287  InGroup<GNUAutoType>;
288def ext_for_range : ExtWarn<
289  "range-based for loop is a C++11 extension">, InGroup<CXX11>;
290def warn_cxx98_compat_for_range : Warning<
291  "range-based for loop is incompatible with C++98">,
292  InGroup<CXX98Compat>, DefaultIgnore;
293def err_for_range_identifier : Error<
294  "range-based for loop requires type for loop variable">;
295def err_for_range_expected_decl : Error<
296  "for range declaration must declare a variable">;
297def err_argument_required_after_attribute : Error<
298  "argument required after attribute">;
299def err_missing_param : Error<"expected parameter declarator">;
300def err_missing_comma_before_ellipsis : Error<
301  "C requires a comma prior to the ellipsis in a variadic function type">;
302def err_unexpected_typedef_ident : Error<
303  "unexpected type name %0: expected identifier">;
304def warn_cxx98_compat_decltype : Warning<
305  "'decltype' type specifier is incompatible with C++98">,
306  InGroup<CXX98Compat>, DefaultIgnore;
307def err_unexpected_scope_on_base_decltype : Error<
308  "unexpected namespace scope prior to decltype">;
309def err_expected_class_name : Error<"expected class name">;
310def err_expected_class_name_not_template :
311  Error<"'typename' is redundant; base classes are implicitly types">;
312def err_unspecified_vla_size_with_static : Error<
313  "'static' may not be used with an unspecified variable length array size">;
314def err_unspecified_size_with_static : Error<
315  "'static' may not be used without an array size">;
316def err_expected_parentheses_around_typename : Error<
317  "expected parentheses around type name in %0 expression">;
318
319def err_expected_case_before_expression: Error<
320  "expected 'case' keyword before expression">;
321
322// Declarations.
323def err_typename_requires_specqual : Error<
324  "type name requires a specifier or qualifier">;
325def err_typename_invalid_storageclass : Error<
326  "type name does not allow storage class to be specified">;
327def err_typename_invalid_functionspec : Error<
328  "type name does not allow function specifier to be specified">;
329def err_typename_invalid_constexpr : Error<
330  "type name does not allow constexpr specifier to be specified">;
331def err_typename_identifiers_only : Error<
332  "typename is allowed for identifiers only">;
333
334def err_friend_invalid_in_context : Error<
335  "'friend' used outside of class">;
336def err_templated_using_directive_declaration : Error<
337  "cannot template a using %select{directive|declaration}0">;
338def err_unexpected_colon_in_nested_name_spec : Error<
339  "unexpected ':' in nested name specifier; did you mean '::'?">;
340def err_unexpected_token_in_nested_name_spec : Error<
341  "'%0' cannot be a part of nested name specifier; did you mean ':'?">;
342def err_bool_redeclaration : Error<
343  "redeclaration of C++ built-in type 'bool'">;
344def ext_c11_static_assert : Extension<
345  "_Static_assert is a C11-specific feature">, InGroup<C11>;
346def warn_cxx98_compat_static_assert : Warning<
347  "static_assert declarations are incompatible with C++98">,
348  InGroup<CXX98Compat>, DefaultIgnore;
349def err_paren_after_colon_colon : Error<
350  "unexpected parenthesis after '::'">;
351def err_function_definition_not_allowed : Error<
352  "function definition is not allowed here">;
353def err_expected_end_of_enumerator : Error<
354  "expected '= constant-expression' or end of enumerator definition">;
355def err_expected_coloncolon_after_super : Error<
356  "expected '::' after '__super'">;
357
358/// Objective-C parser diagnostics
359def err_expected_minus_or_plus : Error<
360  "method type specifier must start with '-' or '+'">;
361def err_objc_no_attributes_on_category : Error<
362  "attributes may not be specified on a category">;
363def err_objc_missing_end : Error<"missing '@end'">;
364def note_objc_container_start : Note<
365  "%select{class|protocol|category|class extension|implementation"
366  "|category implementation}0 started here">;
367def warn_objc_protocol_qualifier_missing_id : Warning<
368  "protocol has no object type specified; defaults to qualified 'id'">;
369def err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">;
370def err_illegal_super_cast : Error<
371  "cannot cast 'super' (it isn't an expression)">;
372def err_nsnumber_nonliteral_unary : Error<
373  "@%0 must be followed by a number to form an NSNumber object">;
374def warn_cstyle_param : Warning<
375  "use of C-style parameters in Objective-C method declarations"
376  " is deprecated">, InGroup<DeprecatedDeclarations>;
377
378let CategoryName = "ARC Parse Issue" in {
379def err_arc_bridge_retain : Error<
380  "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">;
381// To be default mapped to an error later.
382def warn_arc_bridge_cast_nonarc : Warning<
383  "'%0' casts have no effect when not using ARC">,
384  InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>;
385}
386
387def err_objc_illegal_visibility_spec : Error<
388  "illegal visibility specification">;
389def err_objc_illegal_interface_qual : Error<"illegal interface qualifier">;
390def err_objc_expected_equal_for_getter : Error<
391  "expected '=' for Objective-C getter">;
392def err_objc_expected_equal_for_setter : Error<
393  "expected '=' for Objective-C setter">;
394def err_objc_expected_selector_for_getter_setter : Error<
395  "expected selector for Objective-C %select{setter|getter}0">;
396def err_objc_property_requires_field_name : Error<
397  "property requires fields to be named">;
398def err_objc_property_bitfield : Error<"property name cannot be a bitfield">;
399def err_objc_expected_property_attr : Error<"unknown property attribute %0">;
400def err_objc_properties_require_objc2 : Error<
401  "properties are an Objective-C 2 feature">;
402def err_objc_unexpected_attr : Error<
403  "prefix attribute must be followed by an interface or protocol">;
404def err_objc_postfix_attribute : Error <
405  "postfix attributes are not allowed on Objective-C directives">;
406def err_objc_postfix_attribute_hint : Error <
407  "postfix attributes are not allowed on Objective-C directives, place"
408  " them in front of '%select{@interface|@protocol}0'">;
409def err_objc_directive_only_in_protocol : Error<
410  "directive may only be specified in protocols only">;
411def err_missing_catch_finally : Error<
412  "@try statement without a @catch and @finally clause">;
413def err_objc_concat_string : Error<"unexpected token after Objective-C string">;
414def err_expected_objc_container : Error<
415  "'@end' must appear in an Objective-C context">;
416def err_unexpected_protocol_qualifier : Error<
417  "@implementation declaration cannot be protocol qualified">;
418def err_objc_unexpected_atend : Error<
419  "'@end' appears where closing brace '}' is expected">;
420def error_property_ivar_decl : Error<
421  "property synthesize requires specification of an ivar">;
422def err_synthesized_property_name : Error<
423  "expected a property name in @synthesize">;
424def warn_semicolon_before_method_body : Warning<
425  "semicolon before method body is ignored">,
426  InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore;
427def note_extra_comma_message_arg : Note<
428  "comma separating Objective-C messaging arguments">;
429
430def err_expected_field_designator : Error<
431  "expected a field designator, such as '.field = 4'">;
432
433def err_declaration_does_not_declare_param : Error<
434  "declaration does not declare a parameter">;
435def err_no_matching_param : Error<"parameter named %0 is missing">;
436
437/// C++ parser diagnostics
438def err_invalid_operator_on_type : Error<
439  "cannot use %select{dot|arrow}0 operator on a type">;
440def err_expected_unqualified_id : Error<
441  "expected %select{identifier|unqualified-id}0">;
442def err_brackets_go_after_unqualified_id : Error<
443  "brackets are not allowed here; to declare an array, "
444  "place the brackets after the %select{identifier|name}0">;
445def err_unexpected_unqualified_id : Error<"type-id cannot have a name">;
446def err_func_def_no_params : Error<
447  "function definition does not declare parameters">;
448def err_expected_lparen_after_type : Error<
449  "expected '(' for function-style cast or type construction">;
450def err_expected_init_in_condition : Error<
451  "variable declaration in condition must have an initializer">;
452def err_expected_init_in_condition_lparen : Error<
453  "variable declaration in condition cannot have a parenthesized initializer">;
454def err_extraneous_rparen_in_condition : Error<
455  "extraneous ')' after condition, expected a statement">;
456def warn_dangling_else : Warning<
457  "add explicit braces to avoid dangling else">,
458  InGroup<DanglingElse>;
459def err_expected_member_or_base_name : Error<
460  "expected class member or base class name">;
461def err_expected_lbrace_after_base_specifiers : Error<
462  "expected '{' after base class list">;
463def err_missing_end_of_definition : Error<
464  "missing '}' at end of definition of %q0">;
465def note_missing_end_of_definition_before : Note<
466  "still within definition of %q0 here">;
467def ext_ellipsis_exception_spec : Extension<
468  "exception specification of '...' is a Microsoft extension">,
469  InGroup<MicrosoftExceptionSpec>;
470def err_dynamic_and_noexcept_specification : Error<
471  "cannot have both throw() and noexcept() clause on the same function">;
472def err_except_spec_unparsed : Error<
473  "unexpected end of exception specification">;
474def warn_cxx98_compat_noexcept_decl : Warning<
475  "noexcept specifications are incompatible with C++98">,
476  InGroup<CXX98Compat>, DefaultIgnore;
477def err_expected_catch : Error<"expected catch">;
478def err_using_namespace_in_class : Error<
479  "'using namespace' is not allowed in classes">;
480def err_constructor_bad_name : Error<
481  "missing return type for function %0; did you mean the constructor name %1?">;
482def err_destructor_tilde_identifier : Error<
483  "expected a class name after '~' to name a destructor">;
484def err_destructor_tilde_scope : Error<
485  "'~' in destructor name should be after nested name specifier">;
486def err_destructor_template_id : Error<
487  "destructor name %0 does not refer to a template">;
488def err_default_arg_unparsed : Error<
489  "unexpected end of default argument expression">;
490def err_bracket_depth_exceeded : Error<
491  "bracket nesting level exceeded maximum of %0">, DefaultFatal;
492def note_bracket_depth : Note<
493  "use -fbracket-depth=N to increase maximum nesting level">;
494def err_misplaced_ellipsis_in_declaration : Error<
495  "'...' must %select{immediately precede declared identifier|"
496  "be innermost component of anonymous pack declaration}0">;
497def warn_misplaced_ellipsis_vararg : Warning<
498  "'...' in this location creates a C-style varargs function"
499  "%select{, not a function parameter pack|}0">,
500  InGroup<DiagGroup<"ambiguous-ellipsis">>;
501def note_misplaced_ellipsis_vararg_existing_ellipsis : Note<
502  "preceding '...' declares a function parameter pack">;
503def note_misplaced_ellipsis_vararg_add_ellipsis : Note<
504  "place '...' %select{immediately before declared identifier|here}0 "
505  "to declare a function parameter pack">;
506def note_misplaced_ellipsis_vararg_add_comma : Note<
507  "insert ',' before '...' to silence this warning">;
508def ext_abstract_pack_declarator_parens : ExtWarn<
509  "ISO C++11 requires a parenthesized pack declaration to have a name">,
510  InGroup<DiagGroup<"anonymous-pack-parens">>;
511def err_function_is_not_record : Error<
512  "unexpected %0 in function call; perhaps remove the %0?">;
513def err_super_in_using_declaration : Error<
514  "'__super' cannot be used with a using declaration">;
515def ext_constexpr_if : ExtWarn<
516  "constexpr if is a C++1z extension">, InGroup<CXX1z>;
517def warn_cxx14_compat_constexpr_if : Warning<
518  "constexpr if is incompatible with C++ standards before C++1z">,
519  DefaultIgnore, InGroup<CXXPre1zCompat>;
520
521// C++ derived classes
522def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
523
524// C++ operator overloading
525def err_literal_operator_string_prefix : Error<
526  "string literal after 'operator' cannot have an encoding prefix">;
527def err_literal_operator_string_not_empty : Error<
528  "string literal after 'operator' must be '\"\"'">;
529def warn_cxx98_compat_literal_operator : Warning<
530  "literal operators are incompatible with C++98">,
531  InGroup<CXX98Compat>, DefaultIgnore;
532
533// Classes.
534def err_anon_type_definition : Error<
535  "declaration of anonymous %0 must be a definition">;
536def err_default_delete_in_multiple_declaration : Error<
537  "'= %select{default|delete}0' is a function definition and must occur in a "
538  "standalone declaration">;
539
540def warn_cxx98_compat_noexcept_expr : Warning<
541  "noexcept expressions are incompatible with C++98">,
542  InGroup<CXX98Compat>, DefaultIgnore;
543def warn_cxx98_compat_nullptr : Warning<
544  "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
545
546def warn_cxx14_compat_attribute : Warning<
547  "attributes on %select{a namespace|an enumerator}0 declaration are "
548  "incompatible with C++ standards before C++1z">,
549  InGroup<CXXPre1zCompat>, DefaultIgnore;
550def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
551  InGroup<CXX98Compat>, DefaultIgnore;
552def warn_cxx98_compat_attribute : Warning<
553  "C++11 attribute syntax is incompatible with C++98">,
554  InGroup<CXX98Compat>, DefaultIgnore;
555def err_cxx11_attribute_forbids_arguments : Error<
556  "attribute %0 cannot have an argument list">;
557def err_attribute_requires_arguments : Error<
558  "parentheses must be omitted if %0 attribute's argument list is empty">;
559def err_cxx11_attribute_forbids_ellipsis : Error<
560  "attribute '%0' cannot be used as an attribute pack">;
561def err_cxx11_attribute_repeated : Error<
562  "attribute %0 cannot appear multiple times in an attribute specifier">;
563def warn_cxx14_compat_using_attribute_ns : Warning<
564  "default scope specifier for attributes is incompatible with C++ standards "
565  "before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
566def ext_using_attribute_ns : ExtWarn<
567  "default scope specifier for attributes is a C++1z extension">,
568  InGroup<CXX1z>;
569def err_using_attribute_ns_conflict : Error<
570  "attribute with scope specifier cannot follow default scope specifier">;
571def err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
572def err_l_square_l_square_not_attribute : Error<
573  "C++11 only allows consecutive left square brackets when "
574  "introducing an attribute">;
575def err_ms_declspec_type : Error<
576  "__declspec attributes must be an identifier or string literal">;
577def err_ms_property_no_getter_or_putter : Error<
578  "property does not specify a getter or a putter">;
579def err_ms_property_unknown_accessor : Error<
580  "expected 'get' or 'put' in property declaration">;
581def err_ms_property_has_set_accessor : Error<
582  "putter for property must be specified as 'put', not 'set'">;
583def err_ms_property_missing_accessor_kind : Error<
584  "missing 'get=' or 'put='">;
585def err_ms_property_expected_equal : Error<
586  "expected '=' after '%0'">;
587def err_ms_property_duplicate_accessor : Error<
588  "property declaration specifies '%0' accessor twice">;
589def err_ms_property_expected_accessor_name : Error<
590  "expected name of accessor method">;
591def err_ms_property_expected_comma_or_rparen : Error<
592  "expected ',' or ')' at end of property accessor list">;
593def err_ms_property_initializer : Error<
594  "property declaration cannot have an in-class initializer">;
595
596/// C++ Templates
597def err_expected_template : Error<"expected template">;
598def err_unknown_template_name : Error<
599  "unknown template name %0">;
600def err_expected_comma_greater : Error<
601  "expected ',' or '>' in template-parameter-list">;
602def err_class_on_template_template_param : Error<
603  "template template parameter requires 'class' after the parameter list">;
604def ext_template_template_param_typename : ExtWarn<
605  "template template parameter using 'typename' is a C++1z extension">,
606  InGroup<CXX1z>;
607def warn_cxx14_compat_template_template_param_typename : Warning<
608  "template template parameter using 'typename' is "
609  "incompatible with C++ standards before C++1z">,
610  InGroup<CXXPre1zCompat>, DefaultIgnore;
611def err_template_spec_syntax_non_template : Error<
612  "identifier followed by '<' indicates a class template specialization but "
613  "%0 %select{does not refer to a template|refers to a function template|"
614  "<unused>|refers to a variable template|<unused>}1">;
615def err_id_after_template_in_nested_name_spec : Error<
616  "expected template name after 'template' keyword in nested name specifier">;
617def err_two_right_angle_brackets_need_space : Error<
618  "a space is required between consecutive right angle brackets (use '> >')">;
619def err_right_angle_bracket_equal_needs_space : Error<
620  "a space is required between a right angle bracket and an equals sign "
621  "(use '> =')">;
622def warn_cxx11_right_shift_in_template_arg : Warning<
623  "use of right-shift operator ('>>') in template argument will require "
624  "parentheses in C++11">, InGroup<CXX11Compat>;
625def warn_cxx98_compat_two_right_angle_brackets : Warning<
626  "consecutive right angle brackets are incompatible with C++98 (use '> >')">,
627  InGroup<CXX98Compat>, DefaultIgnore;
628def err_templated_invalid_declaration : Error<
629  "a static_assert declaration cannot be a template">;
630def err_multiple_template_declarators : Error<
631  "%select{|a template declaration|an explicit template specialization|"
632  "an explicit template instantiation}0 can "
633  "only %select{|declare|declare|instantiate}0 a single entity">;
634def err_explicit_instantiation_with_definition : Error<
635  "explicit template instantiation cannot have a definition; if this "
636  "definition is meant to be an explicit specialization, add '<>' after the "
637  "'template' keyword">;
638def err_template_defn_explicit_instantiation : Error<
639  "%select{function|class|variable}0 cannot be defined in an explicit instantiation; if this "
640  "declaration is meant to be a %select{function|class|variable}0 definition, remove the 'template' keyword">;
641def err_friend_explicit_instantiation : Error<
642  "friend cannot be declared in an explicit instantiation; if this "
643  "declaration is meant to be a friend declaration, remove the 'template' keyword">;
644def err_explicit_instantiation_enum : Error<
645  "enumerations cannot be explicitly instantiated">;
646def err_expected_template_parameter : Error<"expected template parameter">;
647
648def err_missing_dependent_template_keyword : Error<
649  "use 'template' keyword to treat '%0' as a dependent template name">;
650def warn_missing_dependent_template_keyword : ExtWarn<
651  "use 'template' keyword to treat '%0' as a dependent template name">;
652
653def ext_extern_template : Extension<
654  "extern templates are a C++11 extension">, InGroup<CXX11>;
655def warn_cxx98_compat_extern_template : Warning<
656  "extern templates are incompatible with C++98">,
657  InGroup<CXX98CompatPedantic>, DefaultIgnore;
658def warn_static_inline_explicit_inst_ignored : Warning<
659  "ignoring '%select{static|inline}0' keyword on explicit template "
660  "instantiation">, InGroup<DiagGroup<"static-inline-explicit-instantiation">>;
661
662// Constructor template diagnostics.
663def err_out_of_line_constructor_template_id : Error<
664  "out-of-line constructor for %0 cannot have template arguments">;
665def err_out_of_line_template_id_type_names_constructor : Error<
666  "qualified reference to %0 is a constructor name rather than a "
667  "%select{template name|type}1 wherever a constructor can be declared">;
668
669def err_expected_qualified_after_typename : Error<
670  "expected a qualified name after 'typename'">;
671def warn_expected_qualified_after_typename : ExtWarn<
672  "expected a qualified name after 'typename'">;
673
674def err_typename_refers_to_non_type_template : Error<
675  "typename specifier refers to a non-type template">;
676def err_expected_type_name_after_typename : Error<
677  "expected an identifier or template-id after '::'">;
678def err_explicit_spec_non_template : Error<
679  "explicit %select{specialization|instantiation}0 of non-template %1 %2">;
680
681def err_default_template_template_parameter_not_template : Error<
682  "default template argument for a template template parameter must be a class "
683  "template">;
684
685def ext_fold_expression : ExtWarn<
686  "pack fold expression is a C++1z extension">,
687  InGroup<CXX1z>;
688def warn_cxx14_compat_fold_expression : Warning<
689  "pack fold expression is incompatible with C++ standards before C++1z">,
690  InGroup<CXXPre1zCompat>, DefaultIgnore;
691def err_expected_fold_operator : Error<
692  "expected a foldable binary operator in fold expression">;
693def err_fold_operator_mismatch : Error<
694  "operators in fold expression must be the same">;
695
696def err_ctor_init_missing_comma : Error<
697  "missing ',' between base or member initializers">;
698
699// C++ declarations
700def err_friend_decl_defines_type : Error<
701  "cannot define a type in a friend declaration">;
702def err_missing_whitespace_digraph : Error<
703  "found '<::' after a "
704  "%select{template name|const_cast|dynamic_cast|reinterpret_cast|static_cast}0"
705  " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">;
706
707def ext_defaulted_deleted_function : ExtWarn<
708  "%select{defaulted|deleted}0 function definitions are a C++11 extension">,
709  InGroup<CXX11>;
710def warn_cxx98_compat_defaulted_deleted_function : Warning<
711  "%select{defaulted|deleted}0 function definitions are incompatible with C++98">,
712  InGroup<CXX98Compat>, DefaultIgnore;
713
714// C++11 in-class member initialization
715def ext_nonstatic_member_init : ExtWarn<
716  "in-class initialization of non-static data member is a C++11 extension">,
717  InGroup<CXX11>;
718def warn_cxx98_compat_nonstatic_member_init : Warning<
719  "in-class initialization of non-static data members is incompatible with C++98">,
720  InGroup<CXX98Compat>, DefaultIgnore;
721def err_bitfield_member_init: Error<
722  "bitfield member cannot have an in-class initializer">;
723def err_incomplete_array_member_init: Error<
724  "array bound cannot be deduced from an in-class initializer">;
725
726// C++11 alias-declaration
727def ext_alias_declaration : ExtWarn<
728  "alias declarations are a C++11 extension">, InGroup<CXX11>;
729def warn_cxx98_compat_alias_declaration : Warning<
730  "alias declarations are incompatible with C++98">,
731  InGroup<CXX98Compat>, DefaultIgnore;
732def err_alias_declaration_not_identifier : Error<
733  "name defined in alias declaration must be an identifier">;
734def err_alias_declaration_specialization : Error<
735  "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">;
736
737// C++11 override control
738def ext_override_control_keyword : ExtWarn<
739  "'%0' keyword is a C++11 extension">, InGroup<CXX11>;
740def warn_cxx98_compat_override_control_keyword : Warning<
741  "'%0' keyword is incompatible with C++98">,
742  InGroup<CXX98Compat>, DefaultIgnore;
743def err_override_control_interface : Error<
744  "'%0' keyword not permitted with interface types">;
745def ext_ms_sealed_keyword : ExtWarn<
746  "'sealed' keyword is a Microsoft extension">,
747  InGroup<MicrosoftSealed>;
748
749def err_access_specifier_interface : Error<
750  "interface types cannot specify '%select{private|protected}0' access">;
751
752def err_duplicate_virt_specifier : Error<
753  "class member already marked '%0'">;
754
755def err_scoped_enum_missing_identifier : Error<
756  "scoped enumeration requires a name">;
757def ext_scoped_enum : ExtWarn<
758  "scoped enumerations are a C++11 extension">, InGroup<CXX11>;
759def warn_cxx98_compat_scoped_enum : Warning<
760  "scoped enumerations are incompatible with C++98">,
761  InGroup<CXX98Compat>, DefaultIgnore;
762
763def err_expected_parameter_pack : Error<
764  "expected the name of a parameter pack">;
765def err_paren_sizeof_parameter_pack : Error<
766  "missing parentheses around the size of parameter pack %0">;
767def err_sizeof_parameter_pack : Error<
768  "expected parenthesized parameter pack name in 'sizeof...' expression">;
769
770// C++11 lambda expressions
771def err_expected_comma_or_rsquare : Error<
772  "expected ',' or ']' in lambda capture list">;
773def err_this_captured_by_reference : Error<
774  "'this' cannot be captured by reference">;
775def err_expected_capture : Error<
776  "expected variable name or 'this' in lambda capture list">;
777def err_expected_lambda_body : Error<"expected body of lambda expression">;
778def warn_cxx98_compat_lambda : Warning<
779  "lambda expressions are incompatible with C++98">,
780  InGroup<CXX98Compat>, DefaultIgnore;
781def err_lambda_missing_parens : Error<
782  "lambda requires '()' before %select{'mutable'|return type|"
783  "attribute specifier|'constexpr'}0">;
784def err_lambda_decl_specifier_repeated : Error<
785  "%select{'mutable'|'constexpr'}0 cannot appear multiple times in a lambda declarator">;
786// C++1z lambda expressions
787def err_expected_star_this_capture : Error<
788  "expected 'this' following '*' in lambda capture list">;
789
790// C++1z constexpr lambda expressions
791def warn_cxx14_compat_constexpr_on_lambda : Warning<
792  "constexpr on lambda expressions is incompatible with C++ standards before C++1z">,
793  InGroup<CXXPre1zCompat>, DefaultIgnore;
794def ext_constexpr_on_lambda_cxx1z : ExtWarn<
795  "'constexpr' on lambda expressions is a C++1z extension">, InGroup<CXX1z>;
796
797// Availability attribute
798def err_expected_version : Error<
799  "expected a version of the form 'major[.minor[.subminor]]'">;
800def warn_expected_consistent_version_separator : Warning<
801  "use same version number separators '_' or '.'; as in "
802  "'major[.minor[.subminor]]'">, InGroup<Availability>;
803def err_zero_version : Error<
804  "version number must have non-zero major, minor, or sub-minor version">;
805def err_availability_expected_platform : Error<
806  "expected a platform name, e.g., 'macos'">;
807
808// objc_bridge_related attribute
809def err_objcbridge_related_expected_related_class : Error<
810  "expected a related ObjectiveC class name, e.g., 'NSColor'">;
811def err_objcbridge_related_selector_name : Error<
812  "expected a class method selector with single argument, e.g., 'colorWithCGColor:'">;
813
814def err_availability_expected_change : Error<
815  "expected 'introduced', 'deprecated', or 'obsoleted'">;
816def err_availability_unknown_change : Error<
817  "%0 is not an availability stage; use 'introduced', 'deprecated', or "
818  "'obsoleted'">;
819def err_availability_redundant : Error<
820  "redundant %0 availability change; only the last specified change will "
821  "be used">;
822def warn_availability_and_unavailable : Warning<
823  "'unavailable' availability overrides all other availability information">,
824  InGroup<Availability>;
825
826// Type safety attributes
827def err_type_safety_unknown_flag : Error<
828  "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">;
829
830// Type traits
831def err_type_trait_arity : Error<
832  "type trait requires %0%select{| or more}1 argument%select{|s}2; have "
833  "%3 argument%s3">;
834
835// Language specific pragmas
836// - Generic warnings
837def warn_pragma_expected_lparen : Warning<
838  "missing '(' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
839def warn_pragma_expected_rparen : Warning<
840  "missing ')' after '#pragma %0' - ignoring">, InGroup<IgnoredPragmas>;
841def warn_pragma_expected_identifier : Warning<
842  "expected identifier in '#pragma %0' - ignored">, InGroup<IgnoredPragmas>;
843def warn_pragma_expected_section_name : Warning<
844  "expected a string literal for the section name in '#pragma %0' - ignored">,
845  InGroup<IgnoredPragmas>;
846def warn_pragma_expected_section_push_pop_or_name : Warning<
847  "expected push, pop or a string literal for the section name in '#pragma %0' - ignored">,
848  InGroup<IgnoredPragmas>;
849def warn_pragma_expected_section_label_or_name : Warning<
850  "expected a stack label or a string literal for the section name in '#pragma %0' - ignored">,
851  InGroup<IgnoredPragmas>;
852def warn_pragma_expected_init_seg : Warning<
853  "expected 'compiler', 'lib', 'user', or a string literal for the section name in '#pragma %0' - ignored">,
854  InGroup<IgnoredPragmas>;
855def warn_pragma_expected_integer : Warning<
856  "expected integer between %0 and %1 inclusive in '#pragma %2' - ignored">,
857  InGroup<IgnoredPragmas>;
858def warn_pragma_ms_struct : Warning<
859  "incorrect use of '#pragma ms_struct on|off' - ignored">,
860  InGroup<IgnoredPragmas>;
861def warn_pragma_extra_tokens_at_eol : Warning<
862  "extra tokens at end of '#pragma %0' - ignored">,
863  InGroup<IgnoredPragmas>;
864def warn_pragma_expected_punc : Warning<
865  "expected ')' or ',' in '#pragma %0'">, InGroup<IgnoredPragmas>;
866def warn_pragma_expected_non_wide_string : Warning<
867  "expected non-wide string literal in '#pragma %0'">, InGroup<IgnoredPragmas>;
868// - Generic errors
869def err_pragma_missing_argument : Error<
870  "missing argument to '#pragma %0'%select{|; expected %2}1">;
871// - #pragma options
872def warn_pragma_options_expected_align : Warning<
873  "expected 'align' following '#pragma options' - ignored">,
874  InGroup<IgnoredPragmas>;
875def warn_pragma_align_expected_equal : Warning<
876  "expected '=' following '#pragma %select{align|options align}0' - ignored">,
877  InGroup<IgnoredPragmas>;
878def warn_pragma_align_invalid_option : Warning<
879  "invalid alignment option in '#pragma %select{align|options align}0' - ignored">,
880  InGroup<IgnoredPragmas>;
881// - #pragma pack
882def warn_pragma_unsupported_action : Warning<
883  "known but unsupported action '%1' for '#pragma %0' - ignored">,
884  InGroup<IgnoredPragmas>;
885def warn_pragma_invalid_specific_action : Warning<
886  "unknown action '%1' for '#pragma %0' - ignored">,
887  InGroup<IgnoredPragmas>;
888def warn_pragma_expected_action_or_r_paren : Warning<
889  "expected action or ')' in '#pragma %0' - ignored">,
890  InGroup<IgnoredPragmas>;
891def warn_pragma_invalid_action : Warning<
892  "unknown action for '#pragma %0' - ignored">,
893  InGroup<IgnoredPragmas>;
894def warn_pragma_pack_malformed : Warning<
895  "expected integer or identifier in '#pragma pack' - ignored">,
896  InGroup<IgnoredPragmas>;
897// - #pragma unused
898def warn_pragma_unused_expected_var : Warning<
899  "expected '#pragma unused' argument to be a variable name">,
900  InGroup<IgnoredPragmas>;
901// - #pragma init_seg
902def warn_pragma_init_seg_unsupported_target : Warning<
903  "'#pragma init_seg' is only supported when targeting a "
904  "Microsoft environment">,
905  InGroup<IgnoredPragmas>;
906// - #pragma fp_contract
907def err_pragma_fp_contract_scope : Error<
908  "'#pragma fp_contract' can only appear at file scope or at the start of a "
909  "compound statement">;
910// - #pragma comment
911def err_pragma_comment_malformed : Error<
912  "pragma comment requires parenthesized identifier and optional string">;
913def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
914// PS4 recognizes only #pragma comment(lib)
915def warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
916  InGroup<IgnoredPragmas>;
917// - #pragma detect_mismatch
918def err_pragma_detect_mismatch_malformed : Error<
919  "pragma detect_mismatch is malformed; it requires two comma-separated "
920  "string literals">;
921// - #pragma pointers_to_members
922def err_pragma_pointers_to_members_unknown_kind : Error<
923  "unexpected %0, expected to see one of %select{|'best_case', 'full_generality', }1"
924  "'single_inheritance', 'multiple_inheritance', or 'virtual_inheritance'">;
925// - #pragma clang optimize on/off
926def err_pragma_optimize_invalid_argument : Error<
927  "unexpected argument '%0' to '#pragma clang optimize'; "
928  "expected 'on' or 'off'">;
929def err_pragma_optimize_extra_argument : Error<
930  "unexpected extra argument '%0' to '#pragma clang optimize'">;
931
932def err_opencl_unroll_hint_on_non_loop : Error<
933  "OpenCL only supports 'opencl_unroll_hint' attribute on for, while, and do statements">;
934
935// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
936def warn_pragma_expected_colon : Warning<
937  "missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>;
938def warn_pragma_expected_enable_disable : Warning<
939  "expected 'enable' or 'disable' - ignoring">, InGroup<IgnoredPragmas>;
940def warn_pragma_unknown_extension : Warning<
941  "unknown OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
942def warn_pragma_unsupported_extension : Warning<
943  "unsupported OpenCL extension %0 - ignoring">, InGroup<IgnoredPragmas>;
944def warn_pragma_extension_is_core : Warning<
945  "OpenCL extension %0 is core feature or supported optional core feature - ignoring">, InGroup<DiagGroup<"pedantic-core-features">>, DefaultIgnore;
946
947// OpenCL errors.
948def err_opencl_taking_function_address_parser : Error<
949  "taking address of function is not allowed">;
950def err_opencl_logical_exclusive_or : Error<
951  "^^ is a reserved operator in OpenCL">;
952
953// OpenMP support.
954def warn_pragma_omp_ignored : Warning<
955  "unexpected '#pragma omp ...' in program">, InGroup<SourceUsesOpenMP>, DefaultIgnore;
956def warn_omp_extra_tokens_at_eol : Warning<
957  "extra tokens at the end of '#pragma omp %0' are ignored">,
958  InGroup<ExtraTokens>;
959def warn_pragma_expected_colon_r_paren : Warning<
960  "missing ':' or ')' after %0 - ignoring">, InGroup<IgnoredPragmas>;
961def err_omp_unknown_directive : Error<
962  "expected an OpenMP directive">;
963def err_omp_unexpected_directive : Error<
964  "unexpected OpenMP directive '#pragma omp %0'">;
965def err_omp_expected_punc : Error<
966  "expected ',' or ')' in '%0' %select{clause|directive}1">;
967def err_omp_unexpected_clause : Error<
968  "unexpected OpenMP clause '%0' in directive '#pragma omp %1'">;
969def err_omp_immediate_directive : Error<
970  "'#pragma omp %0' %select{|with '%2' clause }1cannot be an immediate substatement">;
971def err_omp_expected_identifier_for_critical : Error<
972  "expected identifier specifying the name of the 'omp critical' directive">;
973def err_omp_expected_reduction_identifier : Error<
974  "expected identifier or one of the following operators: '+', '-', '*', '&', '|', '^', '&&', or '||'">;
975def err_omp_decl_in_declare_simd : Error<
976  "function declaration is expected after 'declare simd' directive">;
977def err_omp_unknown_map_type : Error<
978  "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">;
979def err_omp_unknown_map_type_modifier : Error<
980  "incorrect map type modifier, expected 'always'">;
981def err_omp_map_type_missing : Error<
982  "missing map type">;
983def err_omp_declare_simd_inbranch_notinbranch : Error<
984  "unexpected '%0' clause, '%1' is specified already">;
985def err_expected_end_declare_target : Error<
986  "expected '#pragma omp end declare target'">;
987def err_omp_declare_target_unexpected_clause: Error<
988  "unexpected '%0' clause, only 'to' or 'link' clauses expected">;
989
990// Pragma loop support.
991def err_pragma_loop_missing_argument : Error<
992  "missing argument; expected %select{an integer value|"
993  "'enable'%select{|, 'full'}1%select{|, 'assume_safety'}2 or 'disable'}0">;
994def err_pragma_loop_invalid_option : Error<
995  "%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, "
996  "vectorize_width, interleave, interleave_count, unroll, unroll_count, or distribute">;
997def err_pragma_invalid_keyword : Error<
998  "invalid argument; expected 'enable'%select{|, 'full'}0%select{|, 'assume_safety'}1 or 'disable'">;
999
1000// Pragma unroll support.
1001def warn_pragma_unroll_cuda_value_in_parens : Warning<
1002  "argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
1003  InGroup<CudaCompat>;
1004} // end of Parse Issue category.
1005
1006let CategoryName = "Modules Issue" in {
1007def err_module_expected_ident : Error<
1008  "expected a module name after module import">;
1009def err_module_expected_semi : Error<
1010  "expected ';' after module name">;
1011def err_missing_before_module_end : Error<"expected %0 at end of module">;
1012}
1013
1014let CategoryName = "Generics Issue" in {
1015
1016def err_objc_expected_type_parameter : Error<
1017  "expected type parameter name">;
1018
1019def err_objc_parameterized_implementation : Error<
1020  "@implementation cannot have type parameters">;
1021
1022def err_objc_type_args_after_protocols : Error<
1023  "protocol qualifiers must precede type arguments">;
1024}
1025
1026let CategoryName = "Coroutines Issue" in {
1027def err_for_co_await_not_range_for : Error<
1028  "'co_await' modifier can only be applied to range-based for loop">;
1029}
1030
1031} // end of Parser diagnostics
1032