1//==--- DiagnosticParseKinds.td - libparse diagnostics --------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10//===----------------------------------------------------------------------===// 11// Parser Diagnostics 12//===----------------------------------------------------------------------===// 13 14let Component = "Parse" in { 15 16def w_asm_qualifier_ignored : Warning<"ignored %0 qualifier on asm">, 17 CatInlineAsm; 18def warn_file_asm_volatile : Warning< 19 "meaningless 'volatile' on asm outside function">, CatInlineAsm; 20 21def warn_unsupported_msasm : Warning< 22 "MS-style inline assembly is not supported">, InGroup<Microsoft>; 23 24let CategoryName = "Parse Issue" in { 25 26def ext_empty_translation_unit : Extension< 27 "ISO C requires a translation unit to contain at least one declaration.">, 28 InGroup<DiagGroup<"empty-translation-unit">>; 29def warn_cxx98_compat_top_level_semi : Warning< 30 "extra ';' outside of a function is incompatible with C++98">, 31 InGroup<CXX98CompatPedantic>, DefaultIgnore; 32def ext_extra_semi : Extension< 33 "extra ';' %select{" 34 "outside of a function|" 35 "inside a %1|" 36 "inside instance variable list|" 37 "after member function definition}0">, 38 InGroup<ExtraSemi>; 39def ext_extra_semi_cxx11 : Extension< 40 "extra ';' outside of a function is a C++11 extension">, 41 InGroup<CXX11ExtraSemi>; 42def warn_extra_semi_after_mem_fn_def : Warning< 43 "extra ';' after member function definition">, 44 InGroup<ExtraSemi>, DefaultIgnore; 45 46def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">, 47 InGroup<DuplicateDeclSpecifier>; 48def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">, 49 InGroup<DuplicateDeclSpecifier>; 50def ext_plain_complex : ExtWarn< 51 "plain '_Complex' requires a type specifier; assuming '_Complex double'">; 52def ext_integer_complex : Extension< 53 "complex integer types are an extension">; 54def ext_thread_before : Extension<"'__thread' before '%0'">; 55 56def ext_empty_struct_union : Extension< 57 "empty %select{struct|union}0 is a GNU extension">, InGroup<GNU>; 58def warn_empty_struct_union_compat : Warning<"empty %select{struct|union}0 " 59 "has size 0 in C, size 1 in C++">, InGroup<CXXCompat>, DefaultIgnore; 60def error_empty_enum : Error<"use of empty enum">; 61def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">; 62def err_invalid_short_spec : Error<"'short %0' is invalid">; 63def err_invalid_long_spec : Error<"'long %0' is invalid">; 64def err_invalid_longlong_spec : Error<"'long long %0' is invalid">; 65def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">; 66def err_friend_storage_spec : Error<"'%0' is invalid in friend declarations">; 67 68def ext_ident_list_in_param : Extension< 69 "type-less parameter names in function declaration">; 70def ext_c99_variable_decl_in_for_loop : Extension< 71 "variable declaration in for loop is a C99-specific feature">, InGroup<C99>; 72def ext_c99_compound_literal : Extension< 73 "compound literals are a C99-specific feature">, InGroup<C99>; 74def ext_c99_flexible_array_member : Extension< 75 "Flexible array members are a C99-specific feature">, InGroup<C99>; 76def ext_enumerator_list_comma_c : Extension< 77 "commas at the end of enumerator lists are a C99-specific " 78 "feature">, InGroup<C99>; 79def ext_enumerator_list_comma_cxx : Extension< 80 "commas at the end of enumerator lists are a C++11 extension">, 81 InGroup<CXX11>; 82def warn_cxx98_compat_enumerator_list_comma : Warning< 83 "commas at the end of enumerator lists are incompatible with C++98">, 84 InGroup<CXX98CompatPedantic>, DefaultIgnore; 85def err_enumerator_list_missing_comma : Error< 86 "missing ',' between enumerators">; 87def err_enumerator_unnamed_no_def : Error< 88 "unnamed enumeration must be a definition">; 89def ext_ms_enum_fixed_underlying_type : Extension< 90 "enumeration types with a fixed underlying type are a Microsoft extension">, 91 InGroup<Microsoft>; 92def warn_cxx98_compat_enum_fixed_underlying_type : Warning< 93 "enumeration types with a fixed underlying type are incompatible with C++98">, 94 InGroup<CXX98Compat>, DefaultIgnore; 95def warn_cxx98_compat_alignof : Warning< 96 "alignof expressions are incompatible with C++98">, 97 InGroup<CXX98Compat>, DefaultIgnore; 98 99def warn_microsoft_dependent_exists : Warning< 100 "dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">, 101 InGroup<DiagGroup<"microsoft-exists">>; 102 103def ext_c11_generic_selection : Extension< 104 "generic selections are a C11-specific feature">, InGroup<C11>; 105def err_duplicate_default_assoc : Error< 106 "duplicate default generic association">; 107def note_previous_default_assoc : Note< 108 "previous default generic association is here">; 109 110def ext_c11_alignment : Extension< 111 "%0 is a C11-specific feature">, InGroup<C11>; 112 113def ext_gnu_indirect_goto : Extension< 114 "use of GNU indirect-goto extension">, InGroup<GNU>; 115def ext_gnu_address_of_label : Extension< 116 "use of GNU address-of-label extension">, InGroup<GNU>; 117def ext_gnu_local_label : Extension< 118 "use of GNU locally declared label extension">, InGroup<GNU>; 119def ext_gnu_statement_expr : Extension< 120 "use of GNU statement expression extension">, InGroup<GNU>; 121def ext_gnu_conditional_expr : Extension< 122 "use of GNU ?: expression extension, eliding middle term">, InGroup<GNU>; 123def ext_gnu_empty_initializer : Extension< 124 "use of GNU empty initializer extension">, InGroup<GNU>; 125def ext_gnu_array_range : Extension<"use of GNU array range extension">, 126 InGroup<GNUDesignator>; 127def ext_gnu_missing_equal_designator : ExtWarn< 128 "use of GNU 'missing =' extension in designator">, 129 InGroup<GNUDesignator>; 130def err_expected_equal_designator : Error<"expected '=' or another designator">; 131def ext_gnu_old_style_field_designator : ExtWarn< 132 "use of GNU old-style field designator extension">, 133 InGroup<GNUDesignator>; 134def ext_gnu_case_range : Extension<"use of GNU case range extension">, 135 InGroup<GNU>; 136 137// Generic errors. 138def err_expected_expression : Error<"expected expression">; 139def err_expected_type : Error<"expected a type">; 140def err_expected_external_declaration : Error<"expected external declaration">; 141def err_extraneous_closing_brace : Error<"extraneous closing brace ('}')">; 142def err_expected_ident : Error<"expected identifier">; 143def err_expected_ident_lparen : Error<"expected identifier or '('">; 144def err_expected_ident_lbrace : Error<"expected identifier or '{'">; 145def err_expected_lbrace : Error<"expected '{'">; 146def err_expected_lparen : Error<"expected '('">; 147def err_expected_lparen_or_lbrace : Error<"expected '('or '{'">; 148def err_expected_rparen : Error<"expected ')'">; 149def err_expected_lsquare : Error<"expected '['">; 150def err_expected_rsquare : Error<"expected ']'">; 151def err_expected_rbrace : Error<"expected '}'">; 152def err_expected_greater : Error<"expected '>'">; 153def err_expected_ggg : Error<"expected '>>>'">; 154def err_expected_semi_declaration : Error< 155 "expected ';' at end of declaration">; 156def err_expected_semi_decl_list : Error< 157 "expected ';' at end of declaration list">; 158def ext_expected_semi_decl_list : ExtWarn< 159 "expected ';' at end of declaration list">; 160def err_expected_member_name_or_semi : Error< 161 "expected member name or ';' after declaration specifiers">; 162def err_function_declared_typedef : Error< 163 "function definition declared 'typedef'">; 164def err_iboutletcollection_builtintype : Error< 165 "type argument of iboutletcollection attribute cannot be a builtin type">; 166def err_iboutletcollection_with_protocol : Error< 167 "invalid argument of iboutletcollection attribute">; 168def err_at_defs_cxx : Error<"@defs is not supported in Objective-C++">; 169def err_at_in_class : Error<"unexpected '@' in member specification">; 170 171def err_expected_fn_body : Error< 172 "expected function body after function declarator">; 173def warn_attribute_on_function_definition : Warning< 174 "GCC does not allow %0 attribute in this position on a function definition">, 175 InGroup<GccCompat>; 176def warn_attribute_no_decl : Warning< 177 "attribute %0 ignored, because it is not attached to a declaration">, 178 InGroup<IgnoredAttributes>; 179def err_expected_method_body : Error<"expected method body">; 180def err_invalid_token_after_toplevel_declarator : Error< 181 "expected ';' after top level declarator">; 182def err_invalid_token_after_declarator_suggest_equal : Error< 183 "invalid '%0' at end of declaration; did you mean '='?">; 184def err_expected_statement : Error<"expected statement">; 185def err_expected_lparen_after : Error<"expected '(' after '%0'">; 186def err_expected_lparen_after_id : Error<"expected '(' after %0">; 187def err_expected_less_after : Error<"expected '<' after '%0'">; 188def err_expected_equal_after : Error<"expected '=' after %0">; 189def err_expected_comma : Error<"expected ','">; 190def err_expected_lbrace_in_compound_literal : Error< 191 "expected '{' in compound literal">; 192def err_expected_while : Error<"expected 'while' in do/while loop">; 193 194def err_expected_semi_after : Error<"expected ';' after %0">; 195def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">; 196def err_expected_semi_after_expr : Error<"expected ';' after expression">; 197def err_extraneous_token_before_semi : Error<"extraneous '%0' before ';'">; 198 199def err_expected_semi_after_method_proto : Error< 200 "expected ';' after method prototype">; 201def err_expected_semi_after_namespace_name : Error< 202 "expected ';' after namespace name">; 203def err_unexpected_namespace_attributes_alias : Error< 204 "attributes can not be specified on namespace alias">; 205def err_inline_namespace_alias : Error<"namespace alias cannot be inline">; 206def err_namespace_nonnamespace_scope : Error< 207 "namespaces can only be defined in global or namespace scope">; 208def err_nested_namespaces_with_double_colon : Error< 209 "nested namespace definition must define each namespace separately">; 210def err_expected_semi_after_attribute_list : Error< 211 "expected ';' after attribute list">; 212def err_expected_semi_after_static_assert : Error< 213 "expected ';' after static_assert">; 214def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">; 215def err_expected_colon_after : Error<"expected ':' after %0">; 216def err_label_end_of_compound_statement : Error< 217 "label at end of compound statement: expected statement">; 218def err_address_of_label_outside_fn : Error< 219 "use of address-of-label extension outside of a function body">; 220def err_expected_string_literal : Error<"expected string literal">; 221def err_asm_operand_wide_string_literal : Error< 222 "cannot use %select{unicode|wide}0 string literal in 'asm'">; 223def err_expected_selector_for_method : Error< 224 "expected selector for Objective-C method">; 225def err_expected_property_name : Error<"expected property name">; 226 227def err_unexpected_at : Error<"unexpected '@' in program">; 228 229def err_invalid_reference_qualifier_application : Error< 230 "'%0' qualifier may not be applied to a reference">; 231def err_illegal_decl_reference_to_reference : Error< 232 "%0 declared as a reference to a reference">; 233def ext_rvalue_reference : ExtWarn< 234 "rvalue references are a C++11 extension">, InGroup<CXX11>; 235def warn_cxx98_compat_rvalue_reference : Warning< 236 "rvalue references are incompatible with C++98">, 237 InGroup<CXX98Compat>, DefaultIgnore; 238def ext_ref_qualifier : ExtWarn< 239 "reference qualifiers on functions are a C++11 extension">, InGroup<CXX11>; 240def warn_cxx98_compat_ref_qualifier : Warning< 241 "reference qualifiers on functions are incompatible with C++98">, 242 InGroup<CXX98Compat>, DefaultIgnore; 243def ext_inline_namespace : ExtWarn< 244 "inline namespaces are a C++11 feature">, InGroup<CXX11>; 245def warn_cxx98_compat_inline_namespace : Warning< 246 "inline namespaces are incompatible with C++98">, 247 InGroup<CXX98Compat>, DefaultIgnore; 248def ext_generalized_initializer_lists : ExtWarn< 249 "generalized initializer lists are a C++11 extension">, 250 InGroup<CXX11>; 251def warn_cxx98_compat_generalized_initializer_lists : Warning< 252 "generalized initializer lists are incompatible with C++98">, 253 InGroup<CXX98Compat>, DefaultIgnore; 254def err_init_list_bin_op : Error<"initializer list cannot be used on the " 255 "%select{left|right}0 hand side of operator '%1'">; 256def warn_cxx98_compat_trailing_return_type : Warning< 257 "trailing return types are incompatible with C++98">, 258 InGroup<CXX98Compat>, DefaultIgnore; 259def ext_auto_type_specifier : ExtWarn< 260 "'auto' type specifier is a C++11 extension">, InGroup<CXX11>; 261def warn_auto_storage_class : Warning< 262 "'auto' storage class specifier is redundant and incompatible with C++11">, 263 InGroup<CXX11Compat>, DefaultIgnore; 264def ext_auto_storage_class : ExtWarn< 265 "'auto' storage class specifier is not permitted in C++11, and will not " 266 "be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>; 267def ext_for_range : ExtWarn< 268 "range-based for loop is a C++11 extension">, InGroup<CXX11>; 269def warn_cxx98_compat_for_range : Warning< 270 "range-based for loop is incompatible with C++98">, 271 InGroup<CXX98Compat>, DefaultIgnore; 272def err_for_range_expected_decl : Error< 273 "for range declaration must declare a variable">; 274def err_argument_required_after_attribute : Error< 275 "argument required after attribute">; 276def err_missing_param : Error<"expected parameter declarator">; 277def err_missing_comma_before_ellipsis : Error< 278 "C requires a comma prior to the ellipsis in a variadic function type">; 279def err_unexpected_typedef_ident : Error< 280 "unexpected type name %0: expected identifier">; 281def warn_cxx98_compat_decltype : Warning< 282 "'decltype' type specifier is incompatible with C++98">, 283 InGroup<CXX98Compat>, DefaultIgnore; 284def err_unexpected_scope_on_base_decltype : Error< 285 "unexpected namespace scope prior to decltype">; 286def err_expected_class_name : Error<"expected class name">; 287def err_expected_class_name_not_template : 288 Error<"'typename' is redundant; base classes are implicitly types">; 289def err_unspecified_vla_size_with_static : Error< 290 "'static' may not be used with an unspecified variable length array size">; 291 292def err_expected_case_before_expression: Error< 293 "expected 'case' keyword before expression">; 294 295// Declarations. 296def err_typename_requires_specqual : Error< 297 "type name requires a specifier or qualifier">; 298def err_typename_invalid_storageclass : Error< 299 "type name does not allow storage class to be specified">; 300def err_typename_invalid_functionspec : Error< 301 "type name does not allow function specifier to be specified">; 302def err_typename_invalid_constexpr : Error< 303 "type name does not allow constexpr specifier to be specified">; 304def err_typename_identifiers_only : Error< 305 "typename is allowed for identifiers only">; 306 307def err_invalid_decl_spec_combination : Error< 308 "cannot combine with previous '%0' declaration specifier">; 309def err_invalid_vector_decl_spec_combination : Error< 310 "cannot combine with previous '%0' declaration specifier. " 311 "'__vector' must be first">; 312def err_invalid_pixel_decl_spec_combination : Error< 313 "'__pixel' must be preceded by '__vector'. " 314 "'%0' declaration specifier not allowed here">; 315def err_invalid_vector_decl_spec : Error< 316 "cannot use '%0' with '__vector'">; 317def err_invalid_vector_bool_decl_spec : Error< 318 "cannot use '%0' with '__vector bool'">; 319def warn_vector_long_decl_spec_combination : Warning< 320 "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>; 321def err_friend_invalid_in_context : Error< 322 "'friend' used outside of class">; 323def err_unknown_typename : Error< 324 "unknown type name %0">; 325def err_use_of_tag_name_without_tag : Error< 326 "must use '%1' tag to refer to type %0%select{| in this scope}2">; 327def err_templated_using_directive : Error< 328 "cannot template a using directive">; 329def err_templated_using_declaration : Error< 330 "cannot template a using declaration">; 331def err_unexected_colon_in_nested_name_spec : Error< 332 "unexpected ':' in nested name specifier; did you mean '::'?">; 333def err_bool_redeclaration : Error< 334 "redeclaration of C++ built-in type 'bool'">; 335def ext_c11_static_assert : Extension< 336 "_Static_assert is a C11-specific feature">, InGroup<C11>; 337def warn_cxx98_compat_static_assert : Warning< 338 "static_assert declarations are incompatible with C++98">, 339 InGroup<CXX98Compat>, DefaultIgnore; 340 341/// Objective-C parser diagnostics 342def err_expected_minus_or_plus : Error< 343 "method type specifier must start with '-' or '+'">; 344def err_objc_no_attributes_on_category : Error< 345 "attributes may not be specified on a category">; 346def err_objc_missing_end : Error<"missing '@end'">; 347def note_objc_container_start : Note< 348 "%select{class|protocol|category|class extension|implementation" 349 "|category implementation}0 started here">; 350def warn_objc_protocol_qualifier_missing_id : Warning< 351 "protocol qualifiers without 'id' is archaic">; 352def err_objc_unknown_at : Error<"expected an Objective-C directive after '@'">; 353def err_illegal_super_cast : Error< 354 "cannot cast 'super' (it isn't an expression)">; 355def err_nsnumber_nonliteral_unary : Error< 356 "@%0 must be followed by a number to form an NSNumber object">; 357def warn_cstyle_param : Warning< 358 "use of C-style parameters in Objective-C method declarations" 359 " is deprecated">, InGroup<DeprecatedDeclarations>; 360 361let CategoryName = "ARC Parse Issue" in { 362def err_arc_bridge_retain : Error< 363 "unknown cast annotation __bridge_retain; did you mean __bridge_retained?">; 364// To be default mapped to an error later. 365def warn_arc_bridge_cast_nonarc : Warning< 366 "'%0' casts have no effect when not using ARC">, 367 InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>; 368} 369 370def err_objc_illegal_visibility_spec : Error< 371 "illegal visibility specification">; 372def err_objc_illegal_interface_qual : Error<"illegal interface qualifier">; 373def err_objc_expected_equal_for_getter : Error< 374 "expected '=' for Objective-C getter">; 375def err_objc_expected_equal_for_setter : Error< 376 "expected '=' for Objective-C setter">; 377def err_objc_expected_selector_for_getter_setter : Error< 378 "expected selector for Objective-C %select{setter|getter}0">; 379def err_objc_property_requires_field_name : Error< 380 "property requires fields to be named">; 381def err_objc_property_bitfield : Error<"property name cannot be a bitfield">; 382def err_objc_expected_property_attr : Error<"unknown property attribute %0">; 383def err_objc_properties_require_objc2 : Error< 384 "properties are an Objective-C 2 feature">; 385def err_objc_unexpected_attr : Error< 386 "prefix attribute must be followed by an interface or protocol">; 387def err_objc_directive_only_in_protocol : Error< 388 "directive may only be specified in protocols only">; 389def err_missing_catch_finally : Error< 390 "@try statement without a @catch and @finally clause">; 391def err_objc_concat_string : Error<"unexpected token after Objective-C string">; 392def err_expected_objc_container : Error< 393 "'@end' must appear in an Objective-C context">; 394def error_property_ivar_decl : Error< 395 "property synthesize requires specification of an ivar">; 396def err_synthesized_property_name : Error< 397 "expected a property name in @synthesize">; 398def warn_semicolon_before_method_body : Warning< 399 "semicolon before method body is ignored">, 400 InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore; 401def note_extra_comma_message_arg : Note< 402 "comma separating Objective-C messaging arguments">; 403 404def err_expected_field_designator : Error< 405 "expected a field designator, such as '.field = 4'">; 406 407def err_declaration_does_not_declare_param : Error< 408 "declaration does not declare a parameter">; 409def err_no_matching_param : Error<"parameter named %0 is missing">; 410 411/// C++ parser diagnostics 412def err_expected_unqualified_id : Error< 413 "expected %select{identifier|unqualified-id}0">; 414def err_func_def_no_params : Error< 415 "function definition does not declare parameters">; 416def err_expected_lparen_after_type : Error< 417 "expected '(' for function-style cast or type construction">; 418def err_expected_init_in_condition : Error< 419 "variable declaration in condition must have an initializer">; 420def err_expected_init_in_condition_lparen : Error< 421 "variable declaration in condition cannot have a parenthesized initializer">; 422def err_extraneous_rparen_in_condition : Error< 423 "extraneous ')' after condition, expected a statement">; 424def warn_dangling_else : Warning< 425 "add explicit braces to avoid dangling else">, 426 InGroup<DanglingElse>; 427def err_expected_member_or_base_name : Error< 428 "expected class member or base class name">; 429def err_expected_lbrace_after_base_specifiers : Error< 430 "expected '{' after base class list">; 431def ext_ellipsis_exception_spec : Extension< 432 "exception specification of '...' is a Microsoft extension">; 433def err_dynamic_and_noexcept_specification : Error< 434 "cannot have both throw() and noexcept() clause on the same function">; 435def warn_cxx98_compat_noexcept_decl : Warning< 436 "noexcept specifications are incompatible with C++98">, 437 InGroup<CXX98Compat>, DefaultIgnore; 438def err_expected_catch : Error<"expected catch">; 439def err_expected_lbrace_or_comma : Error<"expected '{' or ','">; 440def err_expected_rbrace_or_comma : Error<"expected '}' or ','">; 441def err_expected_rsquare_or_comma : Error<"expected ']' or ','">; 442def err_using_namespace_in_class : Error< 443 "'using namespace' is not allowed in classes">; 444def err_destructor_tilde_identifier : Error< 445 "expected a class name after '~' to name a destructor">; 446def err_destructor_template_id : Error< 447 "destructor name %0 does not refer to a template">; 448def err_default_arg_unparsed : Error< 449 "unexpected end of default argument expression">; 450def err_parser_impl_limit_overflow : Error< 451 "parser recursion limit reached, program too complex">, DefaultFatal; 452def err_misplaced_ellipsis_in_declaration : Error< 453 "'...' must %select{immediately precede declared identifier|" 454 "be innermost component of anonymous pack declaration}0">; 455 456// C++ derived classes 457def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">; 458 459// C++ operator overloading 460def err_literal_operator_string_prefix : Error< 461 "string literal after 'operator' cannot have an encoding prefix">; 462def err_literal_operator_string_not_empty : Error< 463 "string literal after 'operator' must be '\"\"'">; 464def err_literal_operator_missing_space : Error< 465 "C++11 requires a space between the \"\" and the user-defined suffix in a " 466 "literal operator">; 467def warn_cxx98_compat_literal_operator : Warning< 468 "literal operators are incompatible with C++98">, 469 InGroup<CXX98Compat>, DefaultIgnore; 470 471// Classes. 472def err_anon_type_definition : Error< 473 "declaration of anonymous %0 must be a definition">; 474def err_default_delete_in_multiple_declaration : Error< 475 "'= %select{default|delete}0' is a function definition and must occur in a " 476 "standalone declaration">; 477 478def warn_cxx98_compat_noexcept_expr : Warning< 479 "noexcept expressions are incompatible with C++98">, 480 InGroup<CXX98Compat>, DefaultIgnore; 481def warn_cxx98_compat_nullptr : Warning< 482 "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 483 484def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">, 485 InGroup<CXX98Compat>, DefaultIgnore; 486def warn_cxx98_compat_attribute : Warning< 487 "attributes are incompatible with C++98">, 488 InGroup<CXX98Compat>, DefaultIgnore; 489def err_cxx11_attribute_forbids_arguments : Error< 490 "attribute '%0' cannot have an argument list">; 491def err_cxx11_attribute_forbids_ellipsis : Error< 492 "attribute '%0' cannot be used as an attribute pack">; 493def err_attributes_not_allowed : Error<"an attribute list cannot appear here">; 494def err_l_square_l_square_not_attribute : Error< 495 "C++11 only allows consecutive left square brackets when " 496 "introducing an attribute">; 497def err_alignas_pack_exp_unsupported : Error< 498 "pack expansions in alignment specifiers are not supported yet">; 499def err_ms_declspec_type : Error< 500 "__declspec attributes must be an identifier or string literal">; 501def warn_ms_declspec_unknown : Warning< 502 "unknown __declspec attribute %0 ignored">, InGroup<UnknownAttributes>; 503 504/// C++ Templates 505def err_expected_template : Error<"expected template">; 506def err_unknown_template_name : Error< 507 "unknown template name %0">; 508def err_expected_comma_greater : Error< 509 "expected ',' or '>' in template-parameter-list">; 510def err_class_on_template_template_param : Error< 511 "template template parameter requires 'class' after the parameter list">; 512def err_template_spec_syntax_non_template : Error< 513 "identifier followed by '<' indicates a class template specialization but " 514 "%0 %select{does not refer to a template|refers to a function " 515 "template|<unused>|refers to a template template parameter}1">; 516def err_id_after_template_in_nested_name_spec : Error< 517 "expected template name after 'template' keyword in nested name specifier">; 518def err_two_right_angle_brackets_need_space : Error< 519 "a space is required between consecutive right angle brackets (use '> >')">; 520def err_right_angle_bracket_equal_needs_space : Error< 521 "a space is required between a right angle bracket and an equals sign " 522 "(use '> =')">; 523def warn_cxx0x_right_shift_in_template_arg : Warning< 524 "use of right-shift operator ('>>') in template argument will require " 525 "parentheses in C++11">, InGroup<CXX11Compat>; 526def warn_cxx98_compat_two_right_angle_brackets : Warning< 527 "consecutive right angle brackets are incompatible with C++98 (use '> >')">, 528 InGroup<CXX98Compat>, DefaultIgnore; 529def err_multiple_template_declarators : Error< 530 "%select{|a template declaration|an explicit template specialization|" 531 "an explicit template instantiation}0 can " 532 "only %select{|declare|declare|instantiate}0 a single entity">; 533def err_explicit_instantiation_with_definition : Error< 534 "explicit template instantiation cannot have a definition; if this " 535 "definition is meant to be an explicit specialization, add '<>' after the " 536 "'template' keyword">; 537def err_enum_template : Error<"enumeration cannot be a template">; 538def err_explicit_instantiation_enum : Error< 539 "enumerations cannot be explicitly instantiated">; 540def err_expected_template_parameter : Error<"expected template parameter">; 541 542def err_missing_dependent_template_keyword : Error< 543 "use 'template' keyword to treat '%0' as a dependent template name">; 544def warn_missing_dependent_template_keyword : ExtWarn< 545 "use 'template' keyword to treat '%0' as a dependent template name">; 546 547def ext_extern_template : Extension< 548 "extern templates are a C++11 extension">, InGroup<CXX11>; 549def warn_cxx98_compat_extern_template : Warning< 550 "extern templates are incompatible with C++98">, 551 InGroup<CXX98CompatPedantic>, DefaultIgnore; 552def warn_static_inline_explicit_inst_ignored : Warning< 553 "ignoring '%select{static|inline}0' keyword on explicit template " 554 "instantiation">; 555 556// Constructor template diagnostics. 557def err_out_of_line_constructor_template_id : Error< 558 "out-of-line constructor for %0 cannot have template arguments">; 559def err_out_of_line_template_id_names_constructor : Error< 560 "qualified reference to %0 is a constructor name rather than a " 561 "template name wherever a constructor can be declared">; 562def err_out_of_line_type_names_constructor : Error< 563 "qualified reference to %0 is a constructor name rather than a " 564 "type wherever a constructor can be declared">; 565 566def err_expected_qualified_after_typename : Error< 567 "expected a qualified name after 'typename'">; 568def warn_expected_qualified_after_typename : ExtWarn< 569 "expected a qualified name after 'typename'">; 570def err_expected_semi_after_tagdecl : Error< 571 "expected ';' after %0">; 572 573def err_typename_refers_to_non_type_template : Error< 574 "typename specifier refers to a non-template">; 575def err_expected_type_name_after_typename : Error< 576 "expected an identifier or template-id after '::'">; 577def err_explicit_spec_non_template : Error< 578 "explicit %select{specialization|instantiation}0 of non-template " 579 "%select{class|struct|union|interface}1 %2">; 580 581def err_default_template_template_parameter_not_template : Error< 582 "default template argument for a template template parameter must be a class " 583 "template">; 584 585def err_ctor_init_missing_comma : Error< 586 "missing ',' between base or member initializers">; 587 588// C++ declarations 589def err_friend_decl_defines_type : Error< 590 "cannot define a type in a friend declaration">; 591def err_missing_whitespace_digraph : Error< 592 "found '<::' after a " 593 "%select{template name|const_cast|dynamic_cast|reinterpret_cast|static_cast}0" 594 " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">; 595 596def ext_deleted_function : ExtWarn< 597 "deleted function definitions are a C++11 extension">, InGroup<CXX11>; 598def warn_cxx98_compat_deleted_function : Warning< 599 "deleted function definitions are incompatible with C++98">, 600 InGroup<CXX98Compat>, DefaultIgnore; 601def ext_defaulted_function : ExtWarn< 602 "defaulted function definitions are a C++11 extension">, InGroup<CXX11>; 603def warn_cxx98_compat_defaulted_function : Warning< 604 "defaulted function definitions are incompatible with C++98">, 605 InGroup<CXX98Compat>, DefaultIgnore; 606 607// C++11 in-class member initialization 608def ext_nonstatic_member_init : ExtWarn< 609 "in-class initialization of non-static data member is a C++11 extension">, 610 InGroup<CXX11>; 611def warn_cxx98_compat_nonstatic_member_init : Warning< 612 "in-class initialization of non-static data members is incompatible with C++98">, 613 InGroup<CXX98Compat>, DefaultIgnore; 614def err_bitfield_member_init: Error< 615 "bitfield member cannot have an in-class initializer">; 616def err_incomplete_array_member_init: Error< 617 "array bound cannot be deduced from an in-class initializer">; 618 619// C++11 alias-declaration 620def ext_alias_declaration : ExtWarn< 621 "alias declarations are a C++11 extension">, InGroup<CXX11>; 622def warn_cxx98_compat_alias_declaration : Warning< 623 "alias declarations are incompatible with C++98">, 624 InGroup<CXX98Compat>, DefaultIgnore; 625def err_alias_declaration_not_identifier : Error< 626 "name defined in alias declaration must be an identifier">; 627def err_alias_declaration_specialization : Error< 628 "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">; 629 630// C++11 override control 631def ext_override_control_keyword : ExtWarn< 632 "'%0' keyword is a C++11 extension">, InGroup<CXX11>; 633def warn_cxx98_compat_override_control_keyword : Warning< 634 "'%0' keyword is incompatible with C++98">, 635 InGroup<CXX98Compat>, DefaultIgnore; 636 637def err_duplicate_virt_specifier : Error< 638 "class member already marked '%0'">; 639 640def err_scoped_enum_missing_identifier : Error< 641 "scoped enumeration requires a name">; 642def warn_cxx98_compat_scoped_enum : Warning< 643 "scoped enumerations are incompatible with C++98">, 644 InGroup<CXX98Compat>, DefaultIgnore; 645 646def err_expected_parameter_pack : Error< 647 "expected the name of a parameter pack">; 648def err_paren_sizeof_parameter_pack : Error< 649 "missing parentheses around the size of parameter pack %0">; 650def err_sizeof_parameter_pack : Error< 651 "expected parenthesized parameter pack name in 'sizeof...' expression">; 652 653// C++11 lambda expressions 654def err_expected_comma_or_rsquare : Error< 655 "expected ',' or ']' in lambda capture list">; 656def err_this_captured_by_reference : Error< 657 "'this' cannot be captured by reference">; 658def err_expected_capture : Error< 659 "expected variable name or 'this' in lambda capture list">; 660def err_expected_lambda_body : Error<"expected body of lambda expression">; 661def warn_cxx98_compat_lambda : Warning< 662 "lambda expressions are incompatible with C++98">, 663 InGroup<CXX98Compat>, DefaultIgnore; 664def err_lambda_missing_parens : Error< 665 "lambda requires '()' before %select{'mutable'|return type}0">; 666 667// Availability attribute 668def err_expected_version : Error< 669 "expected a version of the form 'major[.minor[.subminor]]'">; 670def err_zero_version : Error< 671 "version number must have non-zero major, minor, or sub-minor version">; 672def err_availability_expected_platform : Error< 673 "expected a platform name, e.g., 'macosx'">; 674def err_availability_expected_change : Error< 675 "expected 'introduced', 'deprecated', or 'obsoleted'">; 676def err_availability_unknown_change : Error< 677 "%0 is not an availability stage; use 'introduced', 'deprecated', or " 678 "'obsoleted'">; 679def err_availability_redundant : Error< 680 "redundant %0 availability change; only the last specified change will " 681 "be used">; 682def warn_availability_and_unavailable : Warning< 683 "'unavailable' availability overrides all other availability information">, 684 InGroup<Availability>; 685 686// Type safety attributes 687def err_type_safety_unknown_flag : Error< 688 "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">; 689 690// Language specific pragmas 691// - Generic warnings 692def warn_pragma_expected_lparen : Warning< 693 "missing '(' after '#pragma %0' - ignoring">; 694def warn_pragma_expected_rparen : Warning< 695 "missing ')' after '#pragma %0' - ignoring">; 696def warn_pragma_expected_identifier : Warning< 697 "expected identifier in '#pragma %0' - ignored">; 698def warn_pragma_ms_struct : Warning< 699 "incorrect use of '#pragma ms_struct on|off' - ignored">; 700def warn_pragma_extra_tokens_at_eol : Warning< 701 "extra tokens at end of '#pragma %0' - ignored">; 702// - #pragma options 703def warn_pragma_options_expected_align : Warning< 704 "expected 'align' following '#pragma options' - ignored">; 705def warn_pragma_align_expected_equal : Warning< 706 "expected '=' following '#pragma %select{align|options align}0' - ignored">; 707def warn_pragma_align_invalid_option : Warning< 708 "invalid alignment option in '#pragma %select{align|options align}0' - ignored">; 709// - #pragma pack 710def warn_pragma_pack_invalid_action : Warning< 711 "unknown action for '#pragma pack' - ignored">; 712def warn_pragma_pack_malformed : Warning< 713 "expected integer or identifier in '#pragma pack' - ignored">; 714// - #pragma unused 715def warn_pragma_unused_expected_var : Warning< 716 "expected '#pragma unused' argument to be a variable name">; 717def warn_pragma_unused_expected_punc : Warning< 718 "expected ')' or ',' in '#pragma unused'">; 719 720// OpenCL Section 6.8.g 721def err_not_opencl_storage_class_specifier : Error< 722 "OpenCL does not support the '%0' storage class specifier">; 723 724// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1]) 725def warn_pragma_expected_colon : Warning< 726 "missing ':' after %0 - ignoring">; 727def warn_pragma_expected_enable_disable : Warning< 728 "expected 'enable' or 'disable' - ignoring">; 729def warn_pragma_unknown_extension : Warning< 730 "unknown OpenCL extension %0 - ignoring">; 731 732def err_seh_expected_handler : Error< 733 "expected '__except' or '__finally' block">; 734 735def err_seh___except_block : Error< 736 "%0 only allowed in __except block">; 737 738def err_seh___except_filter : Error< 739 "%0 only allowed in __except filter expression">; 740 741def err_seh___finally_block : Error< 742 "%0 only allowed in __finally block">; 743 744} // end of Parse Issue category. 745 746let CategoryName = "Modules Issue" in { 747def err_module_expected_ident : Error< 748 "expected a module name after module import">; 749def err_module_expected_semi : Error< 750 "expected a semicolon name after module name">; 751} 752 753} // end of Parser diagnostics 754