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