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