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 = "Parse Issue" in {
23 def ext_empty_source_file : Extension<"ISO C forbids an empty source file">;
24 def ext_top_level_semi : Extension<
25 "extra ';' outside of a function">;
26 def ext_extra_struct_semi : Extension<
27 "extra ';' inside a %0">;
28 def ext_extra_ivar_semi : Extension<
29 "extra ';' inside instance variable list">;
31 def ext_duplicate_declspec : Extension<"duplicate '%0' declaration specifier">;
32 def ext_plain_complex : ExtWarn<
33 "plain '_Complex' requires a type specifier; assuming '_Complex double'">;
34 def ext_integer_complex : Extension<
35 "complex integer types are an extension">;
36 def ext_thread_before : Extension<"'__thread' before 'static'">;
38 def ext_empty_struct_union : Extension<"empty %select{struct|union}0 "
39 "(accepted as an extension) has size 0 in C, size 1 in C++">,
41 def error_empty_enum : Error<"use of empty enum">;
42 def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
43 def err_invalid_short_spec : Error<"'short %0' is invalid">;
44 def err_invalid_long_spec : Error<"'long %0' is invalid">;
45 def err_invalid_longlong_spec : Error<"'long long %0' is invalid">;
46 def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
47 def err_friend_storage_spec : Error<"'%0' is invalid in friend declarations">;
49 def ext_ident_list_in_param : Extension<
50 "type-less parameter names in function declaration">;
51 def ext_c99_variable_decl_in_for_loop : Extension<
52 "variable declaration in for loop is a C99-specific feature">;
53 def ext_c99_compound_literal : Extension<
54 "compound literals are a C99-specific feature">;
55 def ext_enumerator_list_comma : Extension<
56 "commas at the end of enumerator lists are a %select{C99|C++11}0-specific "
58 def err_enumerator_list_missing_comma : Error<
59 "missing ',' between enumerators">;
60 def err_enumerator_unnamed_no_def : Error<
61 "unnamed enumeration must be a definition">;
62 def ext_ms_enum_fixed_underlying_type : Extension<
63 "enumeration types with a fixed underlying type are a Microsoft extension">,
66 def ext_c1x_generic_selection : Extension<
67 "generic selections are a C1X-specific feature">, InGroup<C1X>;
68 def err_duplicate_default_assoc : Error<
69 "duplicate default generic association">;
70 def note_previous_default_assoc : Note<
71 "previous default generic association is here">;
73 def ext_c1x_alignas : Extension<
74 "_Alignas is a C1X-specific feature">, InGroup<C1X>;
76 def ext_gnu_indirect_goto : Extension<
77 "use of GNU indirect-goto extension">, InGroup<GNU>;
78 def ext_gnu_address_of_label : Extension<
79 "use of GNU address-of-label extension">, InGroup<GNU>;
80 def ext_gnu_local_label : Extension<
81 "use of GNU locally declared label extension">, InGroup<GNU>;
82 def ext_gnu_statement_expr : Extension<
83 "use of GNU statement expression extension">, InGroup<GNU>;
84 def ext_gnu_conditional_expr : Extension<
85 "use of GNU ?: expression extension, eliding middle term">, InGroup<GNU>;
86 def ext_gnu_empty_initializer : Extension<
87 "use of GNU empty initializer extension">, InGroup<GNU>;
88 def ext_gnu_array_range : Extension<"use of GNU array range extension">,
89 InGroup<GNUDesignator>;
90 def ext_gnu_missing_equal_designator : ExtWarn<
91 "use of GNU 'missing =' extension in designator">,
92 InGroup<GNUDesignator>;
93 def err_expected_equal_designator : Error<"expected '=' or another designator">;
94 def ext_gnu_old_style_field_designator : ExtWarn<
95 "use of GNU old-style field designator extension">,
96 InGroup<GNUDesignator>;
97 def ext_gnu_case_range : Extension<"use of GNU case range extension">,
101 def err_parse_error : Error<"parse error">;
102 def err_expected_expression : Error<"expected expression">;
103 def err_expected_type : Error<"expected a type">;
104 def err_expected_external_declaration : Error<"expected external declaration">;
105 def err_expected_ident : Error<"expected identifier">;
106 def err_expected_ident_lparen : Error<"expected identifier or '('">;
107 def err_expected_ident_lbrace : Error<"expected identifier or '{'">;
108 def err_expected_lbrace : Error<"expected '{'">;
109 def err_expected_lparen : Error<"expected '('">;
110 def err_expected_lparen_or_lbrace : Error<"expected '('or '{'">;
111 def err_expected_rparen : Error<"expected ')'">;
112 def err_expected_lsquare : Error<"expected '['">;
113 def err_expected_rsquare : Error<"expected ']'">;
114 def err_expected_rbrace : Error<"expected '}'">;
115 def err_expected_greater : Error<"expected '>'">;
116 def err_expected_ggg : Error<"expected '>>>'">;
117 def err_expected_semi_declaration : Error<
118 "expected ';' at end of declaration">;
119 def err_expected_semi_decl_list : Error<
120 "expected ';' at end of declaration list">;
121 def ext_expected_semi_decl_list : ExtWarn<
122 "expected ';' at end of declaration list">;
123 def err_expected_member_name_or_semi : Error<
124 "expected member name or ';' after declaration specifiers">;
125 def err_function_declared_typedef : Error<
126 "function definition declared 'typedef'">;
127 def err_iboutletcollection_builtintype : Error<
128 "type argument of iboutletcollection attribute cannot be a builtin type">;
130 def err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">;
131 def err_at_in_class : Error<"unexpected '@' in member specification">;
133 def err_expected_fn_body : Error<
134 "expected function body after function declarator">;
135 def err_expected_method_body : Error<"expected method body">;
136 def err_invalid_token_after_toplevel_declarator : Error<
137 "expected ';' after top level declarator">;
138 def err_invalid_equalequal_after_declarator : Error<
139 "invalid '==' at end of declaration; did you mean '='?">;
140 def err_expected_statement : Error<"expected statement">;
141 def err_expected_lparen_after : Error<"expected '(' after '%0'">;
142 def err_expected_lparen_after_id : Error<"expected '(' after %0">;
143 def err_expected_less_after : Error<"expected '<' after '%0'">;
144 def err_expected_equal_after : Error<"expected '=' after %0">;
145 def err_expected_comma : Error<"expected ','">;
146 def err_expected_lbrace_in_compound_literal : Error<
147 "expected '{' in compound literal">;
148 def err_expected_while : Error<"expected 'while' in do/while loop">;
150 def err_expected_semi_after : Error<"expected ';' after %0">;
151 def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">;
152 def err_expected_semi_after_expr : Error<"expected ';' after expression">;
153 def err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">;
155 def err_expected_semi_after_method_proto : Error<
156 "expected ';' after method prototype">;
157 def err_expected_semi_after_namespace_name : Error<
158 "expected ';' after namespace name">;
159 def err_unexpected_namespace_attributes_alias : Error<
160 "attributes can not be specified on namespace alias">;
161 def err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
162 def err_namespace_nonnamespace_scope : Error<
163 "namespaces can only be defined in global or namespace scope">;
164 def err_nested_namespaces_with_double_colon : Error<
165 "nested namespace definition must define each namespace separately">;
166 def err_expected_semi_after_attribute_list : Error<
167 "expected ';' after attribute list">;
168 def err_expected_semi_after_static_assert : Error<
169 "expected ';' after static_assert">;
170 def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
171 def err_expected_colon_after : Error<"expected ':' after %0">;
172 def err_label_end_of_compound_statement : Error<
173 "label at end of compound statement: expected statement">;
174 def err_address_of_label_outside_fn : Error<
175 "use of address-of-label extension outside of a function body">;
176 def err_expected_string_literal : Error<"expected string literal">;
177 def err_expected_asm_operand : Error<
178 "expected string literal or '[' for asm operand">, CatInlineAsm;
179 def err_expected_selector_for_method : Error<
180 "expected selector for Objective-C method">;
181 def err_expected_property_name : Error<"expected property name">;
183 def err_unexpected_at : Error<"unexpected '@' in program">;
185 def err_invalid_reference_qualifier_application : Error<
186 "'%0' qualifier may not be applied to a reference">;
187 def err_illegal_decl_reference_to_reference : Error<
188 "%0 declared as a reference to a reference">;
189 def ext_rvalue_reference : ExtWarn<
190 "rvalue references are a C++11 extension">, InGroup<CXX11>;
191 def ext_ref_qualifier : ExtWarn<
192 "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>;
193 def ext_inline_namespace : ExtWarn<
194 "inline namespaces are a C++11 feature">, InGroup<CXX11>;
195 def err_generalized_initializer_lists : Error<
196 "generalized initializer lists are a C++11 extension unsupported in Clang">;
197 def ext_generalized_initializer_lists : ExtWarn<
198 "generalized initializer lists are a C++11 extension unsupported in Clang">,
200 def ext_auto_type_specifier : ExtWarn<
201 "'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
202 def warn_auto_storage_class : Warning<
203 "'auto' storage class specifier is redundant and incompatible with C++11">,
204 InGroup<CXX11Compat>;
205 def ext_auto_storage_class : ExtWarn<
206 "'auto' storage class specifier is not permitted in C++11, and will not "
207 "be supported in future releases">;
208 def ext_for_range : ExtWarn<
209 "range-based for loop is a C++11 extension">, InGroup<CXX11>;
210 def err_argument_required_after_attribute : Error<
211 "argument required after attribute">;
212 def err_missing_param : Error<"expected parameter declarator">;
213 def err_missing_comma_before_ellipsis : Error<
214 "C requires a comma prior to the ellipsis in a variadic function type">;
215 def err_unexpected_typedef_ident : Error<
216 "unexpected type name %0: expected identifier">;
217 def err_expected_class_name : Error<"expected class name">;
218 def err_unspecified_vla_size_with_static : Error<
219 "'static' may not be used with an unspecified variable length array size">;
221 def err_expected_case_before_expression: Error<
222 "expected 'case' keyword before expression">;
225 def err_typename_requires_specqual : Error<
226 "type name requires a specifier or qualifier">;
227 def err_typename_invalid_storageclass : Error<
228 "type name does not allow storage class to be specified">;
229 def err_typename_invalid_functionspec : Error<
230 "type name does not allow function specifier to be specified">;
231 def err_typename_identifiers_only : Error<
232 "typename is allowed for identifiers only">;
234 def err_invalid_decl_spec_combination : Error<
235 "cannot combine with previous '%0' declaration specifier">;
236 def err_invalid_vector_decl_spec_combination : Error<
237 "cannot combine with previous '%0' declaration specifier. "
238 "'__vector' must be first">;
239 def err_invalid_pixel_decl_spec_combination : Error<
240 "'__pixel' must be preceded by '__vector'. "
241 "'%0' declaration specifier not allowed here">;
242 def err_invalid_vector_decl_spec : Error<
243 "cannot use '%0' with '__vector'">;
244 def err_invalid_vector_bool_decl_spec : Error<
245 "cannot use '%0' with '__vector bool'">;
246 def warn_vector_long_decl_spec_combination : Warning<
247 "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
248 def err_friend_invalid_in_context : Error<
249 "'friend' used outside of class">;
250 def err_unknown_typename : Error<
251 "unknown type name %0">;
252 def err_use_of_tag_name_without_tag : Error<
253 "must use '%1' tag to refer to type %0%select{| in this scope}2">;
254 def err_templated_using_directive : Error<
255 "cannot template a using directive">;
256 def err_templated_using_declaration : Error<
257 "cannot template a using declaration">;
258 def err_expected_ident_in_using : Error<
259 "expected an identifier in using directive">;
260 def err_unexected_colon_in_nested_name_spec : Error<
261 "unexpected ':' in nested name specifier">;
262 def err_bool_redeclaration : Error<
263 "redeclaration of C++ built-in type 'bool'">;
264 def ext_c1x_static_assert : Extension<
265 "_Static_assert is a C1X-specific feature">, InGroup<C1X>;
267 /// Objective-C parser diagnostics
268 def err_expected_minus_or_plus : Error<
269 "method type specifier must start with '-' or '+'">;
270 def err_objc_no_attributes_on_category : Error<
271 "attributes may not be specified on a category">;
272 def err_objc_missing_end : Error<"missing @end">;
273 def warn_objc_protocol_qualifier_missing_id : Warning<
274 "protocol qualifiers without 'id' is archaic">;
275 def err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">;
276 def err_illegal_super_cast : Error<
277 "cannot cast 'super' (it isn't an expression)">;
279 let CategoryName = "Automatic Reference Counting Issue" in {
280 def err_arc_bridge_retain : Error<
281 "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">;
284 def err_objc_illegal_visibility_spec : Error<
285 "illegal visibility specification">;
286 def err_objc_illegal_interface_qual : Error<"illegal interface qualifier">;
287 def err_objc_expected_equal_for_getter : Error<
288 "expected '=' for Objective-C getter">;
289 def err_objc_expected_equal_for_setter : Error<
290 "expected '=' for Objective-C setter">;
291 def err_objc_expected_selector_for_getter_setter : Error<
292 "expected selector for Objective-C %select{setter|getter}0">;
293 def err_objc_property_requires_field_name : Error<
294 "property requires fields to be named">;
295 def err_objc_property_bitfield : Error<"property name cannot be a bitfield">;
296 def err_objc_expected_property_attr : Error<"unknown property attribute %0">;
297 def err_objc_properties_require_objc2 : Error<
298 "properties are an Objective-C 2 feature">;
299 def err_objc_unexpected_attr : Error<
300 "prefix attribute must be followed by an interface or protocol">;
301 def err_objc_directive_only_in_protocol : Error<
302 "directive may only be specified in protocols only">;
303 def err_missing_catch_finally : Error<
304 "@try statement without a @catch and @finally clause">;
305 def err_objc_concat_string : Error<"unexpected token after Objective-C string">;
306 def err_missing_sel_definition : Error<"cannot find definition of 'SEL'">;
307 def err_missing_id_definition : Error<"cannot find definition of 'id'">;
308 def err_missing_proto_definition : Error<
309 "cannot find definition of 'Protocol'">;
310 def err_missing_class_definition : Error<"cannot find definition of 'Class'">;
311 def err_expected_implementation : Error<
312 "@end must appear in an @implementation context">;
313 def error_property_ivar_decl : Error<
314 "property synthesize requires specification of an ivar">;
315 def err_synthesized_property_name : Error<
316 "expected a property name in @synthesize">;
317 def warn_semicolon_before_method_body : Warning<
318 "semicolon before method body is ignored">,
319 InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore;
321 def err_expected_field_designator : Error<
322 "expected a field designator, such as '.field = 4'">;
324 def err_declaration_does_not_declare_param : Error<
325 "declaration does not declare a parameter">;
326 def err_no_matching_param : Error<"parameter named %0 is missing">;
328 /// C++ parser diagnostics
329 def err_expected_unqualified_id : Error<
330 "expected %select{identifier|unqualified-id}0">;
331 def err_func_def_no_params : Error<
332 "function definition does not declare parameters">;
333 def err_expected_lparen_after_type : Error<
334 "expected '(' for function-style cast or type construction">;
335 def err_expected_equal_after_declarator : Error<
336 "expected '=' after declarator">;
337 def warn_parens_disambiguated_as_function_decl : Warning<
338 "parentheses were disambiguated as a function declarator">;
339 def err_expected_member_or_base_name : Error<
340 "expected class member or base class name">;
341 def err_expected_lbrace_after_base_specifiers : Error<
342 "expected '{' after base class list">;
343 def ext_ellipsis_exception_spec : Extension<
344 "exception specification of '...' is a Microsoft extension">;
345 def err_dynamic_and_noexcept_specification : Error<
346 "cannot have both throw() and noexcept() clause on the same function">;
347 def err_expected_catch : Error<"expected catch">;
348 def err_expected_lbrace_or_comma : Error<"expected '{' or ','">;
349 def err_using_namespace_in_class : Error<
350 "'using namespace' is not allowed in classes">;
351 def err_destructor_tilde_identifier : Error<
352 "expected a class name after '~' to name a destructor">;
353 def err_destructor_template_id : Error<
354 "destructor name %0 does not refer to a template">;
355 def err_default_arg_unparsed : Error<
356 "unexpected end of default argument expression">;
357 def err_parser_impl_limit_overflow : Error<
358 "parser recursion limit reached, program too complex">, DefaultFatal;
360 // C++ derived classes
361 def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
363 // C++ operator overloading
364 def err_operator_string_not_empty : Error<
365 "string literal after 'operator' must be '\"\"'">;
368 def err_anon_type_definition : Error<
369 "declaration of anonymous %0 must be a definition">;
370 def err_default_delete_in_multiple_declaration : Error<
371 "'= %select{default|delete}0' is a function definition and must occur in a "
372 "standalone declaration">;
374 def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
375 InGroup<CXX98Compat>, DefaultIgnore;
376 def warn_cxx98_compat_attribute : Warning<
377 "attributes are incompatible with C++98">,
378 InGroup<CXX98Compat>, DefaultIgnore;
379 def err_cxx0x_attribute_forbids_arguments : Error<
380 "C++11 attribute '%0' cannot have an argument list">;
381 def err_cxx0x_attribute_requires_arguments : Error<
382 "C++1 attribute '%0' must have an argument list">;
383 def err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
386 def err_expected_template : Error<"expected template">;
387 def err_unknown_template_name : Error<
388 "unknown template name %0">;
389 def err_expected_comma_greater : Error<
390 "expected ',' or '>' in template-parameter-list">;
391 def err_expected_type_id_after : Error<"expected type-id after '%0'">;
392 def err_expected_class_before : Error<"expected 'class' before '%0'">;
393 def err_template_spec_syntax_non_template : Error<
394 "identifier followed by '<' indicates a class template specialization but "
395 "%0 %select{does not refer to a template|refers to a function "
396 "template|<unused>|refers to a template template parameter}1">;
397 def err_id_after_template_in_nested_name_spec : Error<
398 "expected template name after 'template' keyword in nested name specifier">;
399 def err_id_after_template_in_typename_spec : Error<
400 "expected template name after 'template' keyword in typename specifier">;
401 def err_less_after_template_name_in_nested_name_spec : Error<
402 "expected '<' after 'template %0' in nested name specifier">;
403 def err_two_right_angle_brackets_need_space : Error<
404 "a space is required between consecutive right angle brackets (use '> >')">;
405 def warn_cxx0x_right_shift_in_template_arg : Warning<
406 "use of right-shift operator ('>>') in template argument will require "
407 "parentheses in C++11">;
408 def err_multiple_template_declarators : Error<
409 "%select{|a template declaration|an explicit template specialization|"
410 "an explicit template instantiation}0 can "
411 "only %select{|declare|declare|instantiate}0 a single entity">;
412 def err_explicit_instantiation_with_definition : Error<
413 "explicit template instantiation cannot have a definition; if this "
414 "definition is meant to be an explicit specialization, add '<>' after the "
415 "'template' keyword">;
416 def err_enum_template : Error<"enumeration cannot be a template">;
418 def err_missing_dependent_template_keyword : Error<
419 "use 'template' keyword to treat '%0' as a dependent template name">;
420 def warn_missing_dependent_template_keyword : ExtWarn<
421 "use 'template' keyword to treat '%0' as a dependent template name">;
423 def warn_static_inline_explicit_inst_ignored : Warning<
424 "ignoring '%select{static|inline}0' keyword on explicit template "
427 // Constructor template diagnostics.
428 def err_out_of_line_constructor_template_id : Error<
429 "out-of-line constructor for %0 cannot have template arguments">;
430 def err_out_of_line_template_id_names_constructor : Error<
431 "qualified reference to %0 is a constructor name rather than a "
432 "template name wherever a constructor can be declared">;
433 def err_out_of_line_type_names_constructor : Error<
434 "qualified reference to %0 is a constructor name rather than a "
435 "type wherever a constructor can be declared">;
437 def err_expected_qualified_after_typename : Error<
438 "expected a qualified name after 'typename'">;
439 def warn_expected_qualified_after_typename : ExtWarn<
440 "expected a qualified name after 'typename'">;
441 def err_expected_semi_after_tagdecl : Error<
442 "expected ';' after %0">;
444 def err_typename_refers_to_non_type_template : Error<
445 "typename specifier refers to a non-template">;
446 def err_expected_type_name_after_typename : Error<
447 "expected an identifier or template-id after '::'">;
448 def err_explicit_spec_non_template : Error<
449 "explicit %select{specialization|instantiation}0 of non-template "
450 "%select{class|struct|union}1 %2">;
452 def err_default_template_template_parameter_not_template : Error<
453 "default template argument for a template template parameter must be a class "
456 def err_ctor_init_missing_comma : Error<
457 "missing ',' between base or member initializers">;
460 def err_friend_decl_defines_class : Error<
461 "cannot define a type in a friend declaration">;
462 def err_missing_whitespace_digraph : Error<
463 "found '<::' after a "
464 "%select{template name|const_cast|dynamic_cast|reinterpret_cast|static_cast}0"
465 " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">;
467 def warn_deleted_function_accepted_as_extension: ExtWarn<
468 "deleted function definition accepted as a C++11 extension">, InGroup<CXX11>;
469 def warn_defaulted_function_accepted_as_extension: ExtWarn<
470 "defaulted function definition accepted as a C++11 extension">,
473 // C++11 in-class member initialization
474 def warn_nonstatic_member_init_accepted_as_extension: ExtWarn<
475 "in-class initialization of non-static data member accepted as a C++11 extension">,
477 def err_bitfield_member_init: Error<
478 "bitfield member cannot have an in-class initializer">;
479 def err_incomplete_array_member_init: Error<
480 "array bound cannot be deduced from an in-class initializer">;
482 // C++11 alias-declaration
483 def ext_alias_declaration : ExtWarn<
484 "alias declarations accepted as a C++11 extension">, InGroup<CXX11>;
485 def err_alias_declaration_not_identifier : Error<
486 "name defined in alias declaration must be an identifier">;
487 def err_alias_declaration_specialization : Error<
488 "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">;
490 // C++11 override control
491 def ext_override_control_keyword : Extension<
492 "'%0' keyword accepted as a C++11 extension">, InGroup<CXX11>;
494 def err_duplicate_virt_specifier : Error<
495 "class member already marked '%0'">;
496 def err_duplicate_class_virt_specifier : Error<
497 "class already marked '%0'">;
499 def err_scoped_enum_missing_identifier : Error<
500 "scoped enumeration requires a name">;
502 def err_expected_parameter_pack : Error<
503 "expected the name of a parameter pack">;
504 def err_paren_sizeof_parameter_pack : Error<
505 "missing parentheses around the size of parameter pack %0">;
506 def err_sizeof_parameter_pack : Error<
507 "expected parenthesized parameter pack name in 'sizeof...' expression">;
509 // C++11 lambda expressions
510 def err_expected_comma_or_rsquare : Error<
511 "expected ',' or ']' in lambda capture list">;
512 def err_this_captured_by_reference : Error<
513 "'this' cannot be captured by reference">;
514 def err_expected_capture : Error<
515 "expected variable name or 'this' in lambda capture list">;
516 def err_expected_lambda_body : Error<"expected body of lambda expression">;
518 // Availability attribute
519 def err_expected_version : Error<
520 "expected a version of the form 'major[.minor[.subminor]]'">;
521 def err_zero_version : Error<
522 "version number must have non-zero major, minor, or sub-minor version">;
523 def err_availability_expected_platform : Error<
524 "expected a platform name, e.g., 'macosx'">;
525 def err_availability_expected_change : Error<
526 "expected 'introduced', 'deprecated', or 'obsoleted'">;
527 def err_availability_unknown_change : Error<
528 "%0 is not an availability stage; use 'introduced', 'deprecated', or "
530 def err_availability_redundant : Error<
531 "redundant %0 availability change; only the last specified change will " "be used">;
532 def warn_availability_and_unavailable : Warning<
533 "'unavailable' availability overrides all other availability information">;
535 // Language specific pragmas
536 // - Generic warnings
537 def warn_pragma_expected_lparen : Warning<
538 "missing '(' after '#pragma %0' - ignoring">;
539 def warn_pragma_expected_rparen : Warning<
540 "missing ')' after '#pragma %0' - ignoring">;
541 def warn_pragma_expected_identifier : Warning<
542 "expected identifier in '#pragma %0' - ignored">;
543 def warn_pragma_ms_struct : Warning<
544 "incorrect use of '#pragma ms_struct on|off' - ignored">;
545 def warn_pragma_extra_tokens_at_eol : Warning<
546 "extra tokens at end of '#pragma %0' - ignored">;
548 def warn_pragma_options_expected_align : Warning<
549 "expected 'align' following '#pragma options' - ignored">;
550 def warn_pragma_align_expected_equal : Warning<
551 "expected '=' following '#pragma %select{align|options align}0' - ignored">;
552 def warn_pragma_align_invalid_option : Warning<
553 "invalid alignment option in '#pragma %select{align|options align}0' - ignored">;
555 def warn_pragma_pack_invalid_action : Warning<
556 "unknown action for '#pragma pack' - ignored">;
557 def warn_pragma_pack_invalid_constant : Warning<
558 "invalid constant for '#pragma pack', expected %0 - ignored">;
559 def warn_pragma_pack_malformed : Warning<
560 "expected integer or identifier in '#pragma pack' - ignored">;
562 def warn_pragma_unused_expected_var : Warning<
563 "expected '#pragma unused' argument to be a variable name">;
564 def warn_pragma_unused_expected_punc : Warning<
565 "expected ')' or ',' in '#pragma unused'">;
567 // OpenCL Section 6.8.g
568 def err_not_opencl_storage_class_specifier : Error<
569 "OpenCL does not support the '%0' storage class specifier">;
571 // OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
572 def warn_pragma_expected_colon : Warning<
573 "missing ':' after %0 - ignoring">;
574 def warn_pragma_expected_enable_disable : Warning<
575 "expected 'enable' or 'disable' - ignoring">;
576 def warn_pragma_unknown_extension : Warning<
577 "unknown OpenCL extension %0 - ignoring">;
579 def err_seh_expected_handler : Error<
580 "expected '__except' or '__finally' block">;
582 def err_seh___except_block : Error<
583 "%0 only allowed in __except block">;
585 def err_seh___except_filter : Error<
586 "%0 only allowed in __except filter expression">;
588 def err_seh___finally_block : Error<
589 "%0 only allowed in __finally block">;
591 } // end of Parse Issue category.
593 let CategoryName = "Modules Issue" in {
594 def err_module_expected_ident : Error<
595 "expected a module name after '__import_module__'">;
596 def err_module_expected_semi : Error<
597 "expected a semicolon name after module name">;
600 } // end of Parser diagnostics