PageRenderTime 56ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/include/clang/Basic/DiagnosticSemaKinds.td

https://bitbucket.org/danchr/clang
Unknown | 3166 lines | 2969 code | 197 blank | 0 comment | 0 complexity | 843804699b53431aec84986d4b94b16e MD5 | raw file
Possible License(s): JSON

Large files files are truncated, but you can click here to view the full file

  1. //==--- DiagnosticSemaKinds.td - libsema 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. // Semantic Analysis
  11. //===----------------------------------------------------------------------===//
  12. let Component = "Sema" in {
  13. let CategoryName = "Semantic Issue" in {
  14. // Constant expressions
  15. def err_expr_not_ice : Error<
  16. "expression is not an integer constant expression">;
  17. def ext_expr_not_ice : Extension<
  18. "expression is not integer constant expression "
  19. "(but is allowed as an extension)">;
  20. def ext_null_pointer_expr_not_ice : Extension<
  21. "null pointer expression is not an integer constant expression "
  22. "(but is allowed as an extension)">;
  23. // Semantic analysis of constant literals.
  24. def ext_predef_outside_function : Warning<
  25. "predefined identifier is only valid inside function">;
  26. def warn_float_overflow : Warning<
  27. "magnitude of floating-point constant too large for type %0; maximum is %1">,
  28. InGroup<LiteralRange>;
  29. def warn_float_underflow : Warning<
  30. "magnitude of floating-point constant too small for type %0; minimum is %1">,
  31. InGroup<LiteralRange>;
  32. // C99 variable-length arrays
  33. def ext_vla : Extension<
  34. "variable length arrays are a C99 feature, accepted as an extension">,
  35. InGroup<VLA>;
  36. def err_vla_non_pod : Error<"variable length array of non-POD element type %0">;
  37. def err_vla_in_sfinae : Error<
  38. "variable length array cannot be formed during template argument deduction">;
  39. def err_array_star_in_function_definition : Error<
  40. "variable length array must be bound in function definition">;
  41. def err_vla_decl_in_file_scope : Error<
  42. "variable length array declaration not allowed at file scope">;
  43. def err_vla_decl_has_static_storage : Error<
  44. "variable length array declaration can not have 'static' storage duration">;
  45. def err_vla_decl_has_extern_linkage : Error<
  46. "variable length array declaration can not have 'extern' linkage">;
  47. // C99 variably modified types
  48. def err_variably_modified_template_arg : Error<
  49. "variably modified type %0 cannot be used as a template argument">;
  50. def err_variably_modified_nontype_template_param : Error<
  51. "non-type template parameter of variably modified type %0">;
  52. // C99 Designated Initializers
  53. def err_array_designator_negative : Error<
  54. "array designator value '%0' is negative">;
  55. def err_array_designator_empty_range : Error<
  56. "array designator range [%0, %1] is empty">;
  57. def err_array_designator_non_array : Error<
  58. "array designator cannot initialize non-array type %0">;
  59. def err_array_designator_too_large : Error<
  60. "array designator index (%0) exceeds array bounds (%1)">;
  61. def err_field_designator_non_aggr : Error<
  62. "field designator cannot initialize a "
  63. "%select{non-struct, non-union|non-class}0 type %1">;
  64. def err_field_designator_unknown : Error<
  65. "field designator %0 does not refer to any field in type %1">;
  66. def err_field_designator_nonfield : Error<
  67. "field designator %0 does not refer to a non-static data member">;
  68. def note_field_designator_found : Note<"field designator refers here">;
  69. def err_designator_for_scalar_init : Error<
  70. "designator in initializer for scalar type %0">;
  71. def warn_subobject_initializer_overrides : Warning<
  72. "subobject initialization overrides initialization of other fields "
  73. "within its enclosing subobject">, InGroup<InitializerOverrides>;
  74. def warn_initializer_overrides : Warning<
  75. "initializer overrides prior initialization of this subobject">,
  76. InGroup<InitializerOverrides>;
  77. def note_previous_initializer : Note<
  78. "previous initialization %select{|with side effects }0is here"
  79. "%select{| (side effects may not occur at run time)}0">;
  80. def err_designator_into_flexible_array_member : Error<
  81. "designator into flexible array member subobject">;
  82. def note_flexible_array_member : Note<
  83. "initialized flexible array member %0 is here">;
  84. def ext_flexible_array_init : Extension<
  85. "flexible array initialization is a GNU extension">, InGroup<GNU>;
  86. // Declarations.
  87. def ext_anon_param_requires_type_specifier : Extension<
  88. "type specifier required for unnamed parameter, defaults to int">;
  89. def err_bad_variable_name : Error<
  90. "'%0' cannot be the name of a variable or data member">;
  91. def err_parameter_name_omitted : Error<"parameter name omitted">;
  92. def warn_unused_parameter : Warning<"unused parameter %0">,
  93. InGroup<UnusedParameter>, DefaultIgnore;
  94. def warn_unused_variable : Warning<"unused variable %0">,
  95. InGroup<UnusedVariable>, DefaultIgnore;
  96. def warn_unused_exception_param : Warning<"unused exception parameter %0">,
  97. InGroup<UnusedExceptionParameter>, DefaultIgnore;
  98. def warn_decl_in_param_list : Warning<
  99. "declaration of %0 will not be visible outside of this function">;
  100. def warn_unused_function : Warning<"unused function %0">,
  101. InGroup<UnusedFunction>, DefaultIgnore;
  102. def warn_implicit_function_decl : Warning<
  103. "implicit declaration of function %0">,
  104. InGroup<ImplicitFunctionDeclare>, DefaultIgnore;
  105. def ext_implicit_function_decl : ExtWarn<
  106. "implicit declaration of function %0 is invalid in C99">,
  107. InGroup<ImplicitFunctionDeclare>;
  108. def err_ellipsis_first_arg : Error<
  109. "ISO C requires a named argument before '...'">;
  110. def err_declarator_need_ident : Error<"declarator requires an identifier">;
  111. def err_bad_language : Error<"unknown linkage language">;
  112. def warn_use_out_of_scope_declaration : Warning<
  113. "use of out-of-scope declaration of %0">;
  114. def err_inline_non_function : Error<
  115. "'inline' can only appear on functions">;
  116. def warn_decl_shadow :
  117. Warning<"declaration shadows a %select{"
  118. "local variable|"
  119. "variable in %2|"
  120. "static data member of %2|"
  121. "field of %2}1">,
  122. InGroup<Shadow>, DefaultIgnore;
  123. // C++ using declarations
  124. def err_using_requires_qualname : Error<
  125. "using declaration requires a qualified name">;
  126. def err_using_typename_non_type : Error<
  127. "'typename' keyword used on a non-type">;
  128. def err_using_dependent_value_is_type : Error<
  129. "dependent using declaration resolved to type without 'typename'">;
  130. def err_using_decl_nested_name_specifier_is_not_class : Error<
  131. "using declaration in class refers into '%0', which is not a class">;
  132. def err_using_decl_nested_name_specifier_is_current_class : Error<
  133. "using declaration refers to its own class">;
  134. def err_using_decl_nested_name_specifier_is_not_base_class : Error<
  135. "using declaration refers into '%0', which is not a base class of %1">;
  136. def err_using_decl_can_not_refer_to_class_member : Error<
  137. "using declaration can not refer to class member">;
  138. def err_using_decl_can_not_refer_to_namespace : Error<
  139. "using declaration can not refer to namespace">;
  140. def err_using_decl_constructor : Error<
  141. "using declaration can not refer to a constructor">;
  142. def err_using_decl_destructor : Error<
  143. "using declaration can not refer to a destructor">;
  144. def err_using_decl_template_id : Error<
  145. "using declaration can not refer to a template specialization">;
  146. def note_using_decl_target : Note<"target of using declaration">;
  147. def note_using_decl_conflict : Note<"conflicting declaration">;
  148. def err_using_decl_redeclaration : Error<"redeclaration of using decl">;
  149. def err_using_decl_conflict : Error<
  150. "target of using declaration conflicts with declaration already in scope">;
  151. def err_using_decl_conflict_reverse : Error<
  152. "declaration conflicts with target of using declaration already in scope">;
  153. def note_using_decl : Note<"%select{|previous }0using declaration">;
  154. def warn_access_decl_deprecated : Warning<
  155. "access declarations are deprecated; use using declarations instead">,
  156. InGroup<Deprecated>;
  157. def err_invalid_thread : Error<
  158. "'__thread' is only allowed on variable declarations">;
  159. def err_thread_non_global : Error<
  160. "'__thread' variables must have global storage">;
  161. def err_thread_unsupported : Error<
  162. "thread-local storage is unsupported for the current target">;
  163. def warn_maybe_falloff_nonvoid_function : Warning<
  164. "control may reach end of non-void function">,
  165. InGroup<ReturnType>;
  166. def warn_falloff_nonvoid_function : Warning<
  167. "control reaches end of non-void function">,
  168. InGroup<ReturnType>;
  169. def err_maybe_falloff_nonvoid_block : Error<
  170. "control may reach end of non-void block">;
  171. def err_falloff_nonvoid_block : Error<
  172. "control reaches end of non-void block">;
  173. def warn_suggest_noreturn_function : Warning<
  174. "function could be attribute 'noreturn'">,
  175. InGroup<DiagGroup<"missing-noreturn">>, DefaultIgnore;
  176. def warn_suggest_noreturn_block : Warning<
  177. "block could be attribute 'noreturn'">,
  178. InGroup<DiagGroup<"missing-noreturn">>, DefaultIgnore;
  179. def warn_unreachable : Warning<"will never be executed">,
  180. InGroup<DiagGroup<"unreachable-code">>, DefaultIgnore;
  181. /// Built-in functions.
  182. def ext_implicit_lib_function_decl : ExtWarn<
  183. "implicitly declaring C library function '%0' with type %1">;
  184. def note_please_include_header : Note<
  185. "please include the header <%0> or explicitly provide a "
  186. "declaration for '%1'">;
  187. def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">;
  188. def err_implicit_decl_requires_stdio : Error<
  189. "implicit declaration of '%0' requires inclusion of the header <stdio.h>">;
  190. def err_implicit_decl_requires_setjmp : Error<
  191. "implicit declaration of '%0' requires inclusion of the header <setjmp.h>">;
  192. def warn_redecl_library_builtin : Warning<
  193. "incompatible redeclaration of library function %0">;
  194. def err_builtin_definition : Error<"definition of builtin function %0">;
  195. def err_types_compatible_p_in_cplusplus : Error<
  196. "__builtin_types_compatible_p is not valid in C++">;
  197. def warn_builtin_unknown : Warning<"use of unknown builtin %0">, DefaultError;
  198. /// main()
  199. // static/inline main() are not errors in C, just in C++.
  200. def warn_unusual_main_decl : Warning<"'main' should not be declared "
  201. "%select{static|inline|static or inline}0">;
  202. def err_unusual_main_decl : Error<"'main' is not allowed to be declared "
  203. "%select{static|inline|static or inline}0">;
  204. def err_main_returns_nonint : Error<"'main' must return 'int'">;
  205. def err_main_surplus_args : Error<"too many parameters (%0) for 'main': "
  206. "must be 0, 2, or 3">;
  207. def warn_main_one_arg : Warning<"only one parameter on 'main' declaration">;
  208. def err_main_arg_wrong : Error<"%select{first|second|third|fourth}0 "
  209. "parameter of 'main' (%select{argument count|argument array|environment|"
  210. "platform-specific data}0) must be of type %1">;
  211. /// parser diagnostics
  212. def ext_typedef_without_a_name : ExtWarn<"typedef requires a name">;
  213. def err_statically_allocated_object : Error<
  214. "interface type cannot be statically allocated">;
  215. def err_object_cannot_be_passed_returned_by_value : Error<
  216. "interface type %1 cannot be %select{returned|passed}0 by value"
  217. "; did you forget * in %1">;
  218. def warn_enum_value_overflow : Warning<"overflow in enumeration value">;
  219. def warn_pragma_options_align_unsupported_option : Warning<
  220. "unsupported alignment option in '#pragma options align'">;
  221. def warn_pragma_options_align_reset_failed : Warning<
  222. "#pragma options align=reset failed: %0">;
  223. def err_pragma_options_align_mac68k_target_unsupported : Error<
  224. "mac68k alignment pragma is not supported on this target">;
  225. def warn_pragma_pack_invalid_alignment : Warning<
  226. "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">;
  227. // Follow the MSVC implementation.
  228. def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
  229. def warn_pragma_pack_pop_identifer_and_alignment : Warning<
  230. "specifying both a name and alignment to 'pop' is undefined">;
  231. def warn_pragma_pack_pop_failed : Warning<"#pragma pack(pop, ...) failed: %0">;
  232. def warn_pragma_unused_undeclared_var : Warning<
  233. "undeclared variable %0 used as an argument for '#pragma unused'">;
  234. def warn_pragma_unused_expected_localvar : Warning<
  235. "only local variables can be arguments to '#pragma unused'">;
  236. def err_unsupported_pragma_weak : Error<
  237. "using '#pragma weak' to refer to an undeclared identifier is not yet supported">;
  238. /// Objective-C parser diagnostics
  239. def err_duplicate_class_def : Error<
  240. "duplicate interface definition for class %0">;
  241. def err_undef_superclass : Error<
  242. "cannot find interface declaration for %0, superclass of %1">;
  243. def err_no_nsconstant_string_class : Error<
  244. "cannot find interface declaration for %0">;
  245. def err_recursive_superclass : Error<
  246. "trying to recursively use %0 as superclass of %1">;
  247. def warn_previous_alias_decl : Warning<"previously declared alias is ignored">;
  248. def err_conflicting_aliasing_type : Error<"conflicting types for alias %0">;
  249. def warn_undef_interface : Warning<"cannot find interface declaration for %0">;
  250. def warn_duplicate_protocol_def : Warning<"duplicate protocol definition of %0 is ignored">;
  251. def err_protocol_has_circular_dependency : Error<
  252. "protocol has circular dependency">;
  253. def err_undeclared_protocol : Error<"cannot find protocol declaration for %0">;
  254. def warn_undef_protocolref : Warning<"cannot find protocol definition for %0">;
  255. def warn_readonly_property : Warning<
  256. "attribute 'readonly' of property %0 restricts attribute "
  257. "'readwrite' of property inherited from %1">;
  258. def warn_property_attribute : Warning<
  259. "property %0 '%1' attribute does not match the property inherited from %2">;
  260. def warn_property_types_are_incompatible : Warning<
  261. "property type %0 is incompatible with type %1 inherited from %2">;
  262. def err_undef_interface : Error<"cannot find interface declaration for %0">;
  263. def err_class_extension_after_impl : Error<
  264. "cannot declare class extension for %0 after class implementation">;
  265. def note_implementation_declared : Note<
  266. "class implementation is declared here">;
  267. def warn_dup_category_def : Warning<
  268. "duplicate definition of category %1 on interface %0">;
  269. def err_conflicting_super_class : Error<"conflicting super class name %0">;
  270. def err_dup_implementation_class : Error<"reimplementation of class %0">;
  271. def err_dup_implementation_category : Error<
  272. "reimplementation of category %1 for class %0">;
  273. def err_conflicting_ivar_type : Error<
  274. "instance variable %0 has conflicting type: %1 vs %2">;
  275. def err_duplicate_ivar_declaration : Error<
  276. "instance variable is already declared">;
  277. def warn_on_superclass_use : Warning<
  278. "class implementation may not have super class">;
  279. def err_conflicting_ivar_bitwidth : Error<
  280. "instance variable %0 has conflicting bit-field width">;
  281. def err_conflicting_ivar_name : Error<
  282. "conflicting instance variable names: %0 vs %1">;
  283. def err_inconsistant_ivar_count : Error<
  284. "inconsistent number of instance variables specified">;
  285. def warn_incomplete_impl : Warning<"incomplete implementation">;
  286. def note_undef_method_impl : Note<"method definition for %0 not found">;
  287. def note_required_for_protocol_at :
  288. Note<"required for direct or indirect protocol %0">;
  289. def warn_conflicting_ret_types : Warning<
  290. "conflicting return type in implementation of %0: %1 vs %2">;
  291. def warn_conflicting_param_types : Warning<
  292. "conflicting parameter types in implementation of %0: %1 vs %2">;
  293. def warn_conflicting_variadic :Warning<
  294. "conflicting variadic declaration of method and its implementation">;
  295. def warn_implements_nscopying : Warning<
  296. "default assign attribute on property %0 which implements "
  297. "NSCopying protocol is not appropriate with -fobjc-gc[-only]">;
  298. def warn_multiple_method_decl : Warning<"multiple methods named %0 found">;
  299. def warn_accessor_property_type_mismatch : Warning<
  300. "type of property %0 does not match type of accessor %1">;
  301. def note_declared_at : Note<"declared here">;
  302. def err_setter_type_void : Error<"type of setter must be void">;
  303. def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
  304. def warn_missing_atend : Warning<"'@end' is missing in implementation context">;
  305. def err_objc_var_decl_inclass :
  306. Error<"cannot declare variable inside @interface or @protocol">;
  307. def error_missing_method_context : Error<
  308. "missing context for method declaration">;
  309. def err_objc_property_attr_mutually_exclusive : Error<
  310. "property attributes '%0' and '%1' are mutually exclusive">;
  311. def err_objc_property_requires_object : Error<
  312. "property with '%0' attribute must be of object type">;
  313. def warn_objc_property_no_assignment_attribute : Warning<
  314. "no 'assign', 'retain', or 'copy' attribute is specified - "
  315. "'assign' is assumed">;
  316. def warn_objc_property_default_assign_on_object : Warning<
  317. "default property attribute 'assign' not appropriate for non-gc object">;
  318. def warn_property_attr_mismatch : Warning<
  319. "property attribute in continuation class does not match the primary class">;
  320. def warn_objc_property_copy_missing_on_block : Warning<
  321. "'copy' attribute must be specified for the block property "
  322. "when -fobjc-gc-only is specified">;
  323. def warn_atomic_property_rule : Warning<
  324. "writable atomic property %0 cannot pair a synthesized setter/getter "
  325. "with a user defined setter/getter">;
  326. def err_use_continuation_class : Error<
  327. "illegal declaration of property in continuation class %0"
  328. ": attribute must be readwrite, while its primary must be readonly">;
  329. def err_continuation_class : Error<"continuation class has no primary class">;
  330. def err_property_type : Error<"property cannot have array or function type %0">;
  331. def error_missing_property_context : Error<
  332. "missing context for property implementation declaration">;
  333. def error_bad_property_decl : Error<
  334. "property implementation must have its declaration in interface %0">;
  335. def error_category_property : Error<
  336. "property declared in category %0 cannot be implemented in "
  337. "class implementation">;
  338. def note_property_declare : Note<
  339. "property declared here">;
  340. def error_synthesize_category_decl : Error<
  341. "@synthesize not allowed in a category's implementation">;
  342. def error_reference_property : Error<
  343. "property of reference type is not supported">;
  344. def error_missing_property_interface : Error<
  345. "property implementation in a category with no category declaration">;
  346. def error_bad_category_property_decl : Error<
  347. "property implementation must have its declaration in the category %0">;
  348. def error_bad_property_context : Error<
  349. "property implementation must be in a class or category implementation">;
  350. def error_missing_property_ivar_decl : Error<
  351. "synthesized property %0 must either be named the same as a compatible"
  352. " ivar or must explicitly name an ivar">;
  353. def error_synthesized_ivar_yet_not_supported : Error<
  354. "instance variable synthesis not yet supported"
  355. " (need to declare %0 explicitly)">;
  356. def error_property_ivar_type : Error<
  357. "type of property %0 (%1) does not match type of ivar %2 (%3)">;
  358. def error_ivar_in_superclass_use : Error<
  359. "property %0 attempting to use ivar %1 declared in super class %2">;
  360. def error_weak_property : Error<
  361. "existing ivar %1 for __weak property %0 must be __weak">;
  362. def error_strong_property : Error<
  363. "existing ivar %1 for a __strong property %0 must be garbage collectable">;
  364. def error_dynamic_property_ivar_decl : Error<
  365. "dynamic property can not have ivar specification">;
  366. def error_duplicate_ivar_use : Error<
  367. "synthesized properties %0 and %1 both claim ivar %2">;
  368. def error_property_implemented : Error<"property %0 is already implemented">;
  369. def warn_objc_property_attr_mutually_exclusive : Warning<
  370. "property attributes '%0' and '%1' are mutually exclusive">,
  371. InGroup<ReadOnlySetterAttrs>, DefaultIgnore;
  372. def warn_undeclared_selector : Warning<
  373. "undeclared selector %0">, InGroup<UndeclaredSelector>, DefaultIgnore;
  374. def warn_unimplemented_protocol_method : Warning<
  375. "method in protocol not implemented">, InGroup<Protocol>;
  376. // C++ declarations
  377. def err_static_assert_expression_is_not_constant : Error<
  378. "static_assert expression is not an integral constant expression">;
  379. def err_static_assert_failed : Error<"static_assert failed \"%0\"">;
  380. def err_unexpected_friend : Error<
  381. "friends can only be classes or functions">;
  382. def ext_enum_friend : ExtWarn<
  383. "enumeration type %0 cannot be a friend">;
  384. def ext_nonclass_type_friend : ExtWarn<
  385. "non-class type %0 cannot be a friend">;
  386. def err_friend_is_member : Error<
  387. "friends cannot be members of the declaring class">;
  388. def ext_unelaborated_friend_type : ExtWarn<
  389. "must specify '%select{struct|union|class|enum}0' to befriend %1">;
  390. def err_qualified_friend_not_found : Error<
  391. "no function named %0 with type %1 was found in the specified scope">;
  392. def err_introducing_special_friend : Error<
  393. "must use a qualified name when declaring a %select{constructor|"
  394. "destructor|conversion operator}0 as a friend">;
  395. def err_tagless_friend_type_template : Error<
  396. "friend type templates must use an elaborated type">;
  397. def err_abstract_type_in_decl : Error<
  398. "%select{return|parameter|variable|field}0 type %1 is an abstract class">;
  399. def err_allocation_of_abstract_type : Error<
  400. "allocation of an object of abstract type %0">;
  401. def err_throw_abstract_type : Error<
  402. "cannot throw an object of abstract type %0">;
  403. def err_array_of_abstract_type : Error<"array of abstract class type %0">;
  404. def err_multiple_final_overriders : Error<
  405. "virtual function %q0 has more than one final overrider in %1">;
  406. def note_final_overrider : Note<"final overrider of %q0 in %1">;
  407. def err_type_defined_in_type_specifier : Error<
  408. "%0 can not be defined in a type specifier">;
  409. def err_type_defined_in_result_type : Error<
  410. "%0 can not be defined in the result type of a function">;
  411. def err_type_defined_in_param_type : Error<
  412. "%0 can not be defined in a parameter type">;
  413. def note_pure_virtual_function : Note<
  414. "pure virtual function %0">;
  415. def err_deleted_non_function : Error<
  416. "only functions can have deleted definitions">;
  417. def err_deleted_decl_not_first : Error<
  418. "deleted definition must be first declaration">;
  419. def warn_weak_vtable : Warning<
  420. "%0 has no out-of-line virtual method definitions; its vtable will be "
  421. "emitted in every translation unit">,
  422. InGroup<DiagGroup<"weak-vtables">>, DefaultIgnore;
  423. // C++ exception specifications
  424. def err_exception_spec_in_typedef : Error<
  425. "exception specifications are not allowed in typedefs">;
  426. def err_distant_exception_spec : Error<
  427. "exception specifications are not allowed beyond a single level "
  428. "of indirection">;
  429. def err_incomplete_in_exception_spec : Error<
  430. "%select{|pointer to |reference to }0incomplete type %1 is not allowed "
  431. "in exception specification">;
  432. def err_mismatched_exception_spec : Error<
  433. "exception specification in declaration does not match previous declaration">;
  434. def err_override_exception_spec : Error<
  435. "exception specification of overriding function is more lax than "
  436. "base version">;
  437. def err_incompatible_exception_specs : Error<
  438. "target exception specification is not superset of source">;
  439. def err_deep_exception_specs_differ : Error<
  440. "exception specifications of %select{return|argument}0 types differ">;
  441. def warn_missing_exception_specification : Warning<
  442. "%0 is missing exception specification '%1'">;
  443. // C++ access checking
  444. def err_class_redeclared_with_different_access : Error<
  445. "%0 redeclared with '%1' access">;
  446. def err_access : Error<
  447. "%1 is a %select{private|protected}0 member of %3">, NoSFINAE;
  448. def err_access_ctor : Error<
  449. "calling a %select{private|protected}0 constructor of class %2">, NoSFINAE;
  450. def ext_rvalue_to_reference_access_ctor : ExtWarn<
  451. "C++98 requires an accessible copy constructor for class %2 when binding "
  452. "a reference to a temporary; was %select{private|protected}0">,
  453. NoSFINAE, InGroup<BindToTemporaryCopy>;
  454. def err_access_base : Error<
  455. "%select{base class|inherited virtual base class}0 %1 has %select{private|"
  456. "protected}3 %select{constructor|copy constructor|copy assignment operator|"
  457. "destructor}2">, NoSFINAE;
  458. def err_access_field: Error<
  459. "field of type %0 has %select{private|protected}2 %select{constructor|copy "
  460. "constructor|copy assignment operator|destructor}1">, NoSFINAE;
  461. def err_access_ctor_field :
  462. Error<"field of type %1 has %select{private|protected}2 constructor">,
  463. NoSFINAE;
  464. def err_access_dtor_base :
  465. Error<"base class %0 has %select{private|protected}1 destructor">,
  466. NoSFINAE;
  467. def err_access_dtor_vbase :
  468. Error<"inherited virtual base class %0 has "
  469. "%select{private|protected}1 destructor">,
  470. NoSFINAE;
  471. def err_access_dtor_temp :
  472. Error<"temporary of type %0 has %select{private|protected}1 destructor">,
  473. NoSFINAE;
  474. def err_access_dtor_field :
  475. Error<"field of type %1 has %select{private|protected}2 destructor">,
  476. NoSFINAE;
  477. def err_access_dtor_var :
  478. Error<"variable of type %1 has %select{private|protected}2 destructor">,
  479. NoSFINAE;
  480. def err_access_assign_field :
  481. Error<"field of type %1 has %select{private|protected}2 copy assignment"
  482. " operator">,
  483. NoSFINAE;
  484. def err_access_assign_base :
  485. Error<"base class %0 has %select{private|protected}1 copy assignment"
  486. " operator">,
  487. NoSFINAE;
  488. def err_access_copy_field :
  489. Error<"field of type %1 has %select{private|protected}2 copy constructor">,
  490. NoSFINAE;
  491. def err_access_copy_base :
  492. Error<"base class %0 has %select{private|protected}1 copy constructor">,
  493. NoSFINAE;
  494. def err_access_dtor_ivar :
  495. Error<"instance variable of type %0 has %select{private|protected}1 "
  496. "destructor">,
  497. NoSFINAE;
  498. def note_previous_access_declaration : Note<
  499. "previously declared '%1' here">;
  500. def err_access_outside_class : Error<
  501. "access to %select{private|protected}0 member outside any class context">;
  502. def note_access_natural : Note<
  503. "%select{|implicitly }1declared %select{private|protected}0 here">;
  504. def note_access_constrained_by_path : Note<
  505. "constrained by %select{|implicitly }1%select{private|protected}0"
  506. " inheritance here">;
  507. // C++ name lookup
  508. def err_incomplete_nested_name_spec : Error<
  509. "incomplete type %0 named in nested name specifier">;
  510. def err_dependent_nested_name_spec : Error<
  511. "nested name specifier for a declaration cannot depend on a template "
  512. "parameter">;
  513. def err_nested_name_member_ref_lookup_ambiguous : Error<
  514. "lookup of %0 in member access expression is ambiguous">;
  515. def ext_nested_name_member_ref_lookup_ambiguous : ExtWarn<
  516. "lookup of %0 in member access expression is ambiguous; using member of %1">,
  517. InGroup<AmbigMemberTemplate>;
  518. def note_ambig_member_ref_object_type : Note<
  519. "lookup in the object type %0 refers here">;
  520. def note_ambig_member_ref_scope : Note<
  521. "lookup from the current scope refers here">;
  522. def err_qualified_member_nonclass : Error<
  523. "qualified member access refers to a member in %0">;
  524. def err_incomplete_member_access : Error<
  525. "member access into incomplete type %0">;
  526. def err_incomplete_type : Error<
  527. "incomplete type %0 where a complete type is required">;
  528. // C++ class members
  529. def err_storageclass_invalid_for_member : Error<
  530. "storage class specified for a member declaration">;
  531. def err_mutable_function : Error<"'mutable' cannot be applied to functions">;
  532. def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
  533. def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
  534. def err_mutable_nonmember : Error<
  535. "'mutable' can only be applied to member variables">;
  536. def err_virtual_non_function : Error<
  537. "'virtual' can only appear on non-static member functions">;
  538. def err_virtual_out_of_class : Error<
  539. "'virtual' can only be specified inside the class definition">;
  540. def err_explicit_non_function : Error<
  541. "'explicit' can only appear on non-static member functions">;
  542. def err_explicit_out_of_class : Error<
  543. "'explicit' can only be specified inside the class definition">;
  544. def err_explicit_non_ctor_or_conv_function : Error<
  545. "'explicit' can only be applied to a constructor or conversion function">;
  546. def err_static_not_bitfield : Error<"static member %0 cannot be a bit-field">;
  547. def err_static_out_of_line : Error<
  548. "'static' can only be specified inside the class definition">;
  549. def err_typedef_not_bitfield : Error<"typedef member %0 cannot be a bit-field">;
  550. def err_not_integral_type_bitfield : Error<
  551. "bit-field %0 has non-integral type %1">;
  552. def err_not_integral_type_anon_bitfield : Error<
  553. "anonymous bit-field has non-integral type %0">;
  554. def err_member_initialization : Error<
  555. "%0 can only be initialized if it is a static const integral data member">;
  556. def err_member_function_initialization : Error<
  557. "initializer on function does not look like a pure-specifier">;
  558. def err_non_virtual_pure : Error<
  559. "%0 is not virtual and cannot be declared pure">;
  560. def err_implicit_object_parameter_init : Error<
  561. "cannot initialize object parameter of type %0 with an expression "
  562. "of type %1">;
  563. def err_qualified_member_of_unrelated : Error<
  564. "%q0 is not a member of class %1">;
  565. def note_field_decl : Note<"member is declared here">;
  566. def note_ivar_decl : Note<"ivar is declared here">;
  567. def note_bitfield_decl : Note<"bit-field is declared here">;
  568. def note_previous_decl : Note<"%0 declared here">;
  569. def note_member_synthesized_at : Note<
  570. "implicit default %select{constructor|copy constructor|"
  571. "copy assignment operator|destructor}0 for %1 first required here">;
  572. def err_missing_default_ctor : Error<
  573. "%select{|implicit default }0constructor for %1 must explicitly initialize "
  574. "the %select{base class|member}2 %3 which does not have a default "
  575. "constructor">;
  576. def err_illegal_union_member : Error<
  577. "union member %0 has a non-trivial %select{constructor|"
  578. "copy constructor|copy assignment operator|destructor}1">;
  579. def note_nontrivial_has_virtual : Note<
  580. "because type %0 has a virtual %select{member function|base class}1">;
  581. def note_nontrivial_has_nontrivial : Note<
  582. "because type %0 has a %select{member|base class}1 with a non-trivial "
  583. "%select{constructor|copy constructor|copy assignment operator|destructor}2">;
  584. def note_nontrivial_user_defined : Note<
  585. "because type %0 has a user-declared %select{constructor|copy constructor|"
  586. "copy assignment operator|destructor}1">;
  587. def err_different_return_type_for_overriding_virtual_function : Error<
  588. "virtual function %0 has a different return type (%1) than the "
  589. "function it overrides (which has return type %2)">;
  590. def note_overridden_virtual_function : Note<
  591. "overridden virtual function is here">;
  592. def err_covariant_return_inaccessible_base : Error<
  593. "invalid covariant return for virtual function: %1 is a "
  594. "%select{private|protected}2 base class of %0">, NoSFINAE;
  595. def err_covariant_return_ambiguous_derived_to_base_conv : Error<
  596. "return type of virtual function %3 is not covariant with the return type of "
  597. "the function it overrides (ambiguous conversion from derived class "
  598. "%0 to base class %1:%2)">;
  599. def err_covariant_return_not_derived : Error<
  600. "return type of virtual function %0 is not covariant with the return type of "
  601. "the function it overrides (%1 is not derived from %2)">;
  602. def err_covariant_return_incomplete : Error<
  603. "return type of virtual function %0 is not covariant with the return type of "
  604. "the function it overrides (%1 is incomplete)">;
  605. def err_covariant_return_type_different_qualifications : Error<
  606. "return type of virtual function %0 is not covariant with the return type of "
  607. "the function it overrides (%1 has different qualifiers than %2)">;
  608. def err_covariant_return_type_class_type_more_qualified : Error<
  609. "return type of virtual function %0 is not covariant with the return type of "
  610. "the function it overrides (class type %1 is more qualified than class "
  611. "type %2">;
  612. // C++ constructors
  613. def err_constructor_cannot_be : Error<"constructor cannot be declared '%0'">;
  614. def err_invalid_qualified_constructor : Error<
  615. "'%0' qualifier is not allowed on a constructor">;
  616. def err_constructor_return_type : Error<
  617. "constructor cannot have a return type">;
  618. def err_constructor_redeclared : Error<"constructor cannot be redeclared">;
  619. def err_constructor_byvalue_arg : Error<
  620. "copy constructor must pass its first argument by reference">;
  621. def warn_no_constructor_for_refconst : Warning<
  622. "%select{struct|union|class|enum}0 %1 does not declare any constructor to "
  623. "initialize its non-modifiable members">;
  624. def note_refconst_member_not_initialized : Note<
  625. "%select{const|reference}0 member %1 will never be initialized">;
  626. // C++ destructors
  627. def err_destructor_not_member : Error<
  628. "destructor must be a non-static member function">;
  629. def err_destructor_cannot_be : Error<"destructor cannot be declared '%0'">;
  630. def err_invalid_qualified_destructor : Error<
  631. "'%0' qualifier is not allowed on a destructor">;
  632. def err_destructor_return_type : Error<"destructor cannot have a return type">;
  633. def err_destructor_redeclared : Error<"destructor cannot be redeclared">;
  634. def err_destructor_with_params : Error<"destructor cannot have any parameters">;
  635. def err_destructor_variadic : Error<"destructor cannot be variadic">;
  636. def err_destructor_typedef_name : Error<
  637. "destructor cannot be declared using a typedef %0 of the class name">;
  638. def err_destructor_name : Error<
  639. "expected the class name after '~' to name the enclosing class">;
  640. def err_destructor_class_name : Error<
  641. "expected the class name after '~' to name a destructor">;
  642. def err_ident_in_pseudo_dtor_not_a_type : Error<
  643. "identifier %0 in pseudo-destructor expression does not name a type">;
  644. // C++ initialization
  645. def err_init_conversion_failed : Error<
  646. "cannot initialize %select{a variable|a parameter|return object|an "
  647. "exception object|a member subobject|an array element|a new value|a value|a "
  648. "base class|a vector element}0 of type %1 with an %select{rvalue|lvalue}2 of "
  649. "type %3">;
  650. def err_lvalue_to_rvalue_ref : Error<"rvalue reference cannot bind to lvalue">;
  651. def err_invalid_initialization : Error<
  652. "invalid initialization of reference of type %0 from expression of type %1">;
  653. def err_lvalue_to_rvalue_ambig_ref : Error<"rvalue reference cannot bind to lvalue "
  654. "due to multiple conversion functions">;
  655. def err_not_reference_to_const_init : Error<
  656. "%select{non-const|volatile}0 lvalue reference to type %1 cannot be "
  657. "initialized with a %select{value|temporary}2 of type %3">;
  658. def err_lvalue_reference_bind_to_temporary : Error<
  659. "%select{non-const|volatile}0 lvalue reference to type %1 cannot bind to a "
  660. "temporary of type %2">;
  661. def err_lvalue_reference_bind_to_unrelated : Error<
  662. "%select{non-const|volatile}0 lvalue reference to type %1 cannot bind to a "
  663. "value of unrelated type %2">;
  664. def err_reference_bind_drops_quals : Error<
  665. "binding of reference to type %0 to a value of type %1 drops qualifiers">;
  666. def err_reference_bind_failed : Error<
  667. "reference to type %0 could not bind to an %select{rvalue|lvalue}1 of type "
  668. "%2">;
  669. def err_reference_bind_init_list : Error<
  670. "reference to type %0 cannot bind to an initializer list">;
  671. def err_init_list_bad_dest_type : Error<
  672. "%select{|non-aggregate }0type %1 cannot be initialized with an initializer "
  673. "list">;
  674. def err_reference_init_drops_quals : Error<
  675. "initialization of reference to type %0 with a %select{value|temporary}1 of type %2 drops "
  676. "qualifiers">;
  677. def err_reference_bind_to_bitfield : Error<
  678. "%select{non-const|volatile}0 reference cannot bind to bit-field %1">;
  679. def err_reference_bind_to_vector_element : Error<
  680. "%select{non-const|volatile}0 reference cannot bind to vector element">;
  681. def err_reference_var_requires_init : Error<
  682. "declaration of reference variable %0 requires an initializer">;
  683. def err_const_var_requires_init : Error<
  684. "declaration of const variable '%0' requires an initializer">;
  685. def err_reference_without_init : Error<
  686. "reference to type %0 requires an initializer">;
  687. def err_reference_has_multiple_inits : Error<
  688. "reference cannot be initialized with multiple values">;
  689. def err_init_non_aggr_init_list : Error<
  690. "initialization of non-aggregate type %0 with an initializer list">;
  691. def err_init_reference_member_uninitialized : Error<
  692. "reference member of type %0 uninitialized">;
  693. def note_uninit_reference_member : Note<
  694. "uninitialized reference member is here">;
  695. def warn_field_is_uninit : Warning<"field is uninitialized when used here">,
  696. InGroup<DiagGroup<"uninitialized">>;
  697. def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
  698. def err_temp_copy_no_viable : Error<
  699. "no viable constructor %select{copying variable|copying parameter|"
  700. "returning object|throwing object|copying member subobject|copying array "
  701. "element|allocating object|copying temporary|initializing base subobject|"
  702. "initializing vector element}0 of type %1">;
  703. def ext_rvalue_to_reference_temp_copy_no_viable : ExtWarn<
  704. "no viable constructor %select{copying variable|copying parameter|"
  705. "returning object|throwing object|copying member subobject|copying array "
  706. "element|allocating object|copying temporary|initializing base subobject|"
  707. "initializing vector element}0 of type %1; C++98 requires a copy "
  708. "constructor when binding a reference to a temporary">,
  709. InGroup<BindToTemporaryCopy>;
  710. def err_temp_copy_ambiguous : Error<
  711. "ambiguous constructor call when %select{copying variable|copying "
  712. "parameter|returning object|throwing object|copying member subobject|copying "
  713. "array element|allocating object|copying temporary|initializing base subobject|"
  714. "initializing vector element}0 of type %1">;
  715. def err_temp_copy_deleted : Error<
  716. "%select{copying variable|copying parameter|returning object|throwing "
  717. "object|copying member subobject|copying array element|allocating object|"
  718. "copying temporary|initializing base subobject|initializing vector element}0 "
  719. "of type %1 invokes deleted constructor">;
  720. def err_temp_copy_incomplete : Error<
  721. "copying a temporary object of incomplete type %0">;
  722. // C++0x decltype
  723. def err_cannot_determine_declared_type_of_overloaded_function : Error<
  724. "cannot determine the %select{type|declared type}0 of an overloaded "
  725. "function">;
  726. // C++0x auto
  727. def err_auto_variable_cannot_appear_in_own_initializer : Error<
  728. "variable %0 declared with 'auto' type cannot appear in its own initializer">;
  729. def err_illegal_decl_array_of_auto : Error<
  730. "'%0' declared as array of 'auto'">;
  731. def err_auto_not_allowed : Error<
  732. "'auto' not allowed in %select{function prototype|struct member|union member"
  733. "|class member|exception declaration|template parameter|block literal}0">;
  734. def err_auto_var_requires_init : Error<
  735. "declaration of variable %0 with type %1 requires an initializer">;
  736. // C++0x attributes
  737. def err_repeat_attribute : Error<"'%0' attribute cannot be repeated">;
  738. // C++0x [[final]]
  739. def err_final_function_overridden : Error<
  740. "declaration of %0 overrides a 'final' function">;
  741. def err_final_base : Error<
  742. "derivation from 'final' %0">;
  743. // Objective-C++
  744. def err_objc_decls_may_only_appear_in_global_scope : Error<
  745. "Objective-C declarations may only appear in global scope">;
  746. def err_nsobject_attribute : Error<
  747. "__attribute ((NSObject)) is for pointer types only">;
  748. // Attributes
  749. def err_attribute_can_be_applied_only_to_symbol_declaration : Error<
  750. "%0 attribute can be applied only to symbol declaration">;
  751. def err_attributes_are_not_compatible : Error<
  752. "%0 and %1 attributes are not compatible">;
  753. def err_attribute_wrong_number_arguments : Error<
  754. "attribute requires %0 argument(s)">;
  755. def err_attribute_missing_parameter_name : Error<
  756. "attribute requires unquoted parameter">;
  757. def err_attribute_invalid_vector_type : Error<"invalid vector type %0">;
  758. def err_attribute_argument_not_int : Error<
  759. "'%0' attribute requires integer constant">;
  760. def err_attribute_argument_outof_range : Error<
  761. "init_priority attribute requires integer constant between "
  762. "101 and 65535 inclusive">;
  763. def err_init_priority_object_attr : Error<
  764. "can only use â&#x20AC;&#x2DC;init_priorityâ&#x20AC;&#x2122; attribute on file-scope definitions "
  765. "of objects of class type">;
  766. def err_attribute_argument_n_not_int : Error<
  767. "'%0' attribute requires parameter %1 to be an integer constant">;
  768. def err_attribute_argument_n_not_string : Error<
  769. "'%0' attribute requires parameter %1 to be a string">;
  770. def err_attribute_argument_out_of_bounds : Error<
  771. "'%0' attribute parameter %1 is out of bounds">;
  772. def err_attribute_requires_objc_interface : Error<
  773. "attribute may only be applied to an Objective-C interface">;
  774. def err_nonnull_pointers_only : Error<
  775. "nonnull attribute only applies to pointer arguments">;
  776. def err_format_strftime_third_parameter : Error<
  777. "strftime format attribute requires 3rd parameter to be 0">;
  778. def err_format_attribute_requires_variadic : Error<
  779. "format attribute requires variadic function">;
  780. def err_format_attribute_not : Error<"format argument not %0">;
  781. def err_format_attribute_result_not : Error<"function does not return %0">;
  782. def err_attribute_invalid_size : Error<
  783. "vector size not an integral multiple of component size">;
  784. def err_attribute_zero_size : Error<"zero vector size">;
  785. def err_typecheck_vector_not_convertable : Error<
  786. "can't convert between vector values of different size (%0 and %1)">;
  787. def err_typecheck_ext_vector_not_typedef : Error<
  788. "ext_vector_type only applies to types, not variables">;
  789. def err_unsupported_vector_size : Error<
  790. "unsupported type %0 for vector_size attribute, please use on typedef">;
  791. def err_ext_vector_component_exceeds_length : Error<
  792. "vector component access exceeds type %0">;
  793. def err_ext_vector_component_name_illegal : Error<
  794. "illegal vector component name '%0'">;
  795. def err_attribute_address_space_not_int : Error<
  796. "address space attribute requires an integer constant">;
  797. def err_attribute_address_space_negative : Error<
  798. "address space is negative">;
  799. def err_attribute_address_space_too_high : Error<
  800. "address space is larger than the maximum supported (%0)">;
  801. def err_attribute_address_multiple_qualifiers : Error<
  802. "multiple address spaces specified for type">;
  803. def err_implicit_pointer_address_space_cast : Error<
  804. "illegal implicit cast between two pointers with different address spaces">;
  805. def err_as_qualified_auto_decl : Error<
  806. "automatic variable qualified with an address space">;
  807. def err_arg_with_address_space : Error<
  808. "parameter may not be qualified with an address space">;
  809. def err_attribute_not_string : Error<
  810. "argument to %0 attribute was not a string literal">;
  811. def err_attribute_section_invalid_for_target : Error<
  812. "argument to 'section' attribute is not valid for this target: %0">;
  813. def err_attribute_section_local_variable : Error<
  814. "'section' attribute is not valid on local variables">;
  815. def err_attribute_aligned_not_power_of_two : Error<
  816. "requested alignment is not a power of 2">;
  817. def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
  818. "'%0' redeclared without %1 attribute: previous %1 ignored">;
  819. def warn_attribute_ignored : Warning<"%0 attribute ignored">;
  820. def warn_attribute_precede_definition : Warning<
  821. "attribute declaration must precede definition">;
  822. def warn_attribute_void_function_method : Warning<
  823. "attribute %0 cannot be applied to "
  824. "%select{functions|Objective-C method}1 without return value">;
  825. def warn_attribute_weak_on_field : Warning<
  826. "__weak attribute cannot be specified on a field declaration">;
  827. def warn_attribute_weak_on_local : Warning<
  828. "__weak attribute cannot be specified on an automatic variable">;
  829. def warn_weak_identifier_undeclared : Warning<
  830. "weak identifier %0 never declared">;
  831. def err_attribute_weak_static : Error<
  832. "weak declaration of '%0' must be public">;
  833. def warn_attribute_weak_import_invalid_on_definition : Warning<
  834. "'weak_import' attribute cannot be specified on a definition">;
  835. def err_attribute_weakref_not_static : Error<
  836. "weakref declaration of '%0' must be static">;
  837. def err_attribute_weakref_not_global_context : Error<
  838. "weakref declaration of '%0' must be in a global context">;
  839. def err_attribute_weakref_without_alias : Error<
  840. "weakref declaration of '%0' must also have an alias attribute">;
  841. def warn_attribute_wrong_decl_type : Warning<
  842. "%0 attribute only applies to %select{function|union|"
  843. "variable and function|function or method|parameter|"
  844. "parameter or Objective-C method |function, method or block|"
  845. "virtual method or class|function, method, or parameter|class|virtual method"
  846. "|member}1 types">;
  847. def err_attribute_wrong_decl_type : Error<
  848. "%0 attribute only applies to %select{function|union|"
  849. "variable and function|function or method|parameter|"
  850. "parameter or Objective-C method |function, method or block|"
  851. "virtual method or class|function, method, or parameter|class|virtual method"
  852. "|member}1 types">;
  853. def warn_function_attribute_wrong_type : Warning<
  854. "%0 only applies to function types; type here is %1">;
  855. def warn_gnu_inline_attribute_requires_inline : Warning<
  856. "'gnu_inline' attribute requires function to be marked 'inline',"
  857. " attribute ignored">;
  858. def err_cconv_change : Error<
  859. "function declared '%0' here was previously declared "
  860. "%select{'%2'|without calling convention}1">;
  861. def err_cconv_knr : Error<
  862. "function with no prototype cannot use %0 calling convention">;
  863. def err_cconv_varargs : Error<
  864. "variadic function cannot use %0 calling convention">;
  865. def err_regparm_mismatch : Error<"function declared with with regparm(%0) "
  866. "attribute was previously declared %plural{0:without the regparm|1:"
  867. "with the regparm(1)|2:with the regparm(2)|3:with the regparm(3)|:with the"
  868. "regparm}1 attribute">;
  869. def warn_impcast_vector_scalar : Warning<
  870. "implicit cast turns vector to scalar: %0 to %1">,
  871. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  872. def warn_impcast_complex_scalar : Warning<
  873. "implicit cast discards imaginary component: %0 to %1">,
  874. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  875. def warn_impcast_float_precision : Warning<
  876. "implicit cast loses floating-point precision: %0 to %1">,
  877. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  878. def warn_impcast_float_integer : Warning<
  879. "implicit cast turns floating-point number into integer: %0 to %1">,
  880. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  881. def warn_impcast_integer_sign : Warning<
  882. "implicit cast changes signedness: %0 to %1">,
  883. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  884. def warn_impcast_integer_sign_conditional : Warning<
  885. "operand of ? changes signedness: %0 to %1">,
  886. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  887. def warn_impcast_integer_precision : Warning<
  888. "implicit cast loses integer precision: %0 to %1">,
  889. InGroup<DiagGroup<"conversion">>, DefaultIgnore;
  890. def warn_impcast_integer_64_32 : Warning<
  891. "implicit cast loses integer precision: %0 to %1">,
  892. InGroup<DiagGroup<"shorten-64-to-32">>, DefaultIgnore;
  893. def warn_attribute_ignored_for_field_of_type : Warning<
  894. "%0 attribute ignored for field of type %1">;
  895. def warn_transparent_union_attribute_field_size_align : Warning<
  896. "%select{alignment|size}0 of field %1 (%2 bits) does not match the "
  897. "%select{alignment|size}0 of the first field in transparent union; "
  898. "transparent_union attribute ignored">;
  899. def note_transparent_union_first_field_size_align : Note<
  900. "%select{alignment|size}0 of first field is %1 bits">;
  901. def warn_transparent_union_attribute_not_definition : Warning<
  902. "transparent_union attribute can only be applied to a union definition; "
  903. "attribute ignored">;
  904. def warn_transparent_union_attribute_floating : Warning<
  905. "first field of a transparent union cannot have floating point or vector "
  906. "type; transparent_union attribute ignored">;
  907. def warn_transparent_union_attribute_zero_fields : Warning<
  908. "transparent union definition must contain at least one field; "
  909. "transparent_union attribute ignored">;
  910. def warn_attribute_type_not_supported : Warning<
  911. "'%0' attribute argument not supported: %1">;
  912. def warn_attribute_unknown_visibility : Warning<"unknown visibility '%1'">;
  913. def err_unknown_machine_mode : Error<"unknown machine mode %0">;
  914. def err_unsupported_machine_mode : Error<"unsupported machine mode %0">;
  915. def err_mode_not_primitive : Error<
  916. "mode attribute only supported for integer and floating-point types">;
  917. def err_mode_wrong_type : Error<
  918. "type of machine mode does not match type of base type">;
  919. def err_attr_wrong_decl : Error<
  920. "'%0' attribute invalid on this declaration, requires typedef or value">;
  921. def warn_attribute_nonnull_no_pointers : Warning<
  922. "'nonnull' attribute applied to function with no pointer arguments">;
  923. def warn_attribute_malloc_pointer_only : Warning<
  924. "'malloc' attribute only applies to functions returning a pointer type">;
  925. def warn_transparent_union_nonpointer : Warning<
  926. "'transparent_union' attribute support incomplete; only supported for "
  927. "pointer unions">;
  928. def warn_attribute_sentinel_named_arguments : Warning<
  929. "'sentinel' attribute requires named arguments">;
  930. def warn_attribute_sentinel_not_variadic : Warning<
  931. "'sentinel' attribute only supported for variadic %select{functions|blocks}0">;
  932. def err_attribute_sentinel_less_than_zero : Error<
  933. "'sentinel' parameter 1 less than zero">;
  934. def err_attribute_sentinel_not_zero_or_one : Error<
  935. "'sentinel' parameter 2 not 0 or 1">;
  936. def err_attribute_cleanup_arg_not_found : Error<
  937. "'cleanup' argument %0 not found">;
  938. def err_attribute_cleanup_arg_not_function : Error<
  939. "'cleanup' argument %0 is not a function">;
  940. def err_attribute_cleanup_func_must_take_one_arg : Error<
  941. "'cleanup' function %0 must take 1 parameter">;
  942. def err_attribute_cleanup_func_arg_incompatible_type : Error<
  943. "'cleanup' function %0 parameter has type %1 which is incompatible with "
  944. "type %2">;
  945. def err_attribute_regparm_wrong_platform : Error<
  946. "'regparm' is not valid on this platform">;
  947. def err_attribute_regparm_invalid_number : Error<
  948. "'regparm' parameter must be between 0 and %0 inclusive">;
  949. // Clang-Specific Attributes
  950. def err_attribute_iboutlet : Error<
  951. "%0 attribute can only be applied to instance variables or properties">;
  952. def err_attribute_ibaction: Error<
  953. "ibaction attribute can only be applied to…

Large files files are truncated, but you can click here to view the full file