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