1*67e74705SXin Li//==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===// 2*67e74705SXin Li// 3*67e74705SXin Li// The LLVM Compiler Infrastructure 4*67e74705SXin Li// 5*67e74705SXin Li// This file is distributed under the University of Illinois Open Source 6*67e74705SXin Li// License. See LICENSE.TXT for details. 7*67e74705SXin Li// 8*67e74705SXin Li//===----------------------------------------------------------------------===// 9*67e74705SXin Li 10*67e74705SXin Li//===----------------------------------------------------------------------===// 11*67e74705SXin Li// Semantic Analysis 12*67e74705SXin Li//===----------------------------------------------------------------------===// 13*67e74705SXin Li 14*67e74705SXin Lilet Component = "Sema" in { 15*67e74705SXin Lilet CategoryName = "Semantic Issue" in { 16*67e74705SXin Li 17*67e74705SXin Lidef note_previous_decl : Note<"%0 declared here">; 18*67e74705SXin Lidef note_entity_declared_at : Note<"%0 declared here">; 19*67e74705SXin Lidef note_callee_decl : Note<"%0 declared here">; 20*67e74705SXin Lidef note_defined_here : Note<"%0 defined here">; 21*67e74705SXin Li 22*67e74705SXin Li// For loop analysis 23*67e74705SXin Lidef warn_variables_not_in_loop_body : Warning< 24*67e74705SXin Li "variable%select{s| %1|s %1 and %2|s %1, %2, and %3|s %1, %2, %3, and %4}0 " 25*67e74705SXin Li "used in loop condition not modified in loop body">, 26*67e74705SXin Li InGroup<ForLoopAnalysis>, DefaultIgnore; 27*67e74705SXin Lidef warn_redundant_loop_iteration : Warning< 28*67e74705SXin Li "variable %0 is %select{decremented|incremented}1 both in the loop header " 29*67e74705SXin Li "and in the loop body">, 30*67e74705SXin Li InGroup<ForLoopAnalysis>, DefaultIgnore; 31*67e74705SXin Lidef note_loop_iteration_here : Note<"%select{decremented|incremented}0 here">; 32*67e74705SXin Li 33*67e74705SXin Lidef warn_duplicate_enum_values : Warning< 34*67e74705SXin Li "element %0 has been implicitly assigned %1 which another element has " 35*67e74705SXin Li "been assigned">, InGroup<DiagGroup<"duplicate-enum">>, DefaultIgnore; 36*67e74705SXin Lidef note_duplicate_element : Note<"element %0 also has value %1">; 37*67e74705SXin Li 38*67e74705SXin Li// Absolute value functions 39*67e74705SXin Lidef warn_unsigned_abs : Warning< 40*67e74705SXin Li "taking the absolute value of unsigned type %0 has no effect">, 41*67e74705SXin Li InGroup<AbsoluteValue>; 42*67e74705SXin Lidef note_remove_abs : Note< 43*67e74705SXin Li "remove the call to '%0' since unsigned values cannot be negative">; 44*67e74705SXin Lidef warn_abs_too_small : Warning< 45*67e74705SXin Li "absolute value function %0 given an argument of type %1 but has parameter " 46*67e74705SXin Li "of type %2 which may cause truncation of value">, InGroup<AbsoluteValue>; 47*67e74705SXin Lidef warn_wrong_absolute_value_type : Warning< 48*67e74705SXin Li "using %select{integer|floating point|complex}1 absolute value function %0 " 49*67e74705SXin Li "when argument is of %select{integer|floating point|complex}2 type">, 50*67e74705SXin Li InGroup<AbsoluteValue>; 51*67e74705SXin Lidef note_replace_abs_function : Note<"use function '%0' instead">; 52*67e74705SXin Lidef warn_pointer_abs : Warning< 53*67e74705SXin Li "taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious">, 54*67e74705SXin Li InGroup<AbsoluteValue>; 55*67e74705SXin Li 56*67e74705SXin Lidef warn_infinite_recursive_function : Warning< 57*67e74705SXin Li "all paths through this function will call itself">, 58*67e74705SXin Li InGroup<InfiniteRecursion>, DefaultIgnore; 59*67e74705SXin Li 60*67e74705SXin Lidef warn_comma_operator : Warning<"possible misuse of comma operator here">, 61*67e74705SXin Li InGroup<DiagGroup<"comma">>, DefaultIgnore; 62*67e74705SXin Lidef note_cast_to_void : Note<"cast expression to void to silence warning">; 63*67e74705SXin Li 64*67e74705SXin Li// Constant expressions 65*67e74705SXin Lidef err_expr_not_ice : Error< 66*67e74705SXin Li "expression is not an %select{integer|integral}0 constant expression">; 67*67e74705SXin Lidef ext_expr_not_ice : Extension< 68*67e74705SXin Li "expression is not an %select{integer|integral}0 constant expression; " 69*67e74705SXin Li "folding it to a constant is a GNU extension">, InGroup<GNUFoldingConstant>; 70*67e74705SXin Lidef err_typecheck_converted_constant_expression : Error< 71*67e74705SXin Li "value of type %0 is not implicitly convertible to %1">; 72*67e74705SXin Lidef err_typecheck_converted_constant_expression_disallowed : Error< 73*67e74705SXin Li "conversion from %0 to %1 is not allowed in a converted constant expression">; 74*67e74705SXin Lidef err_typecheck_converted_constant_expression_indirect : Error< 75*67e74705SXin Li "conversion from %0 to %1 in converted constant expression would " 76*67e74705SXin Li "bind reference to a temporary">; 77*67e74705SXin Lidef err_expr_not_cce : Error< 78*67e74705SXin Li "%select{case value|enumerator value|non-type template argument|" 79*67e74705SXin Li "array size|constexpr if condition}0 " 80*67e74705SXin Li "is not a constant expression">; 81*67e74705SXin Lidef ext_cce_narrowing : ExtWarn< 82*67e74705SXin Li "%select{case value|enumerator value|non-type template argument|" 83*67e74705SXin Li "array size|constexpr if condition}0 " 84*67e74705SXin Li "%select{cannot be narrowed from type %2 to %3|" 85*67e74705SXin Li "evaluates to %2, which cannot be narrowed to type %3}1">, 86*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure; 87*67e74705SXin Lidef err_ice_not_integral : Error< 88*67e74705SXin Li "integral constant expression must have integral or unscoped enumeration " 89*67e74705SXin Li "type, not %0">; 90*67e74705SXin Lidef err_ice_incomplete_type : Error< 91*67e74705SXin Li "integral constant expression has incomplete class type %0">; 92*67e74705SXin Lidef err_ice_explicit_conversion : Error< 93*67e74705SXin Li "integral constant expression requires explicit conversion from %0 to %1">; 94*67e74705SXin Lidef note_ice_conversion_here : Note< 95*67e74705SXin Li "conversion to %select{integral|enumeration}0 type %1 declared here">; 96*67e74705SXin Lidef err_ice_ambiguous_conversion : Error< 97*67e74705SXin Li "ambiguous conversion from type %0 to an integral or unscoped " 98*67e74705SXin Li "enumeration type">; 99*67e74705SXin Lidef err_ice_too_large : Error< 100*67e74705SXin Li "integer constant expression evaluates to value %0 that cannot be " 101*67e74705SXin Li "represented in a %1-bit %select{signed|unsigned}2 integer type">; 102*67e74705SXin Lidef err_expr_not_string_literal : Error<"expression is not a string literal">; 103*67e74705SXin Li 104*67e74705SXin Li// Semantic analysis of constant literals. 105*67e74705SXin Lidef ext_predef_outside_function : Warning< 106*67e74705SXin Li "predefined identifier is only valid inside function">, 107*67e74705SXin Li InGroup<DiagGroup<"predefined-identifier-outside-function">>; 108*67e74705SXin Lidef warn_float_overflow : Warning< 109*67e74705SXin Li "magnitude of floating-point constant too large for type %0; maximum is %1">, 110*67e74705SXin Li InGroup<LiteralRange>; 111*67e74705SXin Lidef warn_float_underflow : Warning< 112*67e74705SXin Li "magnitude of floating-point constant too small for type %0; minimum is %1">, 113*67e74705SXin Li InGroup<LiteralRange>; 114*67e74705SXin Lidef warn_double_const_requires_fp64 : Warning< 115*67e74705SXin Li "double precision constant requires cl_khr_fp64, casting to single precision">; 116*67e74705SXin Lidef err_half_const_requires_fp16 : Error< 117*67e74705SXin Li "half precision constant requires cl_khr_fp16">; 118*67e74705SXin Li 119*67e74705SXin Li// C99 variable-length arrays 120*67e74705SXin Lidef ext_vla : Extension<"variable length arrays are a C99 feature">, 121*67e74705SXin Li InGroup<VLAExtension>; 122*67e74705SXin Lidef warn_vla_used : Warning<"variable length array used">, 123*67e74705SXin Li InGroup<VLA>, DefaultIgnore; 124*67e74705SXin Lidef err_vla_in_sfinae : Error< 125*67e74705SXin Li "variable length array cannot be formed during template argument deduction">; 126*67e74705SXin Lidef err_array_star_in_function_definition : Error< 127*67e74705SXin Li "variable length array must be bound in function definition">; 128*67e74705SXin Lidef err_vla_decl_in_file_scope : Error< 129*67e74705SXin Li "variable length array declaration not allowed at file scope">; 130*67e74705SXin Lidef err_vla_decl_has_static_storage : Error< 131*67e74705SXin Li "variable length array declaration cannot have 'static' storage duration">; 132*67e74705SXin Lidef err_vla_decl_has_extern_linkage : Error< 133*67e74705SXin Li "variable length array declaration cannot have 'extern' linkage">; 134*67e74705SXin Lidef ext_vla_folded_to_constant : Extension< 135*67e74705SXin Li "variable length array folded to constant array as an extension">, InGroup<GNUFoldingConstant>; 136*67e74705SXin Li 137*67e74705SXin Li// C99 variably modified types 138*67e74705SXin Lidef err_variably_modified_template_arg : Error< 139*67e74705SXin Li "variably modified type %0 cannot be used as a template argument">; 140*67e74705SXin Lidef err_variably_modified_nontype_template_param : Error< 141*67e74705SXin Li "non-type template parameter of variably modified type %0">; 142*67e74705SXin Lidef err_variably_modified_new_type : Error< 143*67e74705SXin Li "'new' cannot allocate object of variably modified type %0">; 144*67e74705SXin Li 145*67e74705SXin Li// C99 Designated Initializers 146*67e74705SXin Lidef ext_designated_init : Extension< 147*67e74705SXin Li "designated initializers are a C99 feature">, InGroup<C99>; 148*67e74705SXin Lidef err_array_designator_negative : Error< 149*67e74705SXin Li "array designator value '%0' is negative">; 150*67e74705SXin Lidef err_array_designator_empty_range : Error< 151*67e74705SXin Li "array designator range [%0, %1] is empty">; 152*67e74705SXin Lidef err_array_designator_non_array : Error< 153*67e74705SXin Li "array designator cannot initialize non-array type %0">; 154*67e74705SXin Lidef err_array_designator_too_large : Error< 155*67e74705SXin Li "array designator index (%0) exceeds array bounds (%1)">; 156*67e74705SXin Lidef err_field_designator_non_aggr : Error< 157*67e74705SXin Li "field designator cannot initialize a " 158*67e74705SXin Li "%select{non-struct, non-union|non-class}0 type %1">; 159*67e74705SXin Lidef err_field_designator_unknown : Error< 160*67e74705SXin Li "field designator %0 does not refer to any field in type %1">; 161*67e74705SXin Lidef err_field_designator_nonfield : Error< 162*67e74705SXin Li "field designator %0 does not refer to a non-static data member">; 163*67e74705SXin Lidef note_field_designator_found : Note<"field designator refers here">; 164*67e74705SXin Lidef err_designator_for_scalar_init : Error< 165*67e74705SXin Li "designator in initializer for scalar type %0">; 166*67e74705SXin Lidef warn_subobject_initializer_overrides : Warning< 167*67e74705SXin Li "subobject initialization overrides initialization of other fields " 168*67e74705SXin Li "within its enclosing subobject">, InGroup<InitializerOverrides>; 169*67e74705SXin Lidef warn_initializer_overrides : Warning< 170*67e74705SXin Li "initializer overrides prior initialization of this subobject">, 171*67e74705SXin Li InGroup<InitializerOverrides>; 172*67e74705SXin Lidef note_previous_initializer : Note< 173*67e74705SXin Li "previous initialization %select{|with side effects }0is here" 174*67e74705SXin Li "%select{| (side effects may not occur at run time)}0">; 175*67e74705SXin Lidef err_designator_into_flexible_array_member : Error< 176*67e74705SXin Li "designator into flexible array member subobject">; 177*67e74705SXin Lidef note_flexible_array_member : Note< 178*67e74705SXin Li "initialized flexible array member %0 is here">; 179*67e74705SXin Lidef ext_flexible_array_init : Extension< 180*67e74705SXin Li "flexible array initialization is a GNU extension">, InGroup<GNUFlexibleArrayInitializer>; 181*67e74705SXin Li 182*67e74705SXin Li// Declarations. 183*67e74705SXin Lidef ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">, 184*67e74705SXin Li InGroup<DuplicateDeclSpecifier>; 185*67e74705SXin Lidef warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">, 186*67e74705SXin Li InGroup<DuplicateDeclSpecifier>; 187*67e74705SXin Lidef ext_plain_complex : ExtWarn< 188*67e74705SXin Li "plain '_Complex' requires a type specifier; assuming '_Complex double'">; 189*67e74705SXin Lidef ext_integer_complex : Extension< 190*67e74705SXin Li "complex integer types are a GNU extension">, InGroup<GNUComplexInteger>; 191*67e74705SXin Li 192*67e74705SXin Lidef err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">; 193*67e74705SXin Lidef err_invalid_width_spec : Error< 194*67e74705SXin Li "'%select{|short|long|long long}0 %1' is invalid">; 195*67e74705SXin Lidef err_invalid_complex_spec : Error<"'_Complex %0' is invalid">; 196*67e74705SXin Lidef err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">; 197*67e74705SXin Li 198*67e74705SXin Lidef ext_auto_type_specifier : ExtWarn< 199*67e74705SXin Li "'auto' type specifier is a C++11 extension">, InGroup<CXX11>; 200*67e74705SXin Lidef warn_auto_storage_class : Warning< 201*67e74705SXin Li "'auto' storage class specifier is redundant and incompatible with C++11">, 202*67e74705SXin Li InGroup<CXX11Compat>, DefaultIgnore; 203*67e74705SXin Li 204*67e74705SXin Lidef warn_deprecated_register : Warning< 205*67e74705SXin Li "'register' storage class specifier is deprecated " 206*67e74705SXin Li "and incompatible with C++1z">, InGroup<DeprecatedRegister>; 207*67e74705SXin Lidef ext_register_storage_class : ExtWarn< 208*67e74705SXin Li "ISO C++1z does not allow 'register' storage class specifier">, 209*67e74705SXin Li DefaultError, InGroup<Register>; 210*67e74705SXin Li 211*67e74705SXin Lidef err_invalid_decl_spec_combination : Error< 212*67e74705SXin Li "cannot combine with previous '%0' declaration specifier">; 213*67e74705SXin Lidef err_invalid_vector_decl_spec_combination : Error< 214*67e74705SXin Li "cannot combine with previous '%0' declaration specifier. " 215*67e74705SXin Li "'__vector' must be first">; 216*67e74705SXin Lidef err_invalid_pixel_decl_spec_combination : Error< 217*67e74705SXin Li "'__pixel' must be preceded by '__vector'. " 218*67e74705SXin Li "'%0' declaration specifier not allowed here">; 219*67e74705SXin Lidef err_invalid_vector_bool_decl_spec : Error< 220*67e74705SXin Li "cannot use '%0' with '__vector bool'">; 221*67e74705SXin Lidef err_invalid_vector_long_decl_spec : Error< 222*67e74705SXin Li "cannot use 'long' with '__vector'">; 223*67e74705SXin Lidef err_invalid_vector_float_decl_spec : Error< 224*67e74705SXin Li "cannot use 'float' with '__vector'">; 225*67e74705SXin Lidef err_invalid_vector_double_decl_spec : Error < 226*67e74705SXin Li "use of 'double' with '__vector' requires VSX support to be enabled " 227*67e74705SXin Li "(available on POWER7 or later)">; 228*67e74705SXin Lidef err_invalid_vector_long_long_decl_spec : Error < 229*67e74705SXin Li "use of 'long long' with '__vector bool' requires VSX support (available on " 230*67e74705SXin Li "POWER7 or later) or extended Altivec support (available on POWER8 or later) " 231*67e74705SXin Li "to be enabled">; 232*67e74705SXin Lidef err_invalid_vector_long_double_decl_spec : Error< 233*67e74705SXin Li "cannot use 'long double' with '__vector'">; 234*67e74705SXin Lidef warn_vector_long_decl_spec_combination : Warning< 235*67e74705SXin Li "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>; 236*67e74705SXin Li 237*67e74705SXin Lidef err_use_of_tag_name_without_tag : Error< 238*67e74705SXin Li "must use '%1' tag to refer to type %0%select{| in this scope}2">; 239*67e74705SXin Li 240*67e74705SXin Lidef err_redeclaration_different_type : Error< 241*67e74705SXin Li "redeclaration of %0 with a different type%diff{: $ vs $|}1,2">; 242*67e74705SXin Lidef err_bad_variable_name : Error< 243*67e74705SXin Li "%0 cannot be the name of a variable or data member">; 244*67e74705SXin Lidef err_bad_parameter_name : Error< 245*67e74705SXin Li "%0 cannot be the name of a parameter">; 246*67e74705SXin Lidef err_parameter_name_omitted : Error<"parameter name omitted">; 247*67e74705SXin Lidef err_anyx86_interrupt_attribute : Error< 248*67e74705SXin Li "%select{x86|x86-64}0 'interrupt' attribute only applies to functions that " 249*67e74705SXin Li "have %select{a 'void' return type|" 250*67e74705SXin Li "only a pointer parameter optionally followed by an integer parameter|" 251*67e74705SXin Li "a pointer as the first parameter|a %2 type as the second parameter}1">; 252*67e74705SXin Lidef err_anyx86_interrupt_called : Error< 253*67e74705SXin Li "interrupt service routine cannot be called directly">; 254*67e74705SXin Lidef warn_mips_interrupt_attribute : Warning< 255*67e74705SXin Li "MIPS 'interrupt' attribute only applies to functions that have " 256*67e74705SXin Li "%select{no parameters|a 'void' return type}0">, 257*67e74705SXin Li InGroup<IgnoredAttributes>; 258*67e74705SXin Lidef warn_unused_parameter : Warning<"unused parameter %0">, 259*67e74705SXin Li InGroup<UnusedParameter>, DefaultIgnore; 260*67e74705SXin Lidef warn_unused_variable : Warning<"unused variable %0">, 261*67e74705SXin Li InGroup<UnusedVariable>, DefaultIgnore; 262*67e74705SXin Lidef warn_unused_local_typedef : Warning< 263*67e74705SXin Li "unused %select{typedef|type alias}0 %1">, 264*67e74705SXin Li InGroup<UnusedLocalTypedef>, DefaultIgnore; 265*67e74705SXin Lidef warn_unused_property_backing_ivar : 266*67e74705SXin Li Warning<"ivar %0 which backs the property is not " 267*67e74705SXin Li "referenced in this property's accessor">, 268*67e74705SXin Li InGroup<UnusedPropertyIvar>, DefaultIgnore; 269*67e74705SXin Lidef warn_unused_const_variable : Warning<"unused variable %0">, 270*67e74705SXin Li InGroup<UnusedConstVariable>, DefaultIgnore; 271*67e74705SXin Lidef warn_unused_exception_param : Warning<"unused exception parameter %0">, 272*67e74705SXin Li InGroup<UnusedExceptionParameter>, DefaultIgnore; 273*67e74705SXin Lidef warn_decl_in_param_list : Warning< 274*67e74705SXin Li "declaration of %0 will not be visible outside of this function">, 275*67e74705SXin Li InGroup<Visibility>; 276*67e74705SXin Lidef warn_redefinition_in_param_list : Warning< 277*67e74705SXin Li "redefinition of %0 will not be visible outside of this function">, 278*67e74705SXin Li InGroup<Visibility>; 279*67e74705SXin Lidef warn_empty_parens_are_function_decl : Warning< 280*67e74705SXin Li "empty parentheses interpreted as a function declaration">, 281*67e74705SXin Li InGroup<VexingParse>; 282*67e74705SXin Lidef warn_parens_disambiguated_as_function_declaration : Warning< 283*67e74705SXin Li "parentheses were disambiguated as a function declaration">, 284*67e74705SXin Li InGroup<VexingParse>; 285*67e74705SXin Lidef note_additional_parens_for_variable_declaration : Note< 286*67e74705SXin Li "add a pair of parentheses to declare a variable">; 287*67e74705SXin Lidef note_empty_parens_function_call : Note< 288*67e74705SXin Li "change this ',' to a ';' to call %0">; 289*67e74705SXin Lidef note_empty_parens_default_ctor : Note< 290*67e74705SXin Li "remove parentheses to declare a variable">; 291*67e74705SXin Lidef note_empty_parens_zero_initialize : Note< 292*67e74705SXin Li "replace parentheses with an initializer to declare a variable">; 293*67e74705SXin Lidef warn_unused_function : Warning<"unused function %0">, 294*67e74705SXin Li InGroup<UnusedFunction>, DefaultIgnore; 295*67e74705SXin Lidef warn_unused_member_function : Warning<"unused member function %0">, 296*67e74705SXin Li InGroup<UnusedMemberFunction>, DefaultIgnore; 297*67e74705SXin Lidef warn_used_but_marked_unused: Warning<"%0 was marked unused but was used">, 298*67e74705SXin Li InGroup<UsedButMarkedUnused>, DefaultIgnore; 299*67e74705SXin Lidef warn_unneeded_internal_decl : Warning< 300*67e74705SXin Li "%select{function|variable}0 %1 is not needed and will not be emitted">, 301*67e74705SXin Li InGroup<UnneededInternalDecl>, DefaultIgnore; 302*67e74705SXin Lidef warn_unneeded_static_internal_decl : Warning< 303*67e74705SXin Li "'static' function %0 declared in header file " 304*67e74705SXin Li "should be declared 'static inline'">, 305*67e74705SXin Li InGroup<UnneededInternalDecl>, DefaultIgnore; 306*67e74705SXin Lidef warn_unneeded_member_function : Warning< 307*67e74705SXin Li "member function %0 is not needed and will not be emitted">, 308*67e74705SXin Li InGroup<UnneededMemberFunction>, DefaultIgnore; 309*67e74705SXin Lidef warn_unused_private_field: Warning<"private field %0 is not used">, 310*67e74705SXin Li InGroup<UnusedPrivateField>, DefaultIgnore; 311*67e74705SXin Li 312*67e74705SXin Lidef warn_parameter_size: Warning< 313*67e74705SXin Li "%0 is a large (%1 bytes) pass-by-value argument; " 314*67e74705SXin Li "pass it by reference instead ?">, InGroup<LargeByValueCopy>; 315*67e74705SXin Lidef warn_return_value_size: Warning< 316*67e74705SXin Li "return value of %0 is a large (%1 bytes) pass-by-value object; " 317*67e74705SXin Li "pass it by reference instead ?">, InGroup<LargeByValueCopy>; 318*67e74705SXin Lidef warn_return_value_udt: Warning< 319*67e74705SXin Li "%0 has C-linkage specified, but returns user-defined type %1 which is " 320*67e74705SXin Li "incompatible with C">, InGroup<ReturnTypeCLinkage>; 321*67e74705SXin Lidef warn_return_value_udt_incomplete: Warning< 322*67e74705SXin Li "%0 has C-linkage specified, but returns incomplete type %1 which could be " 323*67e74705SXin Li "incompatible with C">, InGroup<ReturnTypeCLinkage>; 324*67e74705SXin Lidef warn_implicit_function_decl : Warning< 325*67e74705SXin Li "implicit declaration of function %0">, 326*67e74705SXin Li InGroup<ImplicitFunctionDeclare>, DefaultIgnore; 327*67e74705SXin Lidef ext_implicit_function_decl : ExtWarn< 328*67e74705SXin Li "implicit declaration of function %0 is invalid in C99">, 329*67e74705SXin Li InGroup<ImplicitFunctionDeclare>; 330*67e74705SXin Lidef note_function_suggestion : Note<"did you mean %0?">; 331*67e74705SXin Li 332*67e74705SXin Lidef err_ellipsis_first_param : Error< 333*67e74705SXin Li "ISO C requires a named parameter before '...'">; 334*67e74705SXin Lidef err_declarator_need_ident : Error<"declarator requires an identifier">; 335*67e74705SXin Lidef err_language_linkage_spec_unknown : Error<"unknown linkage language">; 336*67e74705SXin Lidef err_language_linkage_spec_not_ascii : Error< 337*67e74705SXin Li "string literal in language linkage specifier cannot have an " 338*67e74705SXin Li "encoding-prefix">; 339*67e74705SXin Lidef warn_use_out_of_scope_declaration : Warning< 340*67e74705SXin Li "use of out-of-scope declaration of %0">; 341*67e74705SXin Lidef err_inline_non_function : Error< 342*67e74705SXin Li "'inline' can only appear on functions%select{| and non-local variables}0">; 343*67e74705SXin Lidef err_noreturn_non_function : Error< 344*67e74705SXin Li "'_Noreturn' can only appear on functions">; 345*67e74705SXin Lidef warn_qual_return_type : Warning< 346*67e74705SXin Li "'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">, 347*67e74705SXin Li InGroup<IgnoredQualifiers>, DefaultIgnore; 348*67e74705SXin Lidef warn_deprecated_redundant_constexpr_static_def : Warning< 349*67e74705SXin Li "out-of-line definition of constexpr static data member is redundant " 350*67e74705SXin Li "in C++17 and is deprecated">, 351*67e74705SXin Li InGroup<Deprecated>, DefaultIgnore; 352*67e74705SXin Li 353*67e74705SXin Lidef warn_decl_shadow : 354*67e74705SXin Li Warning<"declaration shadows a %select{" 355*67e74705SXin Li "local variable|" 356*67e74705SXin Li "variable in %2|" 357*67e74705SXin Li "static data member of %2|" 358*67e74705SXin Li "field of %2}1">, 359*67e74705SXin Li InGroup<Shadow>, DefaultIgnore; 360*67e74705SXin Lidef warn_ctor_parm_shadows_field: 361*67e74705SXin Li Warning<"constructor parameter %0 shadows the field %1 of %2">, 362*67e74705SXin Li InGroup<ShadowFieldInConstructor>, DefaultIgnore; 363*67e74705SXin Lidef warn_modifying_shadowing_decl : 364*67e74705SXin Li Warning<"modifying constructor parameter %0 that shadows a " 365*67e74705SXin Li "field of %1">, 366*67e74705SXin Li InGroup<ShadowFieldInConstructorModified>, DefaultIgnore; 367*67e74705SXin Li 368*67e74705SXin Li 369*67e74705SXin Li// C++ using declarations 370*67e74705SXin Lidef err_using_requires_qualname : Error< 371*67e74705SXin Li "using declaration requires a qualified name">; 372*67e74705SXin Lidef err_using_typename_non_type : Error< 373*67e74705SXin Li "'typename' keyword used on a non-type">; 374*67e74705SXin Lidef err_using_dependent_value_is_type : Error< 375*67e74705SXin Li "dependent using declaration resolved to type without 'typename'">; 376*67e74705SXin Lidef err_using_decl_nested_name_specifier_is_not_class : Error< 377*67e74705SXin Li "using declaration in class refers into '%0', which is not a class">; 378*67e74705SXin Lidef err_using_decl_nested_name_specifier_is_current_class : Error< 379*67e74705SXin Li "using declaration refers to its own class">; 380*67e74705SXin Lidef err_using_decl_nested_name_specifier_is_not_base_class : Error< 381*67e74705SXin Li "using declaration refers into '%0', which is not a base class of %1">; 382*67e74705SXin Lidef err_using_decl_constructor_not_in_direct_base : Error< 383*67e74705SXin Li "%0 is not a direct base of %1, cannot inherit constructors">; 384*67e74705SXin Lidef err_using_decl_can_not_refer_to_class_member : Error< 385*67e74705SXin Li "using declaration cannot refer to class member">; 386*67e74705SXin Lidef err_ambiguous_inherited_constructor : Error< 387*67e74705SXin Li "constructor of %0 inherited from multiple base class subobjects">; 388*67e74705SXin Lidef note_ambiguous_inherited_constructor_using : Note< 389*67e74705SXin Li "inherited from base class %0 here">; 390*67e74705SXin Lidef note_using_decl_class_member_workaround : Note< 391*67e74705SXin Li "use %select{an alias declaration|a typedef declaration|a reference|" 392*67e74705SXin Li "a const variable|a constexpr variable}0 instead">; 393*67e74705SXin Lidef err_using_decl_can_not_refer_to_namespace : Error< 394*67e74705SXin Li "using declaration cannot refer to a namespace">; 395*67e74705SXin Lidef err_using_decl_can_not_refer_to_scoped_enum : Error< 396*67e74705SXin Li "using declaration cannot refer to a scoped enumerator">; 397*67e74705SXin Lidef err_using_decl_constructor : Error< 398*67e74705SXin Li "using declaration cannot refer to a constructor">; 399*67e74705SXin Lidef warn_cxx98_compat_using_decl_constructor : Warning< 400*67e74705SXin Li "inheriting constructors are incompatible with C++98">, 401*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 402*67e74705SXin Lidef err_using_decl_destructor : Error< 403*67e74705SXin Li "using declaration cannot refer to a destructor">; 404*67e74705SXin Lidef err_using_decl_template_id : Error< 405*67e74705SXin Li "using declaration cannot refer to a template specialization">; 406*67e74705SXin Lidef note_using_decl_target : Note<"target of using declaration">; 407*67e74705SXin Lidef note_using_decl_conflict : Note<"conflicting declaration">; 408*67e74705SXin Lidef err_using_decl_redeclaration : Error<"redeclaration of using declaration">; 409*67e74705SXin Lidef err_using_decl_conflict : Error< 410*67e74705SXin Li "target of using declaration conflicts with declaration already in scope">; 411*67e74705SXin Lidef err_using_decl_conflict_reverse : Error< 412*67e74705SXin Li "declaration conflicts with target of using declaration already in scope">; 413*67e74705SXin Lidef note_using_decl : Note<"%select{|previous }0using declaration">; 414*67e74705SXin Li 415*67e74705SXin Lidef warn_access_decl_deprecated : Warning< 416*67e74705SXin Li "access declarations are deprecated; use using declarations instead">, 417*67e74705SXin Li InGroup<Deprecated>; 418*67e74705SXin Lidef err_access_decl : Error< 419*67e74705SXin Li "ISO C++11 does not allow access declarations; " 420*67e74705SXin Li "use using declarations instead">; 421*67e74705SXin Lidef warn_exception_spec_deprecated : Warning< 422*67e74705SXin Li "dynamic exception specifications are deprecated">, 423*67e74705SXin Li InGroup<Deprecated>, DefaultIgnore; 424*67e74705SXin Lidef note_exception_spec_deprecated : Note<"use '%0' instead">; 425*67e74705SXin Lidef warn_deprecated_copy_operation : Warning< 426*67e74705SXin Li "definition of implicit copy %select{constructor|assignment operator}1 " 427*67e74705SXin Li "for %0 is deprecated because it has a user-declared " 428*67e74705SXin Li "%select{copy %select{assignment operator|constructor}1|destructor}2">, 429*67e74705SXin Li InGroup<Deprecated>, DefaultIgnore; 430*67e74705SXin Li 431*67e74705SXin Lidef warn_global_constructor : Warning< 432*67e74705SXin Li "declaration requires a global constructor">, 433*67e74705SXin Li InGroup<GlobalConstructors>, DefaultIgnore; 434*67e74705SXin Lidef warn_global_destructor : Warning< 435*67e74705SXin Li "declaration requires a global destructor">, 436*67e74705SXin Li InGroup<GlobalConstructors>, DefaultIgnore; 437*67e74705SXin Lidef warn_exit_time_destructor : Warning< 438*67e74705SXin Li "declaration requires an exit-time destructor">, 439*67e74705SXin Li InGroup<ExitTimeDestructors>, DefaultIgnore; 440*67e74705SXin Li 441*67e74705SXin Lidef err_invalid_thread : Error< 442*67e74705SXin Li "'%0' is only allowed on variable declarations">; 443*67e74705SXin Lidef err_thread_non_global : Error< 444*67e74705SXin Li "'%0' variables must have global storage">; 445*67e74705SXin Lidef err_thread_unsupported : Error< 446*67e74705SXin Li "thread-local storage is not supported for the current target">; 447*67e74705SXin Li 448*67e74705SXin Lidef warn_maybe_falloff_nonvoid_function : Warning< 449*67e74705SXin Li "control may reach end of non-void function">, 450*67e74705SXin Li InGroup<ReturnType>; 451*67e74705SXin Lidef warn_falloff_nonvoid_function : Warning< 452*67e74705SXin Li "control reaches end of non-void function">, 453*67e74705SXin Li InGroup<ReturnType>; 454*67e74705SXin Lidef err_maybe_falloff_nonvoid_block : Error< 455*67e74705SXin Li "control may reach end of non-void block">; 456*67e74705SXin Lidef err_falloff_nonvoid_block : Error< 457*67e74705SXin Li "control reaches end of non-void block">; 458*67e74705SXin Lidef warn_suggest_noreturn_function : Warning< 459*67e74705SXin Li "%select{function|method}0 %1 could be declared with attribute 'noreturn'">, 460*67e74705SXin Li InGroup<MissingNoreturn>, DefaultIgnore; 461*67e74705SXin Lidef warn_suggest_noreturn_block : Warning< 462*67e74705SXin Li "block could be declared with attribute 'noreturn'">, 463*67e74705SXin Li InGroup<MissingNoreturn>, DefaultIgnore; 464*67e74705SXin Li 465*67e74705SXin Li// Unreachable code. 466*67e74705SXin Lidef warn_unreachable : Warning< 467*67e74705SXin Li "code will never be executed">, 468*67e74705SXin Li InGroup<UnreachableCode>, DefaultIgnore; 469*67e74705SXin Lidef warn_unreachable_break : Warning< 470*67e74705SXin Li "'break' will never be executed">, 471*67e74705SXin Li InGroup<UnreachableCodeBreak>, DefaultIgnore; 472*67e74705SXin Lidef warn_unreachable_return : Warning< 473*67e74705SXin Li "'return' will never be executed">, 474*67e74705SXin Li InGroup<UnreachableCodeReturn>, DefaultIgnore; 475*67e74705SXin Lidef warn_unreachable_loop_increment : Warning< 476*67e74705SXin Li "loop will run at most once (loop increment never executed)">, 477*67e74705SXin Li InGroup<UnreachableCodeLoopIncrement>, DefaultIgnore; 478*67e74705SXin Lidef note_unreachable_silence : Note< 479*67e74705SXin Li "silence by adding parentheses to mark code as explicitly dead">; 480*67e74705SXin Li 481*67e74705SXin Li/// Built-in functions. 482*67e74705SXin Lidef ext_implicit_lib_function_decl : ExtWarn< 483*67e74705SXin Li "implicitly declaring library function '%0' with type %1">, 484*67e74705SXin Li InGroup<ImplicitFunctionDeclare>; 485*67e74705SXin Lidef note_include_header_or_declare : Note< 486*67e74705SXin Li "include the header <%0> or explicitly provide a declaration for '%1'">; 487*67e74705SXin Lidef note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; 488*67e74705SXin Lidef warn_implicit_decl_requires_sysheader : Warning< 489*67e74705SXin Li "declaration of built-in function '%1' requires inclusion of the header <%0>">, 490*67e74705SXin Li InGroup<BuiltinRequiresHeader>; 491*67e74705SXin Lidef warn_redecl_library_builtin : Warning< 492*67e74705SXin Li "incompatible redeclaration of library function %0">, 493*67e74705SXin Li InGroup<DiagGroup<"incompatible-library-redeclaration">>; 494*67e74705SXin Lidef err_builtin_definition : Error<"definition of builtin function %0">; 495*67e74705SXin Lidef err_arm_invalid_specialreg : Error<"invalid special register for builtin">; 496*67e74705SXin Lidef err_invalid_cpu_supports : Error<"invalid cpu feature string for builtin">; 497*67e74705SXin Lidef err_builtin_needs_feature : Error<"%0 needs target feature %1">; 498*67e74705SXin Lidef err_function_needs_feature 499*67e74705SXin Li : Error<"always_inline function %1 requires target feature '%2', but would " 500*67e74705SXin Li "be inlined into function %0 that is compiled without support for " 501*67e74705SXin Li "'%2'">; 502*67e74705SXin Lidef warn_builtin_unknown : Warning<"use of unknown builtin %0">, 503*67e74705SXin Li InGroup<ImplicitFunctionDeclare>, DefaultError; 504*67e74705SXin Lidef warn_dyn_class_memaccess : Warning< 505*67e74705SXin Li "%select{destination for|source of|first operand of|second operand of}0 this " 506*67e74705SXin Li "%1 call is a pointer to %select{|class containing a }2dynamic class %3; " 507*67e74705SXin Li "vtable pointer will be %select{overwritten|copied|moved|compared}4">, 508*67e74705SXin Li InGroup<DiagGroup<"dynamic-class-memaccess">>; 509*67e74705SXin Lidef note_bad_memaccess_silence : Note< 510*67e74705SXin Li "explicitly cast the pointer to silence this warning">; 511*67e74705SXin Lidef warn_sizeof_pointer_expr_memaccess : Warning< 512*67e74705SXin Li "'%0' call operates on objects of type %1 while the size is based on a " 513*67e74705SXin Li "different type %2">, 514*67e74705SXin Li InGroup<SizeofPointerMemaccess>; 515*67e74705SXin Lidef warn_sizeof_pointer_expr_memaccess_note : Note< 516*67e74705SXin Li "did you mean to %select{dereference the argument to 'sizeof' (and multiply " 517*67e74705SXin Li "it by the number of elements)|remove the addressof in the argument to " 518*67e74705SXin Li "'sizeof' (and multiply it by the number of elements)|provide an explicit " 519*67e74705SXin Li "length}0?">; 520*67e74705SXin Lidef warn_sizeof_pointer_type_memaccess : Warning< 521*67e74705SXin Li "argument to 'sizeof' in %0 call is the same pointer type %1 as the " 522*67e74705SXin Li "%select{destination|source}2; expected %3 or an explicit length">, 523*67e74705SXin Li InGroup<SizeofPointerMemaccess>; 524*67e74705SXin Lidef warn_strlcpycat_wrong_size : Warning< 525*67e74705SXin Li "size argument in %0 call appears to be size of the source; " 526*67e74705SXin Li "expected the size of the destination">, 527*67e74705SXin Li InGroup<DiagGroup<"strlcpy-strlcat-size">>; 528*67e74705SXin Lidef note_strlcpycat_wrong_size : Note< 529*67e74705SXin Li "change size argument to be the size of the destination">; 530*67e74705SXin Lidef warn_memsize_comparison : Warning< 531*67e74705SXin Li "size argument in %0 call is a comparison">, 532*67e74705SXin Li InGroup<DiagGroup<"memsize-comparison">>; 533*67e74705SXin Lidef note_memsize_comparison_paren : Note< 534*67e74705SXin Li "did you mean to compare the result of %0 instead?">; 535*67e74705SXin Lidef note_memsize_comparison_cast_silence : Note< 536*67e74705SXin Li "explicitly cast the argument to size_t to silence this warning">; 537*67e74705SXin Li 538*67e74705SXin Lidef warn_strncat_large_size : Warning< 539*67e74705SXin Li "the value of the size argument in 'strncat' is too large, might lead to a " 540*67e74705SXin Li "buffer overflow">, InGroup<StrncatSize>; 541*67e74705SXin Lidef warn_strncat_src_size : Warning<"size argument in 'strncat' call appears " 542*67e74705SXin Li "to be size of the source">, InGroup<StrncatSize>; 543*67e74705SXin Lidef warn_strncat_wrong_size : Warning< 544*67e74705SXin Li "the value of the size argument to 'strncat' is wrong">, InGroup<StrncatSize>; 545*67e74705SXin Lidef note_strncat_wrong_size : Note< 546*67e74705SXin Li "change the argument to be the free space in the destination buffer minus " 547*67e74705SXin Li "the terminating null byte">; 548*67e74705SXin Li 549*67e74705SXin Lidef warn_assume_side_effects : Warning< 550*67e74705SXin Li "the argument to %0 has side effects that will be discarded">, 551*67e74705SXin Li InGroup<DiagGroup<"assume">>; 552*67e74705SXin Li 553*67e74705SXin Lidef warn_memcpy_chk_overflow : Warning< 554*67e74705SXin Li "%0 will always overflow destination buffer">, 555*67e74705SXin Li InGroup<DiagGroup<"builtin-memcpy-chk-size">>; 556*67e74705SXin Li 557*67e74705SXin Li/// main() 558*67e74705SXin Li// static main() is not an error in C, just in C++. 559*67e74705SXin Lidef warn_static_main : Warning<"'main' should not be declared static">, 560*67e74705SXin Li InGroup<Main>; 561*67e74705SXin Lidef err_static_main : Error<"'main' is not allowed to be declared static">; 562*67e74705SXin Lidef err_inline_main : Error<"'main' is not allowed to be declared inline">; 563*67e74705SXin Lidef ext_variadic_main : ExtWarn< 564*67e74705SXin Li "'main' is not allowed to be declared variadic">, InGroup<Main>; 565*67e74705SXin Lidef ext_noreturn_main : ExtWarn< 566*67e74705SXin Li "'main' is not allowed to be declared _Noreturn">, InGroup<Main>; 567*67e74705SXin Lidef note_main_remove_noreturn : Note<"remove '_Noreturn'">; 568*67e74705SXin Lidef err_constexpr_main : Error< 569*67e74705SXin Li "'main' is not allowed to be declared constexpr">; 570*67e74705SXin Lidef err_deleted_main : Error<"'main' is not allowed to be deleted">; 571*67e74705SXin Lidef err_mainlike_template_decl : Error<"%0 cannot be a template">; 572*67e74705SXin Lidef err_main_returns_nonint : Error<"'main' must return 'int'">; 573*67e74705SXin Lidef ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">, 574*67e74705SXin Li InGroup<MainReturnType>; 575*67e74705SXin Lidef note_main_change_return_type : Note<"change return type to 'int'">; 576*67e74705SXin Lidef err_main_surplus_args : Error<"too many parameters (%0) for 'main': " 577*67e74705SXin Li "must be 0, 2, or 3">; 578*67e74705SXin Lidef warn_main_one_arg : Warning<"only one parameter on 'main' declaration">, 579*67e74705SXin Li InGroup<Main>; 580*67e74705SXin Lidef err_main_arg_wrong : Error<"%select{first|second|third|fourth}0 " 581*67e74705SXin Li "parameter of 'main' (%select{argument count|argument array|environment|" 582*67e74705SXin Li "platform-specific data}0) must be of type %1">; 583*67e74705SXin Lidef err_main_global_variable : 584*67e74705SXin Li Error<"main cannot be declared as global variable">; 585*67e74705SXin Lidef warn_main_redefined : Warning<"variable named 'main' with external linkage " 586*67e74705SXin Li "has undefined behavior">, InGroup<Main>; 587*67e74705SXin Lidef ext_main_used : Extension< 588*67e74705SXin Li "ISO C++ does not allow 'main' to be used by a program">, InGroup<Main>; 589*67e74705SXin Li 590*67e74705SXin Li/// parser diagnostics 591*67e74705SXin Lidef ext_no_declarators : ExtWarn<"declaration does not declare anything">, 592*67e74705SXin Li InGroup<MissingDeclarations>; 593*67e74705SXin Lidef ext_typedef_without_a_name : ExtWarn<"typedef requires a name">, 594*67e74705SXin Li InGroup<MissingDeclarations>; 595*67e74705SXin Lidef err_typedef_not_identifier : Error<"typedef name must be an identifier">; 596*67e74705SXin Lidef err_typedef_changes_linkage : Error<"unsupported: typedef changes linkage" 597*67e74705SXin Li " of anonymous type, but linkage was already computed">; 598*67e74705SXin Lidef note_typedef_changes_linkage : Note<"use a tag name here to establish " 599*67e74705SXin Li "linkage prior to definition">; 600*67e74705SXin Lidef err_statically_allocated_object : Error< 601*67e74705SXin Li "interface type cannot be statically allocated">; 602*67e74705SXin Lidef err_object_cannot_be_passed_returned_by_value : Error< 603*67e74705SXin Li "interface type %1 cannot be %select{returned|passed}0 by value" 604*67e74705SXin Li "; did you forget * in %1?">; 605*67e74705SXin Lidef err_parameters_retval_cannot_have_fp16_type : Error< 606*67e74705SXin Li "%select{parameters|function return value}0 cannot have __fp16 type; did you forget * ?">; 607*67e74705SXin Lidef err_opencl_half_load_store : Error< 608*67e74705SXin Li "%select{loading directly from|assigning directly to}0 pointer to type %1 is not allowed">; 609*67e74705SXin Lidef err_opencl_cast_to_half : Error<"casting to type %0 is not allowed">; 610*67e74705SXin Lidef err_opencl_half_declaration : Error< 611*67e74705SXin Li "declaring variable of type %0 is not allowed">; 612*67e74705SXin Lidef err_opencl_half_param : Error< 613*67e74705SXin Li "declaring function parameter of type %0 is not allowed; did you forget * ?">; 614*67e74705SXin Lidef err_opencl_invalid_return : Error< 615*67e74705SXin Li "declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1">; 616*67e74705SXin Lidef warn_enum_value_overflow : Warning<"overflow in enumeration value">; 617*67e74705SXin Lidef warn_pragma_options_align_reset_failed : Warning< 618*67e74705SXin Li "#pragma options align=reset failed: %0">, 619*67e74705SXin Li InGroup<IgnoredPragmas>; 620*67e74705SXin Lidef err_pragma_options_align_mac68k_target_unsupported : Error< 621*67e74705SXin Li "mac68k alignment pragma is not supported on this target">; 622*67e74705SXin Lidef warn_pragma_pack_invalid_alignment : Warning< 623*67e74705SXin Li "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">, 624*67e74705SXin Li InGroup<IgnoredPragmas>; 625*67e74705SXin Li// Follow the Microsoft implementation. 626*67e74705SXin Lidef warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">; 627*67e74705SXin Lidef warn_pragma_pack_pop_identifer_and_alignment : Warning< 628*67e74705SXin Li "specifying both a name and alignment to 'pop' is undefined">; 629*67e74705SXin Lidef warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">, 630*67e74705SXin Li InGroup<IgnoredPragmas>; 631*67e74705SXin Lidef warn_cxx_ms_struct : 632*67e74705SXin Li Warning<"ms_struct may not produce Microsoft-compatible layouts for classes " 633*67e74705SXin Li "with base classes or virtual functions">, 634*67e74705SXin Li DefaultError, InGroup<IncompatibleMSStruct>; 635*67e74705SXin Lidef err_section_conflict : Error<"%0 causes a section type conflict with %1">; 636*67e74705SXin Lidef err_no_base_classes : Error<"invalid use of '__super', %0 has no base classes">; 637*67e74705SXin Lidef err_invalid_super_scope : Error<"invalid use of '__super', " 638*67e74705SXin Li "this keyword can only be used inside class or member function scope">; 639*67e74705SXin Lidef err_super_in_lambda_unsupported : Error< 640*67e74705SXin Li "use of '__super' inside a lambda is unsupported">; 641*67e74705SXin Li 642*67e74705SXin Lidef warn_pragma_unused_undeclared_var : Warning< 643*67e74705SXin Li "undeclared variable %0 used as an argument for '#pragma unused'">, 644*67e74705SXin Li InGroup<IgnoredPragmas>; 645*67e74705SXin Lidef warn_pragma_unused_expected_var_arg : Warning< 646*67e74705SXin Li "only variables can be arguments to '#pragma unused'">, 647*67e74705SXin Li InGroup<IgnoredPragmas>; 648*67e74705SXin Lidef err_pragma_push_visibility_mismatch : Error< 649*67e74705SXin Li "#pragma visibility push with no matching #pragma visibility pop">; 650*67e74705SXin Lidef note_surrounding_namespace_ends_here : Note< 651*67e74705SXin Li "surrounding namespace with visibility attribute ends here">; 652*67e74705SXin Lidef err_pragma_pop_visibility_mismatch : Error< 653*67e74705SXin Li "#pragma visibility pop with no matching #pragma visibility push">; 654*67e74705SXin Lidef note_surrounding_namespace_starts_here : Note< 655*67e74705SXin Li "surrounding namespace with visibility attribute starts here">; 656*67e74705SXin Lidef err_pragma_loop_invalid_argument_type : Error< 657*67e74705SXin Li "invalid argument of type %0; expected an integer type">; 658*67e74705SXin Lidef err_pragma_loop_invalid_argument_value : Error< 659*67e74705SXin Li "%select{invalid value '%0'; must be positive|value '%0' is too large}1">; 660*67e74705SXin Lidef err_pragma_loop_compatibility : Error< 661*67e74705SXin Li "%select{incompatible|duplicate}0 directives '%1' and '%2'">; 662*67e74705SXin Lidef err_pragma_loop_precedes_nonloop : Error< 663*67e74705SXin Li "expected a for, while, or do-while loop to follow '%0'">; 664*67e74705SXin Li 665*67e74705SXin Li/// Objective-C parser diagnostics 666*67e74705SXin Lidef err_duplicate_class_def : Error< 667*67e74705SXin Li "duplicate interface definition for class %0">; 668*67e74705SXin Lidef err_undef_superclass : Error< 669*67e74705SXin Li "cannot find interface declaration for %0, superclass of %1">; 670*67e74705SXin Lidef err_forward_superclass : Error< 671*67e74705SXin Li "attempting to use the forward class %0 as superclass of %1">; 672*67e74705SXin Lidef err_no_nsconstant_string_class : Error< 673*67e74705SXin Li "cannot find interface declaration for %0">; 674*67e74705SXin Lidef err_recursive_superclass : Error< 675*67e74705SXin Li "trying to recursively use %0 as superclass of %1">; 676*67e74705SXin Lidef err_conflicting_aliasing_type : Error<"conflicting types for alias %0">; 677*67e74705SXin Lidef warn_undef_interface : Warning<"cannot find interface declaration for %0">; 678*67e74705SXin Lidef warn_duplicate_protocol_def : Warning<"duplicate protocol definition of %0 is ignored">; 679*67e74705SXin Lidef err_protocol_has_circular_dependency : Error< 680*67e74705SXin Li "protocol has circular dependency">; 681*67e74705SXin Lidef err_undeclared_protocol : Error<"cannot find protocol declaration for %0">; 682*67e74705SXin Lidef warn_undef_protocolref : Warning<"cannot find protocol definition for %0">; 683*67e74705SXin Lidef warn_atprotocol_protocol : Warning< 684*67e74705SXin Li "@protocol is using a forward protocol declaration of %0">, InGroup<AtProtocol>; 685*67e74705SXin Lidef warn_readonly_property : Warning< 686*67e74705SXin Li "attribute 'readonly' of property %0 restricts attribute " 687*67e74705SXin Li "'readwrite' of property inherited from %1">, 688*67e74705SXin Li InGroup<PropertyAttr>; 689*67e74705SXin Li 690*67e74705SXin Lidef warn_property_attribute : Warning< 691*67e74705SXin Li "'%1' attribute on property %0 does not match the property inherited from %2">, 692*67e74705SXin Li InGroup<PropertyAttr>; 693*67e74705SXin Lidef warn_property_types_are_incompatible : Warning< 694*67e74705SXin Li "property type %0 is incompatible with type %1 inherited from %2">, 695*67e74705SXin Li InGroup<DiagGroup<"incompatible-property-type">>; 696*67e74705SXin Lidef warn_protocol_property_mismatch : Warning< 697*67e74705SXin Li "property of type %0 was selected for synthesis">, 698*67e74705SXin Li InGroup<DiagGroup<"protocol-property-synthesis-ambiguity">>; 699*67e74705SXin Lidef err_undef_interface : Error<"cannot find interface declaration for %0">; 700*67e74705SXin Lidef err_category_forward_interface : Error< 701*67e74705SXin Li "cannot define %select{category|class extension}0 for undefined class %1">; 702*67e74705SXin Lidef err_class_extension_after_impl : Error< 703*67e74705SXin Li "cannot declare class extension for %0 after class implementation">; 704*67e74705SXin Lidef note_implementation_declared : Note< 705*67e74705SXin Li "class implementation is declared here">; 706*67e74705SXin Lidef note_while_in_implementation : Note< 707*67e74705SXin Li "detected while default synthesizing properties in class implementation">; 708*67e74705SXin Lidef note_class_declared : Note< 709*67e74705SXin Li "class is declared here">; 710*67e74705SXin Lidef note_receiver_class_declared : Note< 711*67e74705SXin Li "receiver is instance of class declared here">; 712*67e74705SXin Lidef note_receiver_expr_here : Note< 713*67e74705SXin Li "receiver expression is here">; 714*67e74705SXin Lidef note_receiver_is_id : Note< 715*67e74705SXin Li "receiver is treated with 'id' type for purpose of method lookup">; 716*67e74705SXin Lidef note_suppressed_class_declare : Note< 717*67e74705SXin Li "class with specified objc_requires_property_definitions attribute is declared here">; 718*67e74705SXin Lidef err_objc_root_class_subclass : Error< 719*67e74705SXin Li "objc_root_class attribute may only be specified on a root class declaration">; 720*67e74705SXin Lidef warn_objc_root_class_missing : Warning< 721*67e74705SXin Li "class %0 defined without specifying a base class">, 722*67e74705SXin Li InGroup<ObjCRootClass>; 723*67e74705SXin Lidef err_objc_runtime_visible_category : Error< 724*67e74705SXin Li "cannot implement a category for class %0 that is only visible via the " 725*67e74705SXin Li "Objective-C runtime">; 726*67e74705SXin Lidef err_objc_runtime_visible_subclass : Error< 727*67e74705SXin Li "cannot implement subclass %0 of a superclass %1 that is only visible via the " 728*67e74705SXin Li "Objective-C runtime">; 729*67e74705SXin Lidef note_objc_needs_superclass : Note< 730*67e74705SXin Li "add a super class to fix this problem">; 731*67e74705SXin Lidef warn_dup_category_def : Warning< 732*67e74705SXin Li "duplicate definition of category %1 on interface %0">; 733*67e74705SXin Lidef err_conflicting_super_class : Error<"conflicting super class name %0">; 734*67e74705SXin Lidef err_dup_implementation_class : Error<"reimplementation of class %0">; 735*67e74705SXin Lidef err_dup_implementation_category : Error< 736*67e74705SXin Li "reimplementation of category %1 for class %0">; 737*67e74705SXin Lidef err_conflicting_ivar_type : Error< 738*67e74705SXin Li "instance variable %0 has conflicting type%diff{: $ vs $|}1,2">; 739*67e74705SXin Lidef err_duplicate_ivar_declaration : Error< 740*67e74705SXin Li "instance variable is already declared">; 741*67e74705SXin Lidef warn_on_superclass_use : Warning< 742*67e74705SXin Li "class implementation may not have super class">; 743*67e74705SXin Lidef err_conflicting_ivar_bitwidth : Error< 744*67e74705SXin Li "instance variable %0 has conflicting bit-field width">; 745*67e74705SXin Lidef err_conflicting_ivar_name : Error< 746*67e74705SXin Li "conflicting instance variable names: %0 vs %1">; 747*67e74705SXin Lidef err_inconsistent_ivar_count : Error< 748*67e74705SXin Li "inconsistent number of instance variables specified">; 749*67e74705SXin Lidef warn_undef_method_impl : Warning<"method definition for %0 not found">, 750*67e74705SXin Li InGroup<DiagGroup<"incomplete-implementation">>; 751*67e74705SXin Li 752*67e74705SXin Lidef warn_conflicting_overriding_ret_types : Warning< 753*67e74705SXin Li "conflicting return type in " 754*67e74705SXin Li "declaration of %0%diff{: $ vs $|}1,2">, 755*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 756*67e74705SXin Li 757*67e74705SXin Lidef warn_conflicting_ret_types : Warning< 758*67e74705SXin Li "conflicting return type in " 759*67e74705SXin Li "implementation of %0%diff{: $ vs $|}1,2">, 760*67e74705SXin Li InGroup<MismatchedReturnTypes>; 761*67e74705SXin Li 762*67e74705SXin Lidef warn_conflicting_overriding_ret_type_modifiers : Warning< 763*67e74705SXin Li "conflicting distributed object modifiers on return type " 764*67e74705SXin Li "in declaration of %0">, 765*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 766*67e74705SXin Li 767*67e74705SXin Lidef warn_conflicting_ret_type_modifiers : Warning< 768*67e74705SXin Li "conflicting distributed object modifiers on return type " 769*67e74705SXin Li "in implementation of %0">, 770*67e74705SXin Li InGroup<DistributedObjectModifiers>; 771*67e74705SXin Li 772*67e74705SXin Lidef warn_non_covariant_overriding_ret_types : Warning< 773*67e74705SXin Li "conflicting return type in " 774*67e74705SXin Li "declaration of %0: %1 vs %2">, 775*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 776*67e74705SXin Li 777*67e74705SXin Lidef warn_non_covariant_ret_types : Warning< 778*67e74705SXin Li "conflicting return type in " 779*67e74705SXin Li "implementation of %0: %1 vs %2">, 780*67e74705SXin Li InGroup<MethodSignatures>, DefaultIgnore; 781*67e74705SXin Li 782*67e74705SXin Lidef warn_conflicting_overriding_param_types : Warning< 783*67e74705SXin Li "conflicting parameter types in " 784*67e74705SXin Li "declaration of %0%diff{: $ vs $|}1,2">, 785*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 786*67e74705SXin Li 787*67e74705SXin Lidef warn_conflicting_param_types : Warning< 788*67e74705SXin Li "conflicting parameter types in " 789*67e74705SXin Li "implementation of %0%diff{: $ vs $|}1,2">, 790*67e74705SXin Li InGroup<MismatchedParameterTypes>; 791*67e74705SXin Li 792*67e74705SXin Lidef warn_conflicting_param_modifiers : Warning< 793*67e74705SXin Li "conflicting distributed object modifiers on parameter type " 794*67e74705SXin Li "in implementation of %0">, 795*67e74705SXin Li InGroup<DistributedObjectModifiers>; 796*67e74705SXin Li 797*67e74705SXin Lidef warn_conflicting_overriding_param_modifiers : Warning< 798*67e74705SXin Li "conflicting distributed object modifiers on parameter type " 799*67e74705SXin Li "in declaration of %0">, 800*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 801*67e74705SXin Li 802*67e74705SXin Lidef warn_non_contravariant_overriding_param_types : Warning< 803*67e74705SXin Li "conflicting parameter types in " 804*67e74705SXin Li "declaration of %0: %1 vs %2">, 805*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 806*67e74705SXin Li 807*67e74705SXin Lidef warn_non_contravariant_param_types : Warning< 808*67e74705SXin Li "conflicting parameter types in " 809*67e74705SXin Li "implementation of %0: %1 vs %2">, 810*67e74705SXin Li InGroup<MethodSignatures>, DefaultIgnore; 811*67e74705SXin Li 812*67e74705SXin Lidef warn_conflicting_overriding_variadic :Warning< 813*67e74705SXin Li "conflicting variadic declaration of method and its " 814*67e74705SXin Li "implementation">, 815*67e74705SXin Li InGroup<OverridingMethodMismatch>, DefaultIgnore; 816*67e74705SXin Li 817*67e74705SXin Lidef warn_conflicting_variadic :Warning< 818*67e74705SXin Li "conflicting variadic declaration of method and its " 819*67e74705SXin Li "implementation">; 820*67e74705SXin Li 821*67e74705SXin Lidef warn_category_method_impl_match:Warning< 822*67e74705SXin Li "category is implementing a method which will also be implemented" 823*67e74705SXin Li " by its primary class">, InGroup<ObjCProtocolMethodImpl>; 824*67e74705SXin Li 825*67e74705SXin Lidef warn_implements_nscopying : Warning< 826*67e74705SXin Li"default assign attribute on property %0 which implements " 827*67e74705SXin Li"NSCopying protocol is not appropriate with -fobjc-gc[-only]">; 828*67e74705SXin Li 829*67e74705SXin Lidef warn_multiple_method_decl : Warning<"multiple methods named %0 found">, 830*67e74705SXin Li InGroup<ObjCMultipleMethodNames>; 831*67e74705SXin Lidef warn_strict_multiple_method_decl : Warning< 832*67e74705SXin Li "multiple methods named %0 found">, InGroup<StrictSelector>, DefaultIgnore; 833*67e74705SXin Lidef warn_accessor_property_type_mismatch : Warning< 834*67e74705SXin Li "type of property %0 does not match type of accessor %1">; 835*67e74705SXin Lidef not_conv_function_declared_at : Note<"type conversion function declared here">; 836*67e74705SXin Lidef note_method_declared_at : Note<"method %0 declared here">; 837*67e74705SXin Lidef note_property_attribute : Note<"property %0 is declared " 838*67e74705SXin Li "%select{deprecated|unavailable|partial}1 here">; 839*67e74705SXin Lidef err_setter_type_void : Error<"type of setter must be void">; 840*67e74705SXin Lidef err_duplicate_method_decl : Error<"duplicate declaration of method %0">; 841*67e74705SXin Lidef warn_duplicate_method_decl : 842*67e74705SXin Li Warning<"multiple declarations of method %0 found and ignored">, 843*67e74705SXin Li InGroup<MethodDuplicate>, DefaultIgnore; 844*67e74705SXin Lidef warn_objc_cdirective_format_string : 845*67e74705SXin Li Warning<"using %0 directive in %select{NSString|CFString}1 " 846*67e74705SXin Li "which is being passed as a formatting argument to the formatting " 847*67e74705SXin Li "%select{method|CFfunction}2">, 848*67e74705SXin Li InGroup<ObjCCStringFormat>, DefaultIgnore; 849*67e74705SXin Lidef err_objc_var_decl_inclass : 850*67e74705SXin Li Error<"cannot declare variable inside @interface or @protocol">; 851*67e74705SXin Lidef error_missing_method_context : Error< 852*67e74705SXin Li "missing context for method declaration">; 853*67e74705SXin Lidef err_objc_property_attr_mutually_exclusive : Error< 854*67e74705SXin Li "property attributes '%0' and '%1' are mutually exclusive">; 855*67e74705SXin Lidef err_objc_property_requires_object : Error< 856*67e74705SXin Li "property with '%0' attribute must be of object type">; 857*67e74705SXin Lidef warn_objc_property_no_assignment_attribute : Warning< 858*67e74705SXin Li "no 'assign', 'retain', or 'copy' attribute is specified - " 859*67e74705SXin Li "'assign' is assumed">, 860*67e74705SXin Li InGroup<ObjCPropertyNoAttribute>; 861*67e74705SXin Lidef warn_objc_isa_use : Warning< 862*67e74705SXin Li "direct access to Objective-C's isa is deprecated in favor of " 863*67e74705SXin Li "object_getClass()">, InGroup<DeprecatedObjCIsaUsage>; 864*67e74705SXin Lidef warn_objc_isa_assign : Warning< 865*67e74705SXin Li "assignment to Objective-C's isa is deprecated in favor of " 866*67e74705SXin Li "object_setClass()">, InGroup<DeprecatedObjCIsaUsage>; 867*67e74705SXin Lidef warn_objc_pointer_masking : Warning< 868*67e74705SXin Li "bitmasking for introspection of Objective-C object pointers is strongly " 869*67e74705SXin Li "discouraged">, 870*67e74705SXin Li InGroup<ObjCPointerIntrospect>; 871*67e74705SXin Lidef warn_objc_pointer_masking_performSelector : Warning<warn_objc_pointer_masking.Text>, 872*67e74705SXin Li InGroup<ObjCPointerIntrospectPerformSelector>; 873*67e74705SXin Lidef warn_objc_property_default_assign_on_object : Warning< 874*67e74705SXin Li "default property attribute 'assign' not appropriate for non-GC object">, 875*67e74705SXin Li InGroup<ObjCPropertyNoAttribute>; 876*67e74705SXin Lidef warn_property_attr_mismatch : Warning< 877*67e74705SXin Li "property attribute in class extension does not match the primary class">, 878*67e74705SXin Li InGroup<PropertyAttr>; 879*67e74705SXin Lidef warn_property_implicitly_mismatched : Warning < 880*67e74705SXin Li "primary property declaration is implicitly strong while redeclaration " 881*67e74705SXin Li "in class extension is weak">, 882*67e74705SXin Li InGroup<DiagGroup<"objc-property-implicit-mismatch">>; 883*67e74705SXin Lidef warn_objc_property_copy_missing_on_block : Warning< 884*67e74705SXin Li "'copy' attribute must be specified for the block property " 885*67e74705SXin Li "when -fobjc-gc-only is specified">; 886*67e74705SXin Lidef warn_objc_property_retain_of_block : Warning< 887*67e74705SXin Li "retain'ed block property does not copy the block " 888*67e74705SXin Li "- use copy attribute instead">, InGroup<ObjCRetainBlockProperty>; 889*67e74705SXin Lidef warn_objc_readonly_property_has_setter : Warning< 890*67e74705SXin Li "setter cannot be specified for a readonly property">, 891*67e74705SXin Li InGroup<ObjCReadonlyPropertyHasSetter>; 892*67e74705SXin Lidef warn_atomic_property_rule : Warning< 893*67e74705SXin Li "writable atomic property %0 cannot pair a synthesized %select{getter|setter}1 " 894*67e74705SXin Li "with a user defined %select{getter|setter}2">, 895*67e74705SXin Li InGroup<DiagGroup<"atomic-property-with-user-defined-accessor">>; 896*67e74705SXin Lidef note_atomic_property_fixup_suggest : Note<"setter and getter must both be " 897*67e74705SXin Li "synthesized, or both be user defined,or the property must be nonatomic">; 898*67e74705SXin Lidef err_atomic_property_nontrivial_assign_op : Error< 899*67e74705SXin Li "atomic property of reference type %0 cannot have non-trivial assignment" 900*67e74705SXin Li " operator">; 901*67e74705SXin Lidef warn_cocoa_naming_owned_rule : Warning< 902*67e74705SXin Li "property follows Cocoa naming" 903*67e74705SXin Li " convention for returning 'owned' objects">, 904*67e74705SXin Li InGroup<DiagGroup<"objc-property-matches-cocoa-ownership-rule">>; 905*67e74705SXin Lidef err_cocoa_naming_owned_rule : Error< 906*67e74705SXin Li "property follows Cocoa naming" 907*67e74705SXin Li " convention for returning 'owned' objects">; 908*67e74705SXin Lidef note_cocoa_naming_declare_family : Note< 909*67e74705SXin Li "explicitly declare getter %objcinstance0 with '%1' to return an 'unowned' " 910*67e74705SXin Li "object">; 911*67e74705SXin Lidef warn_auto_synthesizing_protocol_property :Warning< 912*67e74705SXin Li "auto property synthesis will not synthesize property %0" 913*67e74705SXin Li " declared in protocol %1">, 914*67e74705SXin Li InGroup<DiagGroup<"objc-protocol-property-synthesis">>; 915*67e74705SXin Lidef warn_no_autosynthesis_shared_ivar_property : Warning < 916*67e74705SXin Li "auto property synthesis will not synthesize property " 917*67e74705SXin Li "%0 because it cannot share an ivar with another synthesized property">, 918*67e74705SXin Li InGroup<ObjCNoPropertyAutoSynthesis>; 919*67e74705SXin Lidef warn_no_autosynthesis_property : Warning< 920*67e74705SXin Li "auto property synthesis will not synthesize property " 921*67e74705SXin Li "%0 because it is 'readwrite' but it will be synthesized 'readonly' " 922*67e74705SXin Li "via another property">, 923*67e74705SXin Li InGroup<ObjCNoPropertyAutoSynthesis>; 924*67e74705SXin Lidef warn_autosynthesis_property_in_superclass : Warning< 925*67e74705SXin Li "auto property synthesis will not synthesize property " 926*67e74705SXin Li "%0; it will be implemented by its superclass, use @dynamic to " 927*67e74705SXin Li "acknowledge intention">, 928*67e74705SXin Li InGroup<ObjCNoPropertyAutoSynthesis>; 929*67e74705SXin Lidef warn_autosynthesis_property_ivar_match :Warning< 930*67e74705SXin Li "autosynthesized property %0 will use %select{|synthesized}1 instance variable " 931*67e74705SXin Li "%2, not existing instance variable %3">, 932*67e74705SXin Li InGroup<DiagGroup<"objc-autosynthesis-property-ivar-name-match">>; 933*67e74705SXin Lidef warn_missing_explicit_synthesis : Warning < 934*67e74705SXin Li "auto property synthesis is synthesizing property not explicitly synthesized">, 935*67e74705SXin Li InGroup<DiagGroup<"objc-missing-property-synthesis">>, DefaultIgnore; 936*67e74705SXin Lidef warn_property_getter_owning_mismatch : Warning< 937*67e74705SXin Li "property declared as returning non-retained objects" 938*67e74705SXin Li "; getter returning retained objects">; 939*67e74705SXin Lidef warn_property_redecl_getter_mismatch : Warning< 940*67e74705SXin Li "getter name mismatch between property redeclaration (%1) and its original " 941*67e74705SXin Li "declaration (%0)">, InGroup<PropertyAttr>; 942*67e74705SXin Lidef error_property_setter_ambiguous_use : Error< 943*67e74705SXin Li "synthesized properties %0 and %1 both claim setter %2 -" 944*67e74705SXin Li " use of this setter will cause unexpected behavior">; 945*67e74705SXin Lidef warn_default_atomic_custom_getter_setter : Warning< 946*67e74705SXin Li "atomic by default property %0 has a user defined %select{getter|setter}1 " 947*67e74705SXin Li "(property should be marked 'atomic' if this is intended)">, 948*67e74705SXin Li InGroup<CustomAtomic>, DefaultIgnore; 949*67e74705SXin Lidef err_use_continuation_class : Error< 950*67e74705SXin Li "illegal redeclaration of property in class extension %0" 951*67e74705SXin Li " (attribute must be 'readwrite', while its primary must be 'readonly')">; 952*67e74705SXin Lidef err_type_mismatch_continuation_class : Error< 953*67e74705SXin Li "type of property %0 in class extension does not match " 954*67e74705SXin Li "property type in primary class">; 955*67e74705SXin Lidef err_use_continuation_class_redeclaration_readwrite : Error< 956*67e74705SXin Li "illegal redeclaration of 'readwrite' property in class extension %0" 957*67e74705SXin Li " (perhaps you intended this to be a 'readwrite' redeclaration of a " 958*67e74705SXin Li "'readonly' public property?)">; 959*67e74705SXin Lidef err_continuation_class : Error<"class extension has no primary class">; 960*67e74705SXin Lidef err_property_type : Error<"property cannot have array or function type %0">; 961*67e74705SXin Lidef error_missing_property_context : Error< 962*67e74705SXin Li "missing context for property implementation declaration">; 963*67e74705SXin Lidef error_bad_property_decl : Error< 964*67e74705SXin Li "property implementation must have its declaration in interface %0 or one of " 965*67e74705SXin Li "its extensions">; 966*67e74705SXin Lidef error_category_property : Error< 967*67e74705SXin Li "property declared in category %0 cannot be implemented in " 968*67e74705SXin Li "class implementation">; 969*67e74705SXin Lidef note_property_declare : Note< 970*67e74705SXin Li "property declared here">; 971*67e74705SXin Lidef note_protocol_property_declare : Note< 972*67e74705SXin Li "it could also be property of type %0 declared here">; 973*67e74705SXin Lidef note_property_synthesize : Note< 974*67e74705SXin Li "property synthesized here">; 975*67e74705SXin Lidef error_synthesize_category_decl : Error< 976*67e74705SXin Li "@synthesize not allowed in a category's implementation">; 977*67e74705SXin Lidef error_synthesize_on_class_property : Error< 978*67e74705SXin Li "@synthesize not allowed on a class property %0">; 979*67e74705SXin Lidef error_reference_property : Error< 980*67e74705SXin Li "property of reference type is not supported">; 981*67e74705SXin Lidef error_missing_property_interface : Error< 982*67e74705SXin Li "property implementation in a category with no category declaration">; 983*67e74705SXin Lidef error_bad_category_property_decl : Error< 984*67e74705SXin Li "property implementation must have its declaration in the category %0">; 985*67e74705SXin Lidef error_bad_property_context : Error< 986*67e74705SXin Li "property implementation must be in a class or category implementation">; 987*67e74705SXin Lidef error_missing_property_ivar_decl : Error< 988*67e74705SXin Li "synthesized property %0 must either be named the same as a compatible" 989*67e74705SXin Li " instance variable or must explicitly name an instance variable">; 990*67e74705SXin Lidef err_arc_perform_selector_retains : Error< 991*67e74705SXin Li "performSelector names a selector which retains the object">; 992*67e74705SXin Lidef warn_arc_perform_selector_leaks : Warning< 993*67e74705SXin Li "performSelector may cause a leak because its selector is unknown">, 994*67e74705SXin Li InGroup<DiagGroup<"arc-performSelector-leaks">>; 995*67e74705SXin Lidef warn_dealloc_in_category : Warning< 996*67e74705SXin Li"-dealloc is being overridden in a category">, 997*67e74705SXin LiInGroup<DeallocInCategory>; 998*67e74705SXin Lidef err_gc_weak_property_strong_type : Error< 999*67e74705SXin Li "weak attribute declared on a __strong type property in GC mode">; 1000*67e74705SXin Lidef warn_arc_repeated_use_of_weak : Warning < 1001*67e74705SXin Li "weak %select{variable|property|implicit property|instance variable}0 %1 is " 1002*67e74705SXin Li "accessed multiple times in this %select{function|method|block|lambda}2 " 1003*67e74705SXin Li "but may be unpredictably set to nil; assign to a strong variable to keep " 1004*67e74705SXin Li "the object alive">, 1005*67e74705SXin Li InGroup<ARCRepeatedUseOfWeak>, DefaultIgnore; 1006*67e74705SXin Lidef warn_implicitly_retains_self : Warning < 1007*67e74705SXin Li "block implicitly retains 'self'; explicitly mention 'self' to indicate " 1008*67e74705SXin Li "this is intended behavior">, 1009*67e74705SXin Li InGroup<DiagGroup<"implicit-retain-self">>, DefaultIgnore; 1010*67e74705SXin Lidef warn_arc_possible_repeated_use_of_weak : Warning < 1011*67e74705SXin Li "weak %select{variable|property|implicit property|instance variable}0 %1 may " 1012*67e74705SXin Li "be accessed multiple times in this %select{function|method|block|lambda}2 " 1013*67e74705SXin Li "and may be unpredictably set to nil; assign to a strong variable to keep " 1014*67e74705SXin Li "the object alive">, 1015*67e74705SXin Li InGroup<ARCRepeatedUseOfWeakMaybe>, DefaultIgnore; 1016*67e74705SXin Lidef note_arc_weak_also_accessed_here : Note< 1017*67e74705SXin Li "also accessed here">; 1018*67e74705SXin Lidef err_incomplete_synthesized_property : Error< 1019*67e74705SXin Li "cannot synthesize property %0 with incomplete type %1">; 1020*67e74705SXin Li 1021*67e74705SXin Lidef error_property_ivar_type : Error< 1022*67e74705SXin Li "type of property %0 (%1) does not match type of instance variable %2 (%3)">; 1023*67e74705SXin Lidef error_property_accessor_type : Error< 1024*67e74705SXin Li "type of property %0 (%1) does not match type of accessor %2 (%3)">; 1025*67e74705SXin Lidef error_ivar_in_superclass_use : Error< 1026*67e74705SXin Li "property %0 attempting to use instance variable %1 declared in super class %2">; 1027*67e74705SXin Lidef error_weak_property : Error< 1028*67e74705SXin Li "existing instance variable %1 for __weak property %0 must be __weak">; 1029*67e74705SXin Lidef error_strong_property : Error< 1030*67e74705SXin Li "existing instance variable %1 for strong property %0 may not be __weak">; 1031*67e74705SXin Lidef error_dynamic_property_ivar_decl : Error< 1032*67e74705SXin Li "dynamic property cannot have instance variable specification">; 1033*67e74705SXin Lidef error_duplicate_ivar_use : Error< 1034*67e74705SXin Li "synthesized properties %0 and %1 both claim instance variable %2">; 1035*67e74705SXin Lidef error_property_implemented : Error<"property %0 is already implemented">; 1036*67e74705SXin Lidef warn_objc_missing_super_call : Warning< 1037*67e74705SXin Li "method possibly missing a [super %0] call">, 1038*67e74705SXin Li InGroup<ObjCMissingSuperCalls>; 1039*67e74705SXin Lidef error_dealloc_bad_result_type : Error< 1040*67e74705SXin Li "dealloc return type must be correctly specified as 'void' under ARC, " 1041*67e74705SXin Li "instead of %0">; 1042*67e74705SXin Lidef warn_undeclared_selector : Warning< 1043*67e74705SXin Li "undeclared selector %0">, InGroup<UndeclaredSelector>, DefaultIgnore; 1044*67e74705SXin Lidef warn_undeclared_selector_with_typo : Warning< 1045*67e74705SXin Li "undeclared selector %0; did you mean %1?">, 1046*67e74705SXin Li InGroup<UndeclaredSelector>, DefaultIgnore; 1047*67e74705SXin Lidef warn_implicit_atomic_property : Warning< 1048*67e74705SXin Li "property is assumed atomic by default">, InGroup<ImplicitAtomic>, DefaultIgnore; 1049*67e74705SXin Lidef note_auto_readonly_iboutlet_fixup_suggest : Note< 1050*67e74705SXin Li "property should be changed to be readwrite">; 1051*67e74705SXin Lidef warn_auto_readonly_iboutlet_property : Warning< 1052*67e74705SXin Li "readonly IBOutlet property %0 when auto-synthesized may " 1053*67e74705SXin Li "not work correctly with 'nib' loader">, 1054*67e74705SXin Li InGroup<DiagGroup<"readonly-iboutlet-property">>; 1055*67e74705SXin Lidef warn_auto_implicit_atomic_property : Warning< 1056*67e74705SXin Li "property is assumed atomic when auto-synthesizing the property">, 1057*67e74705SXin Li InGroup<ImplicitAtomic>, DefaultIgnore; 1058*67e74705SXin Lidef warn_unimplemented_selector: Warning< 1059*67e74705SXin Li "no method with selector %0 is implemented in this translation unit">, 1060*67e74705SXin Li InGroup<Selector>, DefaultIgnore; 1061*67e74705SXin Lidef warn_unimplemented_protocol_method : Warning< 1062*67e74705SXin Li "method %0 in protocol %1 not implemented">, InGroup<Protocol>; 1063*67e74705SXin Lidef warning_multiple_selectors: Warning< 1064*67e74705SXin Li "several methods with selector %0 of mismatched types are found " 1065*67e74705SXin Li "for the @selector expression">, 1066*67e74705SXin Li InGroup<SelectorTypeMismatch>, DefaultIgnore; 1067*67e74705SXin Li 1068*67e74705SXin Lidef err_objc_kindof_nonobject : Error< 1069*67e74705SXin Li "'__kindof' specifier cannot be applied to non-object type %0">; 1070*67e74705SXin Lidef err_objc_kindof_wrong_position : Error< 1071*67e74705SXin Li "'__kindof' type specifier must precede the declarator">; 1072*67e74705SXin Li 1073*67e74705SXin Li// C++ declarations 1074*67e74705SXin Lidef err_static_assert_expression_is_not_constant : Error< 1075*67e74705SXin Li "static_assert expression is not an integral constant expression">; 1076*67e74705SXin Lidef err_static_assert_failed : Error<"static_assert failed%select{ %1|}0">; 1077*67e74705SXin Lidef ext_static_assert_no_message : ExtWarn< 1078*67e74705SXin Li "static_assert with no message is a C++1z extension">, InGroup<CXX1z>; 1079*67e74705SXin Lidef warn_cxx14_compat_static_assert_no_message : Warning< 1080*67e74705SXin Li "static_assert with no message is incompatible with C++ standards before C++1z">, 1081*67e74705SXin Li DefaultIgnore, InGroup<CXXPre1zCompat>; 1082*67e74705SXin Li 1083*67e74705SXin Lidef ext_inline_variable : ExtWarn< 1084*67e74705SXin Li "inline variables are a C++1z extension">, InGroup<CXX1z>; 1085*67e74705SXin Lidef warn_cxx14_compat_inline_variable : Warning< 1086*67e74705SXin Li "inline variables are incompatible with C++ standards before C++1z">, 1087*67e74705SXin Li DefaultIgnore, InGroup<CXXPre1zCompat>; 1088*67e74705SXin Li 1089*67e74705SXin Lidef warn_inline_namespace_reopened_noninline : Warning< 1090*67e74705SXin Li "inline namespace cannot be reopened as a non-inline namespace">; 1091*67e74705SXin Lidef err_inline_namespace_mismatch : Error< 1092*67e74705SXin Li "%select{|non-}0inline namespace " 1093*67e74705SXin Li "cannot be reopened as %select{non-|}0inline">; 1094*67e74705SXin Li 1095*67e74705SXin Lidef err_unexpected_friend : Error< 1096*67e74705SXin Li "friends can only be classes or functions">; 1097*67e74705SXin Lidef ext_enum_friend : ExtWarn< 1098*67e74705SXin Li "befriending enumeration type %0 is a C++11 extension">, InGroup<CXX11>; 1099*67e74705SXin Lidef warn_cxx98_compat_enum_friend : Warning< 1100*67e74705SXin Li "befriending enumeration type %0 is incompatible with C++98">, 1101*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1102*67e74705SXin Lidef ext_nonclass_type_friend : ExtWarn< 1103*67e74705SXin Li "non-class friend type %0 is a C++11 extension">, InGroup<CXX11>; 1104*67e74705SXin Lidef warn_cxx98_compat_nonclass_type_friend : Warning< 1105*67e74705SXin Li "non-class friend type %0 is incompatible with C++98">, 1106*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1107*67e74705SXin Lidef err_friend_is_member : Error< 1108*67e74705SXin Li "friends cannot be members of the declaring class">; 1109*67e74705SXin Lidef warn_cxx98_compat_friend_is_member : Warning< 1110*67e74705SXin Li "friend declaration naming a member of the declaring class is incompatible " 1111*67e74705SXin Li "with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 1112*67e74705SXin Lidef ext_unelaborated_friend_type : ExtWarn< 1113*67e74705SXin Li "unelaborated friend declaration is a C++11 extension; specify " 1114*67e74705SXin Li "'%select{struct|interface|union|class|enum}0' to befriend %1">, 1115*67e74705SXin Li InGroup<CXX11>; 1116*67e74705SXin Lidef warn_cxx98_compat_unelaborated_friend_type : Warning< 1117*67e74705SXin Li "befriending %1 without '%select{struct|interface|union|class|enum}0' " 1118*67e74705SXin Li "keyword is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 1119*67e74705SXin Lidef err_qualified_friend_not_found : Error< 1120*67e74705SXin Li "no function named %0 with type %1 was found in the specified scope">; 1121*67e74705SXin Lidef err_introducing_special_friend : Error< 1122*67e74705SXin Li "must use a qualified name when declaring a %select{constructor|" 1123*67e74705SXin Li "destructor|conversion operator}0 as a friend">; 1124*67e74705SXin Lidef err_tagless_friend_type_template : Error< 1125*67e74705SXin Li "friend type templates must use an elaborated type">; 1126*67e74705SXin Lidef err_no_matching_local_friend : Error< 1127*67e74705SXin Li "no matching function found in local scope">; 1128*67e74705SXin Lidef err_no_matching_local_friend_suggest : Error< 1129*67e74705SXin Li "no matching function %0 found in local scope; did you mean %3?">; 1130*67e74705SXin Lidef err_partial_specialization_friend : Error< 1131*67e74705SXin Li "partial specialization cannot be declared as a friend">; 1132*67e74705SXin Lidef err_qualified_friend_def : Error< 1133*67e74705SXin Li "friend function definition cannot be qualified with '%0'">; 1134*67e74705SXin Lidef err_friend_def_in_local_class : Error< 1135*67e74705SXin Li "friend function cannot be defined in a local class">; 1136*67e74705SXin Lidef err_friend_not_first_in_declaration : Error< 1137*67e74705SXin Li "'friend' must appear first in a non-function declaration">; 1138*67e74705SXin Lidef err_using_decl_friend : Error< 1139*67e74705SXin Li "cannot befriend target of using declaration">; 1140*67e74705SXin Lidef warn_template_qualified_friend_unsupported : Warning< 1141*67e74705SXin Li "dependent nested name specifier '%0' for friend class declaration is " 1142*67e74705SXin Li "not supported; turning off access control for %1">, 1143*67e74705SXin Li InGroup<UnsupportedFriend>; 1144*67e74705SXin Lidef warn_template_qualified_friend_ignored : Warning< 1145*67e74705SXin Li "dependent nested name specifier '%0' for friend template declaration is " 1146*67e74705SXin Li "not supported; ignoring this friend declaration">, 1147*67e74705SXin Li InGroup<UnsupportedFriend>; 1148*67e74705SXin Lidef ext_friend_tag_redecl_outside_namespace : ExtWarn< 1149*67e74705SXin Li "unqualified friend declaration referring to type outside of the nearest " 1150*67e74705SXin Li "enclosing namespace is a Microsoft extension; add a nested name specifier">, 1151*67e74705SXin Li InGroup<MicrosoftUnqualifiedFriend>; 1152*67e74705SXin Lidef err_pure_friend : Error<"friend declaration cannot have a pure-specifier">; 1153*67e74705SXin Li 1154*67e74705SXin Lidef err_invalid_member_in_interface : Error< 1155*67e74705SXin Li "%select{data member |non-public member function |static member function |" 1156*67e74705SXin Li "user-declared constructor|user-declared destructor|operator |" 1157*67e74705SXin Li "nested class }0%1 is not permitted within an interface type">; 1158*67e74705SXin Lidef err_invalid_base_in_interface : Error< 1159*67e74705SXin Li "interface type cannot inherit from " 1160*67e74705SXin Li "%select{'struct|non-public 'interface|'class}0 %1'">; 1161*67e74705SXin Li 1162*67e74705SXin Lidef err_abstract_type_in_decl : Error< 1163*67e74705SXin Li "%select{return|parameter|variable|field|instance variable|" 1164*67e74705SXin Li "synthesized instance variable}0 type %1 is an abstract class">; 1165*67e74705SXin Lidef err_allocation_of_abstract_type : Error< 1166*67e74705SXin Li "allocating an object of abstract class type %0">; 1167*67e74705SXin Lidef err_throw_abstract_type : Error< 1168*67e74705SXin Li "cannot throw an object of abstract type %0">; 1169*67e74705SXin Lidef err_array_of_abstract_type : Error<"array of abstract class type %0">; 1170*67e74705SXin Lidef err_capture_of_abstract_type : Error< 1171*67e74705SXin Li "by-copy capture of value of abstract type %0">; 1172*67e74705SXin Lidef err_capture_of_incomplete_type : Error< 1173*67e74705SXin Li "by-copy capture of variable %0 with incomplete type %1">; 1174*67e74705SXin Lidef err_capture_default_non_local : Error< 1175*67e74705SXin Li "non-local lambda expression cannot have a capture-default">; 1176*67e74705SXin Li 1177*67e74705SXin Lidef err_multiple_final_overriders : Error< 1178*67e74705SXin Li "virtual function %q0 has more than one final overrider in %1">; 1179*67e74705SXin Lidef note_final_overrider : Note<"final overrider of %q0 in %1">; 1180*67e74705SXin Li 1181*67e74705SXin Lidef err_type_defined_in_type_specifier : Error< 1182*67e74705SXin Li "%0 cannot be defined in a type specifier">; 1183*67e74705SXin Lidef err_type_defined_in_result_type : Error< 1184*67e74705SXin Li "%0 cannot be defined in the result type of a function">; 1185*67e74705SXin Lidef err_type_defined_in_param_type : Error< 1186*67e74705SXin Li "%0 cannot be defined in a parameter type">; 1187*67e74705SXin Lidef err_type_defined_in_alias_template : Error< 1188*67e74705SXin Li "%0 cannot be defined in a type alias template">; 1189*67e74705SXin Lidef err_type_defined_in_condition : Error< 1190*67e74705SXin Li "%0 cannot be defined in a condition">; 1191*67e74705SXin Li 1192*67e74705SXin Lidef note_pure_virtual_function : Note< 1193*67e74705SXin Li "unimplemented pure virtual method %0 in %1">; 1194*67e74705SXin Li 1195*67e74705SXin Lidef note_pure_qualified_call_kext : Note< 1196*67e74705SXin Li "qualified call to %0::%1 is treated as a virtual call to %1 due to -fapple-kext">; 1197*67e74705SXin Li 1198*67e74705SXin Lidef err_deleted_decl_not_first : Error< 1199*67e74705SXin Li "deleted definition must be first declaration">; 1200*67e74705SXin Li 1201*67e74705SXin Lidef err_deleted_override : Error< 1202*67e74705SXin Li "deleted function %0 cannot override a non-deleted function">; 1203*67e74705SXin Li 1204*67e74705SXin Lidef err_non_deleted_override : Error< 1205*67e74705SXin Li "non-deleted function %0 cannot override a deleted function">; 1206*67e74705SXin Li 1207*67e74705SXin Lidef warn_weak_vtable : Warning< 1208*67e74705SXin Li "%0 has no out-of-line virtual method definitions; its vtable will be " 1209*67e74705SXin Li "emitted in every translation unit">, 1210*67e74705SXin Li InGroup<DiagGroup<"weak-vtables">>, DefaultIgnore; 1211*67e74705SXin Lidef warn_weak_template_vtable : Warning< 1212*67e74705SXin Li "explicit template instantiation %0 will emit a vtable in every " 1213*67e74705SXin Li "translation unit">, 1214*67e74705SXin Li InGroup<DiagGroup<"weak-template-vtables">>, DefaultIgnore; 1215*67e74705SXin Li 1216*67e74705SXin Lidef ext_using_undefined_std : ExtWarn< 1217*67e74705SXin Li "using directive refers to implicitly-defined namespace 'std'">; 1218*67e74705SXin Li 1219*67e74705SXin Li// C++ exception specifications 1220*67e74705SXin Lidef err_exception_spec_in_typedef : Error< 1221*67e74705SXin Li "exception specifications are not allowed in %select{typedefs|type aliases}0">; 1222*67e74705SXin Lidef err_distant_exception_spec : Error< 1223*67e74705SXin Li "exception specifications are not allowed beyond a single level " 1224*67e74705SXin Li "of indirection">; 1225*67e74705SXin Lidef err_incomplete_in_exception_spec : Error< 1226*67e74705SXin Li "%select{|pointer to |reference to }0incomplete type %1 is not allowed " 1227*67e74705SXin Li "in exception specification">; 1228*67e74705SXin Lidef ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Text>, 1229*67e74705SXin Li InGroup<MicrosoftExceptionSpec>; 1230*67e74705SXin Lidef err_rref_in_exception_spec : Error< 1231*67e74705SXin Li "rvalue reference type %0 is not allowed in exception specification">; 1232*67e74705SXin Lidef err_mismatched_exception_spec : Error< 1233*67e74705SXin Li "exception specification in declaration does not match previous declaration">; 1234*67e74705SXin Lidef ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>, 1235*67e74705SXin Li InGroup<MicrosoftExceptionSpec>; 1236*67e74705SXin Lidef err_override_exception_spec : Error< 1237*67e74705SXin Li "exception specification of overriding function is more lax than " 1238*67e74705SXin Li "base version">; 1239*67e74705SXin Lidef ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>, 1240*67e74705SXin Li InGroup<MicrosoftExceptionSpec>; 1241*67e74705SXin Lidef err_incompatible_exception_specs : Error< 1242*67e74705SXin Li "target exception specification is not superset of source">; 1243*67e74705SXin Lidef err_deep_exception_specs_differ : Error< 1244*67e74705SXin Li "exception specifications of %select{return|argument}0 types differ">; 1245*67e74705SXin Lidef err_missing_exception_specification : Error< 1246*67e74705SXin Li "%0 is missing exception specification '%1'">; 1247*67e74705SXin Lidef ext_missing_exception_specification : ExtWarn< 1248*67e74705SXin Li err_missing_exception_specification.Text>, 1249*67e74705SXin Li InGroup<DiagGroup<"missing-exception-spec">>; 1250*67e74705SXin Lidef ext_ms_missing_exception_specification : ExtWarn< 1251*67e74705SXin Li err_missing_exception_specification.Text>, 1252*67e74705SXin Li InGroup<MicrosoftExceptionSpec>; 1253*67e74705SXin Lidef err_noexcept_needs_constant_expression : Error< 1254*67e74705SXin Li "argument to noexcept specifier must be a constant expression">; 1255*67e74705SXin Lidef err_exception_spec_not_parsed : Error< 1256*67e74705SXin Li "exception specification is not available until end of class definition">; 1257*67e74705SXin Li 1258*67e74705SXin Li// C++ access checking 1259*67e74705SXin Lidef err_class_redeclared_with_different_access : Error< 1260*67e74705SXin Li "%0 redeclared with '%1' access">; 1261*67e74705SXin Lidef err_access : Error< 1262*67e74705SXin Li "%1 is a %select{private|protected}0 member of %3">, AccessControl; 1263*67e74705SXin Lidef ext_ms_using_declaration_inaccessible : ExtWarn< 1264*67e74705SXin Li "using declaration referring to inaccessible member '%0' (which refers " 1265*67e74705SXin Li "to accessible member '%1') is a Microsoft compatibility extension">, 1266*67e74705SXin Li AccessControl, InGroup<MicrosoftUsingDecl>; 1267*67e74705SXin Lidef err_access_ctor : Error< 1268*67e74705SXin Li "calling a %select{private|protected}0 constructor of class %2">, 1269*67e74705SXin Li AccessControl; 1270*67e74705SXin Lidef ext_rvalue_to_reference_access_ctor : Extension< 1271*67e74705SXin Li "C++98 requires an accessible copy constructor for class %2 when binding " 1272*67e74705SXin Li "a reference to a temporary; was %select{private|protected}0">, 1273*67e74705SXin Li AccessControl, InGroup<BindToTemporaryCopy>; 1274*67e74705SXin Lidef err_access_base_ctor : Error< 1275*67e74705SXin Li // The ERRORs represent other special members that aren't constructors, in 1276*67e74705SXin Li // hopes that someone will bother noticing and reporting if they appear 1277*67e74705SXin Li "%select{base class|inherited virtual base class}0 %1 has %select{private|" 1278*67e74705SXin Li "protected}3 %select{default |copy |move |*ERROR* |*ERROR* " 1279*67e74705SXin Li "|*ERROR*|}2constructor">, AccessControl; 1280*67e74705SXin Lidef err_access_field_ctor : Error< 1281*67e74705SXin Li // The ERRORs represent other special members that aren't constructors, in 1282*67e74705SXin Li // hopes that someone will bother noticing and reporting if they appear 1283*67e74705SXin Li "field of type %0 has %select{private|protected}2 " 1284*67e74705SXin Li "%select{default |copy |move |*ERROR* |*ERROR* |*ERROR* |}1constructor">, 1285*67e74705SXin Li AccessControl; 1286*67e74705SXin Lidef err_access_friend_function : Error< 1287*67e74705SXin Li "friend function %1 is a %select{private|protected}0 member of %3">, 1288*67e74705SXin Li AccessControl; 1289*67e74705SXin Li 1290*67e74705SXin Lidef err_access_dtor : Error< 1291*67e74705SXin Li "calling a %select{private|protected}1 destructor of class %0">, 1292*67e74705SXin Li AccessControl; 1293*67e74705SXin Lidef err_access_dtor_base : 1294*67e74705SXin Li Error<"base class %0 has %select{private|protected}1 destructor">, 1295*67e74705SXin Li AccessControl; 1296*67e74705SXin Lidef err_access_dtor_vbase : 1297*67e74705SXin Li Error<"inherited virtual base class %1 has " 1298*67e74705SXin Li "%select{private|protected}2 destructor">, 1299*67e74705SXin Li AccessControl; 1300*67e74705SXin Lidef err_access_dtor_temp : 1301*67e74705SXin Li Error<"temporary of type %0 has %select{private|protected}1 destructor">, 1302*67e74705SXin Li AccessControl; 1303*67e74705SXin Lidef err_access_dtor_exception : 1304*67e74705SXin Li Error<"exception object of type %0 has %select{private|protected}1 " 1305*67e74705SXin Li "destructor">, AccessControl; 1306*67e74705SXin Lidef err_access_dtor_field : 1307*67e74705SXin Li Error<"field of type %1 has %select{private|protected}2 destructor">, 1308*67e74705SXin Li AccessControl; 1309*67e74705SXin Lidef err_access_dtor_var : 1310*67e74705SXin Li Error<"variable of type %1 has %select{private|protected}2 destructor">, 1311*67e74705SXin Li AccessControl; 1312*67e74705SXin Lidef err_access_dtor_ivar : 1313*67e74705SXin Li Error<"instance variable of type %0 has %select{private|protected}1 " 1314*67e74705SXin Li "destructor">, 1315*67e74705SXin Li AccessControl; 1316*67e74705SXin Lidef note_previous_access_declaration : Note< 1317*67e74705SXin Li "previously declared '%1' here">; 1318*67e74705SXin Lidef note_access_natural : Note< 1319*67e74705SXin Li "%select{|implicitly }1declared %select{private|protected}0 here">; 1320*67e74705SXin Lidef note_access_constrained_by_path : Note< 1321*67e74705SXin Li "constrained by %select{|implicitly }1%select{private|protected}0" 1322*67e74705SXin Li " inheritance here">; 1323*67e74705SXin Lidef note_access_protected_restricted_noobject : Note< 1324*67e74705SXin Li "must name member using the type of the current context %0">; 1325*67e74705SXin Lidef note_access_protected_restricted_ctordtor : Note< 1326*67e74705SXin Li "protected %select{constructor|destructor}0 can only be used to " 1327*67e74705SXin Li "%select{construct|destroy}0 a base class subobject">; 1328*67e74705SXin Lidef note_access_protected_restricted_object : Note< 1329*67e74705SXin Li "can only access this member on an object of type %0">; 1330*67e74705SXin Lidef warn_cxx98_compat_sfinae_access_control : Warning< 1331*67e74705SXin Li "substitution failure due to access control is incompatible with C++98">, 1332*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore, NoSFINAE; 1333*67e74705SXin Li 1334*67e74705SXin Li// C++ name lookup 1335*67e74705SXin Lidef err_incomplete_nested_name_spec : Error< 1336*67e74705SXin Li "incomplete type %0 named in nested name specifier">; 1337*67e74705SXin Lidef err_dependent_nested_name_spec : Error< 1338*67e74705SXin Li "nested name specifier for a declaration cannot depend on a template " 1339*67e74705SXin Li "parameter">; 1340*67e74705SXin Lidef err_nested_name_member_ref_lookup_ambiguous : Error< 1341*67e74705SXin Li "lookup of %0 in member access expression is ambiguous">; 1342*67e74705SXin Lidef ext_nested_name_member_ref_lookup_ambiguous : ExtWarn< 1343*67e74705SXin Li "lookup of %0 in member access expression is ambiguous; using member of %1">, 1344*67e74705SXin Li InGroup<AmbigMemberTemplate>; 1345*67e74705SXin Lidef note_ambig_member_ref_object_type : Note< 1346*67e74705SXin Li "lookup in the object type %0 refers here">; 1347*67e74705SXin Lidef note_ambig_member_ref_scope : Note< 1348*67e74705SXin Li "lookup from the current scope refers here">; 1349*67e74705SXin Lidef err_qualified_member_nonclass : Error< 1350*67e74705SXin Li "qualified member access refers to a member in %0">; 1351*67e74705SXin Lidef err_incomplete_member_access : Error< 1352*67e74705SXin Li "member access into incomplete type %0">; 1353*67e74705SXin Lidef err_incomplete_type : Error< 1354*67e74705SXin Li "incomplete type %0 where a complete type is required">; 1355*67e74705SXin Lidef warn_cxx98_compat_enum_nested_name_spec : Warning< 1356*67e74705SXin Li "enumeration type in nested name specifier is incompatible with C++98">, 1357*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1358*67e74705SXin Lidef err_nested_name_spec_is_not_class : Error< 1359*67e74705SXin Li "%0 cannot appear before '::' because it is not a class" 1360*67e74705SXin Li "%select{ or namespace|, namespace, or enumeration}1; did you mean ':'?">; 1361*67e74705SXin Lidef ext_nested_name_spec_is_enum : ExtWarn< 1362*67e74705SXin Li "use of enumeration in a nested name specifier is a C++11 extension">, 1363*67e74705SXin Li InGroup<CXX11>; 1364*67e74705SXin Li 1365*67e74705SXin Li// C++ class members 1366*67e74705SXin Lidef err_storageclass_invalid_for_member : Error< 1367*67e74705SXin Li "storage class specified for a member declaration">; 1368*67e74705SXin Lidef err_mutable_function : Error<"'mutable' cannot be applied to functions">; 1369*67e74705SXin Lidef err_mutable_reference : Error<"'mutable' cannot be applied to references">; 1370*67e74705SXin Lidef ext_mutable_reference : ExtWarn< 1371*67e74705SXin Li "'mutable' on a reference type is a Microsoft extension">, 1372*67e74705SXin Li InGroup<MicrosoftMutableReference>; 1373*67e74705SXin Lidef err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">; 1374*67e74705SXin Lidef err_mutable_nonmember : Error< 1375*67e74705SXin Li "'mutable' can only be applied to member variables">; 1376*67e74705SXin Lidef err_virtual_in_union : Error< 1377*67e74705SXin Li "unions cannot have virtual functions">; 1378*67e74705SXin Lidef err_virtual_non_function : Error< 1379*67e74705SXin Li "'virtual' can only appear on non-static member functions">; 1380*67e74705SXin Lidef err_virtual_out_of_class : Error< 1381*67e74705SXin Li "'virtual' can only be specified inside the class definition">; 1382*67e74705SXin Lidef err_virtual_member_function_template : Error< 1383*67e74705SXin Li "'virtual' cannot be specified on member function templates">; 1384*67e74705SXin Lidef err_static_overrides_virtual : Error< 1385*67e74705SXin Li "'static' member function %0 overrides a virtual function in a base class">; 1386*67e74705SXin Lidef err_explicit_non_function : Error< 1387*67e74705SXin Li "'explicit' can only appear on non-static member functions">; 1388*67e74705SXin Lidef err_explicit_out_of_class : Error< 1389*67e74705SXin Li "'explicit' can only be specified inside the class definition">; 1390*67e74705SXin Lidef err_explicit_non_ctor_or_conv_function : Error< 1391*67e74705SXin Li "'explicit' can only be applied to a constructor or conversion function">; 1392*67e74705SXin Lidef err_static_not_bitfield : Error<"static member %0 cannot be a bit-field">; 1393*67e74705SXin Lidef err_static_out_of_line : Error< 1394*67e74705SXin Li "'static' can only be specified inside the class definition">; 1395*67e74705SXin Lidef err_storage_class_for_static_member : Error< 1396*67e74705SXin Li "static data member definition cannot specify a storage class">; 1397*67e74705SXin Lidef err_typedef_not_bitfield : Error<"typedef member %0 cannot be a bit-field">; 1398*67e74705SXin Lidef err_not_integral_type_bitfield : Error< 1399*67e74705SXin Li "bit-field %0 has non-integral type %1">; 1400*67e74705SXin Lidef err_not_integral_type_anon_bitfield : Error< 1401*67e74705SXin Li "anonymous bit-field has non-integral type %0">; 1402*67e74705SXin Lidef err_member_function_initialization : Error< 1403*67e74705SXin Li "initializer on function does not look like a pure-specifier">; 1404*67e74705SXin Lidef err_non_virtual_pure : Error< 1405*67e74705SXin Li "%0 is not virtual and cannot be declared pure">; 1406*67e74705SXin Lidef ext_pure_function_definition : ExtWarn< 1407*67e74705SXin Li "function definition with pure-specifier is a Microsoft extension">, 1408*67e74705SXin Li InGroup<MicrosoftPureDefinition>; 1409*67e74705SXin Lidef err_implicit_object_parameter_init : Error< 1410*67e74705SXin Li "cannot initialize object parameter of type %0 with an expression " 1411*67e74705SXin Li "of type %1">; 1412*67e74705SXin Lidef err_qualified_member_of_unrelated : Error< 1413*67e74705SXin Li "%q0 is not a member of class %1">; 1414*67e74705SXin Li 1415*67e74705SXin Lidef warn_call_to_pure_virtual_member_function_from_ctor_dtor : Warning< 1416*67e74705SXin Li "call to pure virtual member function %0 has undefined behavior; " 1417*67e74705SXin Li "overrides of %0 in subclasses are not available in the " 1418*67e74705SXin Li "%select{constructor|destructor}1 of %2">; 1419*67e74705SXin Li 1420*67e74705SXin Lidef note_member_declared_at : Note<"member is declared here">; 1421*67e74705SXin Lidef note_ivar_decl : Note<"instance variable is declared here">; 1422*67e74705SXin Lidef note_bitfield_decl : Note<"bit-field is declared here">; 1423*67e74705SXin Lidef note_implicit_param_decl : Note<"%0 is an implicit parameter">; 1424*67e74705SXin Lidef note_member_synthesized_at : Note< 1425*67e74705SXin Li "implicit %select{default constructor|copy constructor|move constructor|copy " 1426*67e74705SXin Li "assignment operator|move assignment operator|destructor}0 for %1 first " 1427*67e74705SXin Li "required here">; 1428*67e74705SXin Lidef note_inhctor_synthesized_at : Note< 1429*67e74705SXin Li "inherited constructor for %0 first required here">; 1430*67e74705SXin Lidef err_missing_default_ctor : Error< 1431*67e74705SXin Li "%select{constructor for %1 must explicitly initialize the|" 1432*67e74705SXin Li "implicit default constructor for %1 must explicitly initialize the|" 1433*67e74705SXin Li "cannot use constructor inherited from base class %4;}0 " 1434*67e74705SXin Li "%select{base class|member}2 %3 %select{which|which|of %1}0 " 1435*67e74705SXin Li "does not have a default constructor">; 1436*67e74705SXin Lidef note_due_to_dllexported_class : Note< 1437*67e74705SXin Li "due to '%0' being dllexported%select{|; try compiling in C++11 mode}1">; 1438*67e74705SXin Li 1439*67e74705SXin Lidef err_illegal_union_or_anon_struct_member : Error< 1440*67e74705SXin Li "%select{anonymous struct|union}0 member %1 has a non-trivial " 1441*67e74705SXin Li "%select{constructor|copy constructor|move constructor|copy assignment " 1442*67e74705SXin Li "operator|move assignment operator|destructor}2">; 1443*67e74705SXin Lidef warn_cxx98_compat_nontrivial_union_or_anon_struct_member : Warning< 1444*67e74705SXin Li "%select{anonymous struct|union}0 member %1 with a non-trivial " 1445*67e74705SXin Li "%select{constructor|copy constructor|move constructor|copy assignment " 1446*67e74705SXin Li "operator|move assignment operator|destructor}2 is incompatible with C++98">, 1447*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1448*67e74705SXin Li 1449*67e74705SXin Lidef note_nontrivial_virtual_dtor : Note< 1450*67e74705SXin Li "destructor for %0 is not trivial because it is virtual">; 1451*67e74705SXin Lidef note_nontrivial_has_virtual : Note< 1452*67e74705SXin Li "because type %0 has a virtual %select{member function|base class}1">; 1453*67e74705SXin Lidef note_nontrivial_no_def_ctor : Note< 1454*67e74705SXin Li "because %select{base class of |field of |}0type %1 has no " 1455*67e74705SXin Li "default constructor">; 1456*67e74705SXin Lidef note_user_declared_ctor : Note< 1457*67e74705SXin Li "implicit default constructor suppressed by user-declared constructor">; 1458*67e74705SXin Lidef note_nontrivial_no_copy : Note< 1459*67e74705SXin Li "because no %select{<<ERROR>>|constructor|constructor|assignment operator|" 1460*67e74705SXin Li "assignment operator|<<ERROR>>}2 can be used to " 1461*67e74705SXin Li "%select{<<ERROR>>|copy|move|copy|move|<<ERROR>>}2 " 1462*67e74705SXin Li "%select{base class|field|an object}0 of type %3">; 1463*67e74705SXin Lidef note_nontrivial_user_provided : Note< 1464*67e74705SXin Li "because %select{base class of |field of |}0type %1 has a user-provided " 1465*67e74705SXin Li "%select{default constructor|copy constructor|move constructor|" 1466*67e74705SXin Li "copy assignment operator|move assignment operator|destructor}2">; 1467*67e74705SXin Lidef note_nontrivial_in_class_init : Note< 1468*67e74705SXin Li "because field %0 has an initializer">; 1469*67e74705SXin Lidef note_nontrivial_param_type : Note< 1470*67e74705SXin Li "because its parameter is %diff{of type $, not $|of the wrong type}2,3">; 1471*67e74705SXin Lidef note_nontrivial_default_arg : Note<"because it has a default argument">; 1472*67e74705SXin Lidef note_nontrivial_variadic : Note<"because it is a variadic function">; 1473*67e74705SXin Lidef note_nontrivial_subobject : Note< 1474*67e74705SXin Li "because the function selected to %select{construct|copy|move|copy|move|" 1475*67e74705SXin Li "destroy}2 %select{base class|field}0 of type %1 is not trivial">; 1476*67e74705SXin Lidef note_nontrivial_objc_ownership : Note< 1477*67e74705SXin Li "because type %0 has a member with %select{no|no|__strong|__weak|" 1478*67e74705SXin Li "__autoreleasing}1 ownership">; 1479*67e74705SXin Li 1480*67e74705SXin Lidef err_static_data_member_not_allowed_in_anon_struct : Error< 1481*67e74705SXin Li "static data member %0 not allowed in anonymous struct">; 1482*67e74705SXin Lidef ext_static_data_member_in_union : ExtWarn< 1483*67e74705SXin Li "static data member %0 in union is a C++11 extension">, InGroup<CXX11>; 1484*67e74705SXin Lidef warn_cxx98_compat_static_data_member_in_union : Warning< 1485*67e74705SXin Li "static data member %0 in union is incompatible with C++98">, 1486*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1487*67e74705SXin Lidef ext_union_member_of_reference_type : ExtWarn< 1488*67e74705SXin Li "union member %0 has reference type %1, which is a Microsoft extension">, 1489*67e74705SXin Li InGroup<MicrosoftUnionMemberReference>; 1490*67e74705SXin Lidef err_union_member_of_reference_type : Error< 1491*67e74705SXin Li "union member %0 has reference type %1">; 1492*67e74705SXin Lidef ext_anonymous_struct_union_qualified : Extension< 1493*67e74705SXin Li "anonymous %select{struct|union}0 cannot be '%1'">; 1494*67e74705SXin Lidef err_different_return_type_for_overriding_virtual_function : Error< 1495*67e74705SXin Li "virtual function %0 has a different return type " 1496*67e74705SXin Li "%diff{($) than the function it overrides (which has return type $)|" 1497*67e74705SXin Li "than the function it overrides}1,2">; 1498*67e74705SXin Lidef note_overridden_virtual_function : Note< 1499*67e74705SXin Li "overridden virtual function is here">; 1500*67e74705SXin Lidef err_conflicting_overriding_cc_attributes : Error< 1501*67e74705SXin Li "virtual function %0 has different calling convention attributes " 1502*67e74705SXin Li "%diff{($) than the function it overrides (which has calling convention $)|" 1503*67e74705SXin Li "than the function it overrides}1,2">; 1504*67e74705SXin Li 1505*67e74705SXin Lidef err_covariant_return_inaccessible_base : Error< 1506*67e74705SXin Li "invalid covariant return for virtual function: %1 is a " 1507*67e74705SXin Li "%select{private|protected}2 base class of %0">, AccessControl; 1508*67e74705SXin Lidef err_covariant_return_ambiguous_derived_to_base_conv : Error< 1509*67e74705SXin Li "return type of virtual function %3 is not covariant with the return type of " 1510*67e74705SXin Li "the function it overrides (ambiguous conversion from derived class " 1511*67e74705SXin Li "%0 to base class %1:%2)">; 1512*67e74705SXin Lidef err_covariant_return_not_derived : Error< 1513*67e74705SXin Li "return type of virtual function %0 is not covariant with the return type of " 1514*67e74705SXin Li "the function it overrides (%1 is not derived from %2)">; 1515*67e74705SXin Lidef err_covariant_return_incomplete : Error< 1516*67e74705SXin Li "return type of virtual function %0 is not covariant with the return type of " 1517*67e74705SXin Li "the function it overrides (%1 is incomplete)">; 1518*67e74705SXin Lidef err_covariant_return_type_different_qualifications : Error< 1519*67e74705SXin Li "return type of virtual function %0 is not covariant with the return type of " 1520*67e74705SXin Li "the function it overrides (%1 has different qualifiers than %2)">; 1521*67e74705SXin Lidef err_covariant_return_type_class_type_more_qualified : Error< 1522*67e74705SXin Li "return type of virtual function %0 is not covariant with the return type of " 1523*67e74705SXin Li "the function it overrides (class type %1 is more qualified than class " 1524*67e74705SXin Li "type %2">; 1525*67e74705SXin Li 1526*67e74705SXin Li// C++ constructors 1527*67e74705SXin Lidef err_constructor_cannot_be : Error<"constructor cannot be declared '%0'">; 1528*67e74705SXin Lidef err_invalid_qualified_constructor : Error< 1529*67e74705SXin Li "'%0' qualifier is not allowed on a constructor">; 1530*67e74705SXin Lidef err_ref_qualifier_constructor : Error< 1531*67e74705SXin Li "ref-qualifier '%select{&&|&}0' is not allowed on a constructor">; 1532*67e74705SXin Li 1533*67e74705SXin Lidef err_constructor_return_type : Error< 1534*67e74705SXin Li "constructor cannot have a return type">; 1535*67e74705SXin Lidef err_constructor_redeclared : Error<"constructor cannot be redeclared">; 1536*67e74705SXin Lidef err_constructor_byvalue_arg : Error< 1537*67e74705SXin Li "copy constructor must pass its first argument by reference">; 1538*67e74705SXin Lidef warn_no_constructor_for_refconst : Warning< 1539*67e74705SXin Li "%select{struct|interface|union|class|enum}0 %1 does not declare any " 1540*67e74705SXin Li "constructor to initialize its non-modifiable members">; 1541*67e74705SXin Lidef note_refconst_member_not_initialized : Note< 1542*67e74705SXin Li "%select{const|reference}0 member %1 will never be initialized">; 1543*67e74705SXin Lidef ext_ms_explicit_constructor_call : ExtWarn< 1544*67e74705SXin Li "explicit constructor calls are a Microsoft extension">, 1545*67e74705SXin Li InGroup<MicrosoftExplicitConstructorCall>; 1546*67e74705SXin Li 1547*67e74705SXin Li// C++ destructors 1548*67e74705SXin Lidef err_destructor_not_member : Error< 1549*67e74705SXin Li "destructor must be a non-static member function">; 1550*67e74705SXin Lidef err_destructor_cannot_be : Error<"destructor cannot be declared '%0'">; 1551*67e74705SXin Lidef err_invalid_qualified_destructor : Error< 1552*67e74705SXin Li "'%0' qualifier is not allowed on a destructor">; 1553*67e74705SXin Lidef err_ref_qualifier_destructor : Error< 1554*67e74705SXin Li "ref-qualifier '%select{&&|&}0' is not allowed on a destructor">; 1555*67e74705SXin Lidef err_destructor_return_type : Error<"destructor cannot have a return type">; 1556*67e74705SXin Lidef err_destructor_redeclared : Error<"destructor cannot be redeclared">; 1557*67e74705SXin Lidef err_destructor_with_params : Error<"destructor cannot have any parameters">; 1558*67e74705SXin Lidef err_destructor_variadic : Error<"destructor cannot be variadic">; 1559*67e74705SXin Lidef err_destructor_typedef_name : Error< 1560*67e74705SXin Li "destructor cannot be declared using a %select{typedef|type alias}1 %0 of the class name">; 1561*67e74705SXin Lidef err_destructor_name : Error< 1562*67e74705SXin Li "expected the class name after '~' to name the enclosing class">; 1563*67e74705SXin Lidef err_destructor_class_name : Error< 1564*67e74705SXin Li "expected the class name after '~' to name a destructor">; 1565*67e74705SXin Lidef err_ident_in_dtor_not_a_type : Error< 1566*67e74705SXin Li "identifier %0 in object destruction expression does not name a type">; 1567*67e74705SXin Lidef err_destructor_expr_type_mismatch : Error< 1568*67e74705SXin Li "destructor type %0 in object destruction expression does not match the " 1569*67e74705SXin Li "type %1 of the object being destroyed">; 1570*67e74705SXin Lidef note_destructor_type_here : Note< 1571*67e74705SXin Li "type %0 is declared here">; 1572*67e74705SXin Li 1573*67e74705SXin Lidef err_destructor_template : Error< 1574*67e74705SXin Li "destructor cannot be declared as a template">; 1575*67e74705SXin Li 1576*67e74705SXin Li// C++ initialization 1577*67e74705SXin Lidef err_init_conversion_failed : Error< 1578*67e74705SXin Li "cannot initialize %select{a variable|a parameter|return object|an " 1579*67e74705SXin Li "exception object|a member subobject|an array element|a new value|a value|a " 1580*67e74705SXin Li "base class|a constructor delegation|a vector element|a block element|a " 1581*67e74705SXin Li "complex element|a lambda capture|a compound literal initializer|a " 1582*67e74705SXin Li "related result|a parameter of CF audited function}0 " 1583*67e74705SXin Li "%diff{of type $ with an %select{rvalue|lvalue}2 of type $|" 1584*67e74705SXin Li "with an %select{rvalue|lvalue}2 of incompatible type}1,3" 1585*67e74705SXin Li "%select{|: different classes%diff{ ($ vs $)|}5,6" 1586*67e74705SXin Li "|: different number of parameters (%5 vs %6)" 1587*67e74705SXin Li "|: type mismatch at %ordinal5 parameter%diff{ ($ vs $)|}6,7" 1588*67e74705SXin Li "|: different return type%diff{ ($ vs $)|}5,6" 1589*67e74705SXin Li "|: different qualifiers (" 1590*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 1591*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}5 vs " 1592*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 1593*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}6)}4">; 1594*67e74705SXin Li 1595*67e74705SXin Lidef err_lvalue_to_rvalue_ref : Error<"rvalue reference %diff{to type $ cannot " 1596*67e74705SXin Li "bind to lvalue of type $|cannot bind to incompatible lvalue}0,1">; 1597*67e74705SXin Lidef err_lvalue_reference_bind_to_initlist : Error< 1598*67e74705SXin Li "%select{non-const|volatile}0 lvalue reference to type %1 cannot bind to an " 1599*67e74705SXin Li "initializer list temporary">; 1600*67e74705SXin Lidef err_lvalue_reference_bind_to_temporary : Error< 1601*67e74705SXin Li "%select{non-const|volatile}0 lvalue reference %diff{to type $ cannot bind " 1602*67e74705SXin Li "to a temporary of type $|cannot bind to incompatible temporary}1,2">; 1603*67e74705SXin Lidef err_lvalue_reference_bind_to_unrelated : Error< 1604*67e74705SXin Li "%select{non-const|volatile}0 lvalue reference " 1605*67e74705SXin Li "%diff{to type $ cannot bind to a value of unrelated type $|" 1606*67e74705SXin Li "cannot bind to a value of unrelated type}1,2">; 1607*67e74705SXin Lidef err_reference_bind_drops_quals : Error< 1608*67e74705SXin Li "binding value %diff{of type $ to reference to type $|to reference}0,1 " 1609*67e74705SXin Li "drops %select{<<ERROR>>|'const'|'restrict'|'const' and 'restrict'|" 1610*67e74705SXin Li "'volatile'|'const' and 'volatile'|'restrict' and 'volatile'|" 1611*67e74705SXin Li "'const', 'restrict', and 'volatile'}2 qualifier%plural{1:|2:|4:|:s}2">; 1612*67e74705SXin Lidef err_reference_bind_failed : Error< 1613*67e74705SXin Li "reference %diff{to type $ could not bind to an %select{rvalue|lvalue}1 of " 1614*67e74705SXin Li "type $|could not bind to %select{rvalue|lvalue}1 of incompatible type}0,2">; 1615*67e74705SXin Lidef err_reference_bind_init_list : Error< 1616*67e74705SXin Li "reference to type %0 cannot bind to an initializer list">; 1617*67e74705SXin Lidef warn_temporary_array_to_pointer_decay : Warning< 1618*67e74705SXin Li "pointer is initialized by a temporary array, which will be destroyed at the " 1619*67e74705SXin Li "end of the full-expression">, 1620*67e74705SXin Li InGroup<DiagGroup<"address-of-array-temporary">>; 1621*67e74705SXin Lidef err_init_list_bad_dest_type : Error< 1622*67e74705SXin Li "%select{|non-aggregate }0type %1 cannot be initialized with an initializer " 1623*67e74705SXin Li "list">; 1624*67e74705SXin Lidef err_member_function_call_bad_cvr : Error<"member function %0 not viable: " 1625*67e74705SXin Li "'this' argument has type %1, but function is not marked " 1626*67e74705SXin Li "%select{const|restrict|const or restrict|volatile|const or volatile|" 1627*67e74705SXin Li "volatile or restrict|const, volatile, or restrict}2">; 1628*67e74705SXin Li 1629*67e74705SXin Lidef err_reference_bind_to_bitfield : Error< 1630*67e74705SXin Li "%select{non-const|volatile}0 reference cannot bind to " 1631*67e74705SXin Li "bit-field%select{| %1}2">; 1632*67e74705SXin Lidef err_reference_bind_to_vector_element : Error< 1633*67e74705SXin Li "%select{non-const|volatile}0 reference cannot bind to vector element">; 1634*67e74705SXin Lidef err_reference_var_requires_init : Error< 1635*67e74705SXin Li "declaration of reference variable %0 requires an initializer">; 1636*67e74705SXin Lidef err_reference_without_init : Error< 1637*67e74705SXin Li "reference to type %0 requires an initializer">; 1638*67e74705SXin Lidef note_value_initialization_here : Note< 1639*67e74705SXin Li "in value-initialization of type %0 here">; 1640*67e74705SXin Lidef err_reference_has_multiple_inits : Error< 1641*67e74705SXin Li "reference cannot be initialized with multiple values">; 1642*67e74705SXin Lidef err_init_non_aggr_init_list : Error< 1643*67e74705SXin Li "initialization of non-aggregate type %0 with an initializer list">; 1644*67e74705SXin Lidef err_init_reference_member_uninitialized : Error< 1645*67e74705SXin Li "reference member of type %0 uninitialized">; 1646*67e74705SXin Lidef note_uninit_reference_member : Note< 1647*67e74705SXin Li "uninitialized reference member is here">; 1648*67e74705SXin Lidef warn_field_is_uninit : Warning<"field %0 is uninitialized when used here">, 1649*67e74705SXin Li InGroup<Uninitialized>; 1650*67e74705SXin Lidef warn_base_class_is_uninit : Warning< 1651*67e74705SXin Li "base class %0 is uninitialized when used here to access %q1">, 1652*67e74705SXin Li InGroup<Uninitialized>; 1653*67e74705SXin Lidef warn_reference_field_is_uninit : Warning< 1654*67e74705SXin Li "reference %0 is not yet bound to a value when used here">, 1655*67e74705SXin Li InGroup<Uninitialized>; 1656*67e74705SXin Lidef note_uninit_in_this_constructor : Note< 1657*67e74705SXin Li "during field initialization in %select{this|the implicit default}0 " 1658*67e74705SXin Li "constructor">; 1659*67e74705SXin Lidef warn_static_self_reference_in_init : Warning< 1660*67e74705SXin Li "static variable %0 is suspiciously used within its own initialization">, 1661*67e74705SXin Li InGroup<UninitializedStaticSelfInit>; 1662*67e74705SXin Lidef warn_uninit_self_reference_in_init : Warning< 1663*67e74705SXin Li "variable %0 is uninitialized when used within its own initialization">, 1664*67e74705SXin Li InGroup<Uninitialized>; 1665*67e74705SXin Lidef warn_uninit_self_reference_in_reference_init : Warning< 1666*67e74705SXin Li "reference %0 is not yet bound to a value when used within its own" 1667*67e74705SXin Li " initialization">, 1668*67e74705SXin Li InGroup<Uninitialized>; 1669*67e74705SXin Lidef warn_uninit_var : Warning< 1670*67e74705SXin Li "variable %0 is uninitialized when %select{used here|captured by block}1">, 1671*67e74705SXin Li InGroup<Uninitialized>, DefaultIgnore; 1672*67e74705SXin Lidef warn_sometimes_uninit_var : Warning< 1673*67e74705SXin Li "variable %0 is %select{used|captured}1 uninitialized whenever " 1674*67e74705SXin Li "%select{'%3' condition is %select{true|false}4|" 1675*67e74705SXin Li "'%3' loop %select{is entered|exits because its condition is false}4|" 1676*67e74705SXin Li "'%3' loop %select{condition is true|exits because its condition is false}4|" 1677*67e74705SXin Li "switch %3 is taken|" 1678*67e74705SXin Li "its declaration is reached|" 1679*67e74705SXin Li "%3 is called}2">, 1680*67e74705SXin Li InGroup<UninitializedSometimes>, DefaultIgnore; 1681*67e74705SXin Lidef warn_maybe_uninit_var : Warning< 1682*67e74705SXin Li "variable %0 may be uninitialized when " 1683*67e74705SXin Li "%select{used here|captured by block}1">, 1684*67e74705SXin Li InGroup<UninitializedMaybe>, DefaultIgnore; 1685*67e74705SXin Lidef note_var_declared_here : Note<"variable %0 is declared here">; 1686*67e74705SXin Lidef note_uninit_var_use : Note< 1687*67e74705SXin Li "%select{uninitialized use occurs|variable is captured by block}0 here">; 1688*67e74705SXin Lidef warn_uninit_byref_blockvar_captured_by_block : Warning< 1689*67e74705SXin Li "block pointer variable %0 is uninitialized when captured by block">, 1690*67e74705SXin Li InGroup<Uninitialized>, DefaultIgnore; 1691*67e74705SXin Lidef note_block_var_fixit_add_initialization : Note< 1692*67e74705SXin Li "did you mean to use __block %0?">; 1693*67e74705SXin Lidef note_in_omitted_aggregate_initializer : Note< 1694*67e74705SXin Li "in implicit initialization of %select{array element %1|field %1}0 " 1695*67e74705SXin Li "with omitted initializer">; 1696*67e74705SXin Lidef note_in_reference_temporary_list_initializer : Note< 1697*67e74705SXin Li "in initialization of temporary of type %0 created to " 1698*67e74705SXin Li "list-initialize this reference">; 1699*67e74705SXin Lidef note_var_fixit_add_initialization : Note< 1700*67e74705SXin Li "initialize the variable %0 to silence this warning">; 1701*67e74705SXin Lidef note_uninit_fixit_remove_cond : Note< 1702*67e74705SXin Li "remove the %select{'%1' if its condition|condition if it}0 " 1703*67e74705SXin Li "is always %select{false|true}2">; 1704*67e74705SXin Lidef err_init_incomplete_type : Error<"initialization of incomplete type %0">; 1705*67e74705SXin Li 1706*67e74705SXin Lidef warn_unsequenced_mod_mod : Warning< 1707*67e74705SXin Li "multiple unsequenced modifications to %0">, InGroup<Unsequenced>; 1708*67e74705SXin Lidef warn_unsequenced_mod_use : Warning< 1709*67e74705SXin Li "unsequenced modification and access to %0">, InGroup<Unsequenced>; 1710*67e74705SXin Li 1711*67e74705SXin Lidef err_temp_copy_no_viable : Error< 1712*67e74705SXin Li "no viable constructor %select{copying variable|copying parameter|" 1713*67e74705SXin Li "returning object|throwing object|copying member subobject|copying array " 1714*67e74705SXin Li "element|allocating object|copying temporary|initializing base subobject|" 1715*67e74705SXin Li "initializing vector element|capturing value}0 of type %1">; 1716*67e74705SXin Lidef ext_rvalue_to_reference_temp_copy_no_viable : Extension< 1717*67e74705SXin Li "no viable constructor %select{copying variable|copying parameter|" 1718*67e74705SXin Li "returning object|throwing object|copying member subobject|copying array " 1719*67e74705SXin Li "element|allocating object|copying temporary|initializing base subobject|" 1720*67e74705SXin Li "initializing vector element|capturing value}0 of type %1; C++98 requires a copy " 1721*67e74705SXin Li "constructor when binding a reference to a temporary">, 1722*67e74705SXin Li InGroup<BindToTemporaryCopy>; 1723*67e74705SXin Lidef err_temp_copy_ambiguous : Error< 1724*67e74705SXin Li "ambiguous constructor call when %select{copying variable|copying " 1725*67e74705SXin Li "parameter|returning object|throwing object|copying member subobject|copying " 1726*67e74705SXin Li "array element|allocating object|copying temporary|initializing base subobject|" 1727*67e74705SXin Li "initializing vector element|capturing value}0 of type %1">; 1728*67e74705SXin Lidef err_temp_copy_deleted : Error< 1729*67e74705SXin Li "%select{copying variable|copying parameter|returning object|throwing " 1730*67e74705SXin Li "object|copying member subobject|copying array element|allocating object|" 1731*67e74705SXin Li "copying temporary|initializing base subobject|initializing vector element|" 1732*67e74705SXin Li "capturing value}0 of type %1 invokes deleted constructor">; 1733*67e74705SXin Lidef err_temp_copy_incomplete : Error< 1734*67e74705SXin Li "copying a temporary object of incomplete type %0">; 1735*67e74705SXin Lidef warn_cxx98_compat_temp_copy : Warning< 1736*67e74705SXin Li "%select{copying variable|copying parameter|returning object|throwing " 1737*67e74705SXin Li "object|copying member subobject|copying array element|allocating object|" 1738*67e74705SXin Li "copying temporary|initializing base subobject|initializing vector element}1 " 1739*67e74705SXin Li "of type %2 when binding a reference to a temporary would %select{invoke " 1740*67e74705SXin Li "an inaccessible constructor|find no viable constructor|find ambiguous " 1741*67e74705SXin Li "constructors|invoke a deleted constructor}0 in C++98">, 1742*67e74705SXin Li InGroup<CXX98CompatBindToTemporaryCopy>, DefaultIgnore; 1743*67e74705SXin Lidef err_selected_explicit_constructor : Error< 1744*67e74705SXin Li "chosen constructor is explicit in copy-initialization">; 1745*67e74705SXin Lidef note_constructor_declared_here : Note< 1746*67e74705SXin Li "constructor declared here">; 1747*67e74705SXin Li 1748*67e74705SXin Li// C++11 decltype 1749*67e74705SXin Lidef err_decltype_in_declarator : Error< 1750*67e74705SXin Li "'decltype' cannot be used to name a declaration">; 1751*67e74705SXin Li 1752*67e74705SXin Li// C++11 auto 1753*67e74705SXin Lidef warn_cxx98_compat_auto_type_specifier : Warning< 1754*67e74705SXin Li "'auto' type specifier is incompatible with C++98">, 1755*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1756*67e74705SXin Lidef err_auto_variable_cannot_appear_in_own_initializer : Error< 1757*67e74705SXin Li "variable %0 declared with %select{'auto'|'decltype(auto)'|'__auto_type'}1 " 1758*67e74705SXin Li "type cannot appear in its own initializer">; 1759*67e74705SXin Lidef err_illegal_decl_array_of_auto : Error< 1760*67e74705SXin Li "'%0' declared as array of %1">; 1761*67e74705SXin Lidef err_new_array_of_auto : Error< 1762*67e74705SXin Li "cannot allocate array of 'auto'">; 1763*67e74705SXin Lidef err_auto_not_allowed : Error< 1764*67e74705SXin Li "%select{'auto'|'decltype(auto)'|'__auto_type'}0 not allowed " 1765*67e74705SXin Li "%select{in function prototype" 1766*67e74705SXin Li "|in non-static struct member|in struct member" 1767*67e74705SXin Li "|in non-static union member|in union member" 1768*67e74705SXin Li "|in non-static class member|in interface member" 1769*67e74705SXin Li "|in exception declaration|in template parameter|in block literal" 1770*67e74705SXin Li "|in template argument|in typedef|in type alias|in function return type" 1771*67e74705SXin Li "|in conversion function type|here|in lambda parameter" 1772*67e74705SXin Li "|in type allocated by 'new'|in K&R-style function parameter}1">; 1773*67e74705SXin Lidef err_auto_not_allowed_var_inst : Error< 1774*67e74705SXin Li "'auto' variable template instantiation is not allowed">; 1775*67e74705SXin Lidef err_auto_var_requires_init : Error< 1776*67e74705SXin Li "declaration of variable %0 with type %1 requires an initializer">; 1777*67e74705SXin Lidef err_auto_new_requires_ctor_arg : Error< 1778*67e74705SXin Li "new expression for type %0 requires a constructor argument">; 1779*67e74705SXin Lidef err_auto_new_list_init : Error< 1780*67e74705SXin Li "new expression for type %0 cannot use list-initialization">; 1781*67e74705SXin Lidef err_auto_var_init_no_expression : Error< 1782*67e74705SXin Li "initializer for variable %0 with type %1 is empty">; 1783*67e74705SXin Lidef err_auto_var_init_multiple_expressions : Error< 1784*67e74705SXin Li "initializer for variable %0 with type %1 contains multiple expressions">; 1785*67e74705SXin Lidef err_auto_var_init_paren_braces : Error< 1786*67e74705SXin Li "cannot deduce type for variable %1 with type %2 from " 1787*67e74705SXin Li "%select{parenthesized|nested}0 initializer list">; 1788*67e74705SXin Lidef err_auto_new_ctor_multiple_expressions : Error< 1789*67e74705SXin Li "new expression for type %0 contains multiple constructor arguments">; 1790*67e74705SXin Lidef err_auto_missing_trailing_return : Error< 1791*67e74705SXin Li "'auto' return without trailing return type; deduced return types are a " 1792*67e74705SXin Li "C++14 extension">; 1793*67e74705SXin Lidef err_deduced_return_type : Error< 1794*67e74705SXin Li "deduced return types are a C++14 extension">; 1795*67e74705SXin Lidef err_trailing_return_without_auto : Error< 1796*67e74705SXin Li "function with trailing return type must specify return type 'auto', not %0">; 1797*67e74705SXin Lidef err_trailing_return_in_parens : Error< 1798*67e74705SXin Li "trailing return type may not be nested within parentheses">; 1799*67e74705SXin Lidef err_auto_var_deduction_failure : Error< 1800*67e74705SXin Li "variable %0 with type %1 has incompatible initializer of type %2">; 1801*67e74705SXin Lidef err_auto_var_deduction_failure_from_init_list : Error< 1802*67e74705SXin Li "cannot deduce actual type for variable %0 with type %1 from initializer list">; 1803*67e74705SXin Lidef err_auto_new_deduction_failure : Error< 1804*67e74705SXin Li "new expression for type %0 has incompatible constructor argument of type %1">; 1805*67e74705SXin Lidef err_auto_different_deductions : Error< 1806*67e74705SXin Li "'%select{auto|decltype(auto)|__auto_type}0' deduced as %1 in declaration " 1807*67e74705SXin Li "of %2 and deduced as %3 in declaration of %4">; 1808*67e74705SXin Lidef err_implied_std_initializer_list_not_found : Error< 1809*67e74705SXin Li "cannot deduce type of initializer list because std::initializer_list was " 1810*67e74705SXin Li "not found; include <initializer_list>">; 1811*67e74705SXin Lidef err_malformed_std_initializer_list : Error< 1812*67e74705SXin Li "std::initializer_list must be a class template with a single type parameter">; 1813*67e74705SXin Lidef warn_dangling_std_initializer_list : Warning< 1814*67e74705SXin Li "array backing the initializer list will be destroyed at the end of " 1815*67e74705SXin Li "%select{the full-expression|the constructor}0">, 1816*67e74705SXin Li InGroup<DiagGroup<"dangling-initializer-list">>; 1817*67e74705SXin Lidef err_auto_init_list_from_c : Error< 1818*67e74705SXin Li "cannot use __auto_type with initializer list in C">; 1819*67e74705SXin Lidef err_auto_bitfield : Error< 1820*67e74705SXin Li "cannot pass bit-field as __auto_type initializer in C">; 1821*67e74705SXin Li 1822*67e74705SXin Li// C++1y decltype(auto) type 1823*67e74705SXin Lidef err_decltype_auto_cannot_be_combined : Error< 1824*67e74705SXin Li "'decltype(auto)' cannot be combined with other type specifiers">; 1825*67e74705SXin Lidef err_decltype_auto_function_declarator_not_declaration : Error< 1826*67e74705SXin Li "'decltype(auto)' can only be used as a return type " 1827*67e74705SXin Li "in a function declaration">; 1828*67e74705SXin Lidef err_decltype_auto_compound_type : Error< 1829*67e74705SXin Li "cannot form %select{pointer to|reference to|array of}0 'decltype(auto)'">; 1830*67e74705SXin Lidef err_decltype_auto_initializer_list : Error< 1831*67e74705SXin Li "cannot deduce 'decltype(auto)' from initializer list">; 1832*67e74705SXin Li 1833*67e74705SXin Li// C++1y deduced return types 1834*67e74705SXin Lidef err_auto_fn_deduction_failure : Error< 1835*67e74705SXin Li "cannot deduce return type %0 from returned value of type %1">; 1836*67e74705SXin Lidef err_auto_fn_different_deductions : Error< 1837*67e74705SXin Li "'%select{auto|decltype(auto)}0' in return type deduced as %1 here but " 1838*67e74705SXin Li "deduced as %2 in earlier return statement">; 1839*67e74705SXin Lidef err_auto_fn_used_before_defined : Error< 1840*67e74705SXin Li "function %0 with deduced return type cannot be used before it is defined">; 1841*67e74705SXin Lidef err_auto_fn_no_return_but_not_auto : Error< 1842*67e74705SXin Li "cannot deduce return type %0 for function with no return statements">; 1843*67e74705SXin Lidef err_auto_fn_return_void_but_not_auto : Error< 1844*67e74705SXin Li "cannot deduce return type %0 from omitted return expression">; 1845*67e74705SXin Lidef err_auto_fn_return_init_list : Error< 1846*67e74705SXin Li "cannot deduce return type from initializer list">; 1847*67e74705SXin Lidef err_auto_fn_virtual : Error< 1848*67e74705SXin Li "function with deduced return type cannot be virtual">; 1849*67e74705SXin Li 1850*67e74705SXin Li// C++11 override control 1851*67e74705SXin Lidef override_keyword_only_allowed_on_virtual_member_functions : Error< 1852*67e74705SXin Li "only virtual member functions can be marked '%0'">; 1853*67e74705SXin Lidef override_keyword_hides_virtual_member_function : Error< 1854*67e74705SXin Li "non-virtual member function marked '%0' hides virtual member " 1855*67e74705SXin Li "%select{function|functions}1">; 1856*67e74705SXin Lidef err_function_marked_override_not_overriding : Error< 1857*67e74705SXin Li "%0 marked 'override' but does not override any member functions">; 1858*67e74705SXin Lidef warn_function_marked_not_override_overriding : Warning < 1859*67e74705SXin Li "%0 overrides a member function but is not marked 'override'">, 1860*67e74705SXin Li InGroup<CXX11WarnOverrideMethod>; 1861*67e74705SXin Lidef err_class_marked_final_used_as_base : Error< 1862*67e74705SXin Li "base %0 is marked '%select{final|sealed}1'">; 1863*67e74705SXin Lidef warn_abstract_final_class : Warning< 1864*67e74705SXin Li "abstract class is marked '%select{final|sealed}0'">, InGroup<AbstractFinalClass>; 1865*67e74705SXin Li 1866*67e74705SXin Li// C++11 attributes 1867*67e74705SXin Lidef err_repeat_attribute : Error<"%0 attribute cannot be repeated">; 1868*67e74705SXin Li 1869*67e74705SXin Li// C++11 final 1870*67e74705SXin Lidef err_final_function_overridden : Error< 1871*67e74705SXin Li "declaration of %0 overrides a '%select{final|sealed}1' function">; 1872*67e74705SXin Li 1873*67e74705SXin Li// C++11 scoped enumerations 1874*67e74705SXin Lidef err_enum_invalid_underlying : Error< 1875*67e74705SXin Li "non-integral type %0 is an invalid underlying type">; 1876*67e74705SXin Lidef err_enumerator_too_large : Error< 1877*67e74705SXin Li "enumerator value is not representable in the underlying type %0">; 1878*67e74705SXin Lidef ext_enumerator_too_large : ExtWarn< 1879*67e74705SXin Li "enumerator value is not representable in the underlying type %0">, 1880*67e74705SXin Li InGroup<MicrosoftEnumValue>; 1881*67e74705SXin Lidef err_enumerator_wrapped : Error< 1882*67e74705SXin Li "enumerator value %0 is not representable in the underlying type %1">; 1883*67e74705SXin Lidef err_enum_redeclare_type_mismatch : Error< 1884*67e74705SXin Li "enumeration redeclared with different underlying type %0 (was %1)">; 1885*67e74705SXin Lidef err_enum_redeclare_fixed_mismatch : Error< 1886*67e74705SXin Li "enumeration previously declared with %select{non|}0fixed underlying type">; 1887*67e74705SXin Lidef err_enum_redeclare_scoped_mismatch : Error< 1888*67e74705SXin Li "enumeration previously declared as %select{un|}0scoped">; 1889*67e74705SXin Lidef err_enum_class_reference : Error< 1890*67e74705SXin Li "reference to %select{|scoped }0enumeration must use 'enum' " 1891*67e74705SXin Li "not 'enum class'">; 1892*67e74705SXin Lidef err_only_enums_have_underlying_types : Error< 1893*67e74705SXin Li "only enumeration types have underlying types">; 1894*67e74705SXin Lidef err_underlying_type_of_incomplete_enum : Error< 1895*67e74705SXin Li "cannot determine underlying type of incomplete enumeration type %0">; 1896*67e74705SXin Li 1897*67e74705SXin Li// C++11 delegating constructors 1898*67e74705SXin Lidef err_delegating_ctor : Error< 1899*67e74705SXin Li "delegating constructors are permitted only in C++11">; 1900*67e74705SXin Lidef warn_cxx98_compat_delegating_ctor : Warning< 1901*67e74705SXin Li "delegating constructors are incompatible with C++98">, 1902*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1903*67e74705SXin Lidef err_delegating_initializer_alone : Error< 1904*67e74705SXin Li "an initializer for a delegating constructor must appear alone">; 1905*67e74705SXin Lidef warn_delegating_ctor_cycle : Warning< 1906*67e74705SXin Li "constructor for %0 creates a delegation cycle">, DefaultError, 1907*67e74705SXin Li InGroup<DelegatingCtorCycles>; 1908*67e74705SXin Lidef note_it_delegates_to : Note<"it delegates to">; 1909*67e74705SXin Lidef note_which_delegates_to : Note<"which delegates to">; 1910*67e74705SXin Li 1911*67e74705SXin Li// C++11 range-based for loop 1912*67e74705SXin Lidef err_for_range_decl_must_be_var : Error< 1913*67e74705SXin Li "for range declaration must declare a variable">; 1914*67e74705SXin Lidef err_for_range_storage_class : Error< 1915*67e74705SXin Li "loop variable %0 may not be declared %select{'extern'|'static'|" 1916*67e74705SXin Li "'__private_extern__'|'auto'|'register'|'constexpr'}1">; 1917*67e74705SXin Lidef err_type_defined_in_for_range : Error< 1918*67e74705SXin Li "types may not be defined in a for range declaration">; 1919*67e74705SXin Lidef err_for_range_deduction_failure : Error< 1920*67e74705SXin Li "cannot use type %0 as a range">; 1921*67e74705SXin Lidef err_for_range_incomplete_type : Error< 1922*67e74705SXin Li "cannot use incomplete type %0 as a range">; 1923*67e74705SXin Lidef err_for_range_iter_deduction_failure : Error< 1924*67e74705SXin Li "cannot use type %0 as an iterator">; 1925*67e74705SXin Lidef err_for_range_member_begin_end_mismatch : Error< 1926*67e74705SXin Li "range type %0 has '%select{begin|end}1' member but no '%select{end|begin}1' member">; 1927*67e74705SXin Lidef ext_for_range_begin_end_types_differ : ExtWarn< 1928*67e74705SXin Li "'begin' and 'end' returning different types (%0 and %1) is a C++1z extension">, 1929*67e74705SXin Li InGroup<CXX1z>; 1930*67e74705SXin Lidef warn_for_range_begin_end_types_differ : Warning< 1931*67e74705SXin Li "'begin' and 'end' returning different types (%0 and %1) is incompatible " 1932*67e74705SXin Li "with C++ standards before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore; 1933*67e74705SXin Lidef note_in_for_range: Note< 1934*67e74705SXin Li "when looking up '%select{begin|end}0' function for range expression " 1935*67e74705SXin Li "of type %1">; 1936*67e74705SXin Lidef err_for_range_invalid: Error< 1937*67e74705SXin Li "invalid range expression of type %0; no viable '%select{begin|end}1' " 1938*67e74705SXin Li "function available">; 1939*67e74705SXin Lidef err_range_on_array_parameter : Error< 1940*67e74705SXin Li "cannot build range expression with array function parameter %0 since " 1941*67e74705SXin Li "parameter with array type %1 is treated as pointer type %2">; 1942*67e74705SXin Lidef err_for_range_dereference : Error< 1943*67e74705SXin Li "invalid range expression of type %0; did you mean to dereference it " 1944*67e74705SXin Li "with '*'?">; 1945*67e74705SXin Lidef note_for_range_invalid_iterator : Note < 1946*67e74705SXin Li "in implicit call to 'operator%select{!=|*|++}0' for iterator of type %1">; 1947*67e74705SXin Lidef note_for_range_begin_end : Note< 1948*67e74705SXin Li "selected '%select{begin|end}0' %select{function|template }1%2 with iterator type %3">; 1949*67e74705SXin Lidef warn_for_range_const_reference_copy : Warning< 1950*67e74705SXin Li "loop variable %0 " 1951*67e74705SXin Li "%diff{has type $ but is initialized with type $" 1952*67e74705SXin Li "| is initialized with a value of a different type}1,2 resulting in a copy">, 1953*67e74705SXin Li InGroup<RangeLoopAnalysis>, DefaultIgnore; 1954*67e74705SXin Lidef note_use_type_or_non_reference : Note< 1955*67e74705SXin Li "use non-reference type %0 to keep the copy or type %1 to prevent copying">; 1956*67e74705SXin Lidef warn_for_range_variable_always_copy : Warning< 1957*67e74705SXin Li "loop variable %0 is always a copy because the range of type %1 does not " 1958*67e74705SXin Li "return a reference">, 1959*67e74705SXin Li InGroup<RangeLoopAnalysis>, DefaultIgnore; 1960*67e74705SXin Lidef note_use_non_reference_type : Note<"use non-reference type %0">; 1961*67e74705SXin Lidef warn_for_range_copy : Warning< 1962*67e74705SXin Li "loop variable %0 of type %1 creates a copy from type %2">, 1963*67e74705SXin Li InGroup<RangeLoopAnalysis>, DefaultIgnore; 1964*67e74705SXin Lidef note_use_reference_type : Note<"use reference type %0 to prevent copying">; 1965*67e74705SXin Li 1966*67e74705SXin Li// C++11 constexpr 1967*67e74705SXin Lidef warn_cxx98_compat_constexpr : Warning< 1968*67e74705SXin Li "'constexpr' specifier is incompatible with C++98">, 1969*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 1970*67e74705SXin Li// FIXME: Maybe this should also go in -Wc++14-compat? 1971*67e74705SXin Lidef warn_cxx14_compat_constexpr_not_const : Warning< 1972*67e74705SXin Li "'constexpr' non-static member function will not be implicitly 'const' " 1973*67e74705SXin Li "in C++14; add 'const' to avoid a change in behavior">, 1974*67e74705SXin Li InGroup<DiagGroup<"constexpr-not-const">>; 1975*67e74705SXin Lidef err_invalid_constexpr : Error< 1976*67e74705SXin Li "%select{function parameter|typedef|non-static data member}0 " 1977*67e74705SXin Li "cannot be constexpr">; 1978*67e74705SXin Lidef err_invalid_constexpr_member : Error<"non-static data member cannot be " 1979*67e74705SXin Li "constexpr%select{; did you intend to make it %select{const|static}0?|}1">; 1980*67e74705SXin Lidef err_constexpr_tag : Error< 1981*67e74705SXin Li "%select{class|struct|interface|union|enum}0 cannot be marked constexpr">; 1982*67e74705SXin Lidef err_constexpr_dtor : Error<"destructor cannot be marked constexpr">; 1983*67e74705SXin Lidef err_constexpr_no_declarators : Error< 1984*67e74705SXin Li "constexpr can only be used in variable and function declarations">; 1985*67e74705SXin Lidef err_invalid_constexpr_var_decl : Error< 1986*67e74705SXin Li "constexpr variable declaration must be a definition">; 1987*67e74705SXin Lidef err_constexpr_static_mem_var_requires_init : Error< 1988*67e74705SXin Li "declaration of constexpr static data member %0 requires an initializer">; 1989*67e74705SXin Lidef err_constexpr_var_non_literal : Error< 1990*67e74705SXin Li "constexpr variable cannot have non-literal type %0">; 1991*67e74705SXin Lidef err_constexpr_var_requires_const_init : Error< 1992*67e74705SXin Li "constexpr variable %0 must be initialized by a constant expression">; 1993*67e74705SXin Lidef err_constexpr_redecl_mismatch : Error< 1994*67e74705SXin Li "%select{non-constexpr declaration of %0 follows constexpr declaration" 1995*67e74705SXin Li "|constexpr declaration of %0 follows non-constexpr declaration}1">; 1996*67e74705SXin Lidef err_constexpr_virtual : Error<"virtual function cannot be constexpr">; 1997*67e74705SXin Lidef err_constexpr_virtual_base : Error< 1998*67e74705SXin Li "constexpr %select{member function|constructor}0 not allowed in " 1999*67e74705SXin Li "%select{struct|interface|class}1 with virtual base " 2000*67e74705SXin Li "%plural{1:class|:classes}2">; 2001*67e74705SXin Lidef note_non_literal_incomplete : Note< 2002*67e74705SXin Li "incomplete type %0 is not a literal type">; 2003*67e74705SXin Lidef note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 " 2004*67e74705SXin Li "with virtual base %plural{1:class|:classes}1 is not a literal type">; 2005*67e74705SXin Lidef note_constexpr_virtual_base_here : Note<"virtual base class declared here">; 2006*67e74705SXin Lidef err_constexpr_non_literal_return : Error< 2007*67e74705SXin Li "constexpr function's return type %0 is not a literal type">; 2008*67e74705SXin Lidef err_constexpr_non_literal_param : Error< 2009*67e74705SXin Li "constexpr %select{function|constructor}1's %ordinal0 parameter type %2 is " 2010*67e74705SXin Li "not a literal type">; 2011*67e74705SXin Lidef err_constexpr_body_invalid_stmt : Error< 2012*67e74705SXin Li "statement not allowed in constexpr %select{function|constructor}0">; 2013*67e74705SXin Lidef ext_constexpr_body_invalid_stmt : ExtWarn< 2014*67e74705SXin Li "use of this statement in a constexpr %select{function|constructor}0 " 2015*67e74705SXin Li "is a C++14 extension">, InGroup<CXX14>; 2016*67e74705SXin Lidef warn_cxx11_compat_constexpr_body_invalid_stmt : Warning< 2017*67e74705SXin Li "use of this statement in a constexpr %select{function|constructor}0 " 2018*67e74705SXin Li "is incompatible with C++ standards before C++14">, 2019*67e74705SXin Li InGroup<CXXPre14Compat>, DefaultIgnore; 2020*67e74705SXin Lidef ext_constexpr_type_definition : ExtWarn< 2021*67e74705SXin Li "type definition in a constexpr %select{function|constructor}0 " 2022*67e74705SXin Li "is a C++14 extension">, InGroup<CXX14>; 2023*67e74705SXin Lidef warn_cxx11_compat_constexpr_type_definition : Warning< 2024*67e74705SXin Li "type definition in a constexpr %select{function|constructor}0 " 2025*67e74705SXin Li "is incompatible with C++ standards before C++14">, 2026*67e74705SXin Li InGroup<CXXPre14Compat>, DefaultIgnore; 2027*67e74705SXin Lidef err_constexpr_vla : Error< 2028*67e74705SXin Li "variably-modified type %0 cannot be used in a constexpr " 2029*67e74705SXin Li "%select{function|constructor}1">; 2030*67e74705SXin Lidef ext_constexpr_local_var : ExtWarn< 2031*67e74705SXin Li "variable declaration in a constexpr %select{function|constructor}0 " 2032*67e74705SXin Li "is a C++14 extension">, InGroup<CXX14>; 2033*67e74705SXin Lidef warn_cxx11_compat_constexpr_local_var : Warning< 2034*67e74705SXin Li "variable declaration in a constexpr %select{function|constructor}0 " 2035*67e74705SXin Li "is incompatible with C++ standards before C++14">, 2036*67e74705SXin Li InGroup<CXXPre14Compat>, DefaultIgnore; 2037*67e74705SXin Lidef err_constexpr_local_var_static : Error< 2038*67e74705SXin Li "%select{static|thread_local}1 variable not permitted in a constexpr " 2039*67e74705SXin Li "%select{function|constructor}0">; 2040*67e74705SXin Lidef err_constexpr_local_var_non_literal_type : Error< 2041*67e74705SXin Li "variable of non-literal type %1 cannot be defined in a constexpr " 2042*67e74705SXin Li "%select{function|constructor}0">; 2043*67e74705SXin Lidef err_constexpr_local_var_no_init : Error< 2044*67e74705SXin Li "variables defined in a constexpr %select{function|constructor}0 must be " 2045*67e74705SXin Li "initialized">; 2046*67e74705SXin Lidef ext_constexpr_function_never_constant_expr : ExtWarn< 2047*67e74705SXin Li "constexpr %select{function|constructor}0 never produces a " 2048*67e74705SXin Li "constant expression">, InGroup<DiagGroup<"invalid-constexpr">>, DefaultError; 2049*67e74705SXin Lidef err_enable_if_never_constant_expr : Error< 2050*67e74705SXin Li "'enable_if' attribute expression never produces a constant expression">; 2051*67e74705SXin Lidef err_constexpr_body_no_return : Error< 2052*67e74705SXin Li "no return statement in constexpr function">; 2053*67e74705SXin Lidef err_constexpr_return_missing_expr : Error< 2054*67e74705SXin Li "non-void constexpr function %0 should return a value">; 2055*67e74705SXin Lidef warn_cxx11_compat_constexpr_body_no_return : Warning< 2056*67e74705SXin Li "constexpr function with no return statements is incompatible with C++ " 2057*67e74705SXin Li "standards before C++14">, InGroup<CXXPre14Compat>, DefaultIgnore; 2058*67e74705SXin Lidef ext_constexpr_body_multiple_return : ExtWarn< 2059*67e74705SXin Li "multiple return statements in constexpr function is a C++14 extension">, 2060*67e74705SXin Li InGroup<CXX14>; 2061*67e74705SXin Lidef warn_cxx11_compat_constexpr_body_multiple_return : Warning< 2062*67e74705SXin Li "multiple return statements in constexpr function " 2063*67e74705SXin Li "is incompatible with C++ standards before C++14">, 2064*67e74705SXin Li InGroup<CXXPre14Compat>, DefaultIgnore; 2065*67e74705SXin Lidef note_constexpr_body_previous_return : Note< 2066*67e74705SXin Li "previous return statement is here">; 2067*67e74705SXin Lidef err_constexpr_function_try_block : Error< 2068*67e74705SXin Li "function try block not allowed in constexpr %select{function|constructor}0">; 2069*67e74705SXin Lidef err_constexpr_union_ctor_no_init : Error< 2070*67e74705SXin Li "constexpr union constructor does not initialize any member">; 2071*67e74705SXin Lidef err_constexpr_ctor_missing_init : Error< 2072*67e74705SXin Li "constexpr constructor must initialize all members">; 2073*67e74705SXin Lidef note_constexpr_ctor_missing_init : Note< 2074*67e74705SXin Li "member not initialized by constructor">; 2075*67e74705SXin Lidef note_non_literal_no_constexpr_ctors : Note< 2076*67e74705SXin Li "%0 is not literal because it is not an aggregate and has no constexpr " 2077*67e74705SXin Li "constructors other than copy or move constructors">; 2078*67e74705SXin Lidef note_non_literal_base_class : Note< 2079*67e74705SXin Li "%0 is not literal because it has base class %1 of non-literal type">; 2080*67e74705SXin Lidef note_non_literal_field : Note< 2081*67e74705SXin Li "%0 is not literal because it has data member %1 of " 2082*67e74705SXin Li "%select{non-literal|volatile}3 type %2">; 2083*67e74705SXin Lidef note_non_literal_user_provided_dtor : Note< 2084*67e74705SXin Li "%0 is not literal because it has a user-provided destructor">; 2085*67e74705SXin Lidef note_non_literal_nontrivial_dtor : Note< 2086*67e74705SXin Li "%0 is not literal because it has a non-trivial destructor">; 2087*67e74705SXin Lidef warn_private_extern : Warning< 2088*67e74705SXin Li "use of __private_extern__ on a declaration may not produce external symbol " 2089*67e74705SXin Li "private to the linkage unit and is deprecated">, InGroup<PrivateExtern>; 2090*67e74705SXin Lidef note_private_extern : Note< 2091*67e74705SXin Li "use __attribute__((visibility(\"hidden\"))) attribute instead">; 2092*67e74705SXin Li 2093*67e74705SXin Li// C++ Concepts TS 2094*67e74705SXin Lidef err_concept_wrong_decl_kind : Error< 2095*67e74705SXin Li "'concept' can only appear on the definition of a function template or variable template">; 2096*67e74705SXin Lidef err_concept_decls_may_only_appear_in_namespace_scope : Error< 2097*67e74705SXin Li "concept declarations may only appear in namespace scope">; 2098*67e74705SXin Lidef err_function_concept_not_defined : Error< 2099*67e74705SXin Li "function concept declaration must be a definition">; 2100*67e74705SXin Lidef err_var_concept_not_initialized : Error< 2101*67e74705SXin Li "variable concept declaration must be initialized">; 2102*67e74705SXin Lidef err_function_concept_exception_spec : Error< 2103*67e74705SXin Li "function concept cannot have exception specification">; 2104*67e74705SXin Lidef err_concept_decl_invalid_specifiers : Error< 2105*67e74705SXin Li "%select{variable|function}0 concept cannot be declared " 2106*67e74705SXin Li "'%select{thread_local|inline|friend|constexpr}1'">; 2107*67e74705SXin Lidef err_function_concept_with_params : Error< 2108*67e74705SXin Li "function concept cannot have any parameters">; 2109*67e74705SXin Lidef err_function_concept_bool_ret : Error< 2110*67e74705SXin Li "declared return type of function concept must be 'bool'">; 2111*67e74705SXin Lidef err_variable_concept_bool_decl : Error< 2112*67e74705SXin Li "declared type of variable concept must be 'bool'">; 2113*67e74705SXin Lidef err_concept_specified_specialization : Error< 2114*67e74705SXin Li "'concept' cannot be applied on an " 2115*67e74705SXin Li "%select{explicit instantiation|explicit specialization|partial specialization}0">; 2116*67e74705SXin Lidef err_concept_specialized : Error< 2117*67e74705SXin Li "%select{function|variable}0 concept cannot be " 2118*67e74705SXin Li "%select{explicitly instantiated|explicitly specialized|partially specialized}1">; 2119*67e74705SXin Li 2120*67e74705SXin Li// C++11 char16_t/char32_t 2121*67e74705SXin Lidef warn_cxx98_compat_unicode_type : Warning< 2122*67e74705SXin Li "'%0' type specifier is incompatible with C++98">, 2123*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 2124*67e74705SXin Li 2125*67e74705SXin Li// __make_integer_seq 2126*67e74705SXin Lidef err_integer_sequence_negative_length : Error< 2127*67e74705SXin Li "integer sequences must have non-negative sequence length">; 2128*67e74705SXin Lidef err_integer_sequence_integral_element_type : Error< 2129*67e74705SXin Li "integer sequences must have integral element type">; 2130*67e74705SXin Li 2131*67e74705SXin Li// __type_pack_element 2132*67e74705SXin Lidef err_type_pack_element_out_of_bounds : Error< 2133*67e74705SXin Li "a parameter pack may not be accessed at an out of bounds index">; 2134*67e74705SXin Li 2135*67e74705SXin Li// Objective-C++ 2136*67e74705SXin Lidef err_objc_decls_may_only_appear_in_global_scope : Error< 2137*67e74705SXin Li "Objective-C declarations may only appear in global scope">; 2138*67e74705SXin Lidef warn_auto_var_is_id : Warning< 2139*67e74705SXin Li "'auto' deduced as 'id' in declaration of %0">, 2140*67e74705SXin Li InGroup<DiagGroup<"auto-var-id">>; 2141*67e74705SXin Li 2142*67e74705SXin Li// Attributes 2143*67e74705SXin Lidef err_nsobject_attribute : Error< 2144*67e74705SXin Li "'NSObject' attribute is for pointer types only">; 2145*67e74705SXin Lidef err_attributes_are_not_compatible : Error< 2146*67e74705SXin Li "%0 and %1 attributes are not compatible">; 2147*67e74705SXin Lidef err_attribute_wrong_number_arguments : Error< 2148*67e74705SXin Li "%0 attribute %plural{0:takes no arguments|1:takes one argument|" 2149*67e74705SXin Li ":requires exactly %1 arguments}1">; 2150*67e74705SXin Lidef err_attribute_too_many_arguments : Error< 2151*67e74705SXin Li "%0 attribute takes no more than %1 argument%s1">; 2152*67e74705SXin Lidef err_attribute_too_few_arguments : Error< 2153*67e74705SXin Li "%0 attribute takes at least %1 argument%s1">; 2154*67e74705SXin Lidef err_attribute_invalid_vector_type : Error<"invalid vector element type %0">; 2155*67e74705SXin Lidef err_attribute_bad_neon_vector_size : Error< 2156*67e74705SXin Li "Neon vector size must be 64 or 128 bits">; 2157*67e74705SXin Lidef err_attribute_requires_positive_integer : Error< 2158*67e74705SXin Li "%0 attribute requires a positive integral compile time constant expression">; 2159*67e74705SXin Lidef err_attribute_requires_opencl_version : Error< 2160*67e74705SXin Li "%0 attribute requires OpenCL version %1%select{| or above}2">; 2161*67e74705SXin Lidef warn_unsupported_target_attribute 2162*67e74705SXin Li : Warning<"Ignoring unsupported '%0' in the target attribute string">, 2163*67e74705SXin Li InGroup<IgnoredAttributes>; 2164*67e74705SXin Lidef err_attribute_unsupported 2165*67e74705SXin Li : Error<"%0 attribute is not supported for this target">; 2166*67e74705SXin Li// The err_*_attribute_argument_not_int are seperate because they're used by 2167*67e74705SXin Li// VerifyIntegerConstantExpression. 2168*67e74705SXin Lidef err_aligned_attribute_argument_not_int : Error< 2169*67e74705SXin Li "'aligned' attribute requires integer constant">; 2170*67e74705SXin Lidef err_align_value_attribute_argument_not_int : Error< 2171*67e74705SXin Li "'align_value' attribute requires integer constant">; 2172*67e74705SXin Lidef err_alignas_attribute_wrong_decl_type : Error< 2173*67e74705SXin Li "%0 attribute cannot be applied to a %select{function parameter|" 2174*67e74705SXin Li "variable with 'register' storage class|'catch' variable|bit-field}1">; 2175*67e74705SXin Lidef err_alignas_missing_on_definition : Error< 2176*67e74705SXin Li "%0 must be specified on definition if it is specified on any declaration">; 2177*67e74705SXin Lidef note_alignas_on_declaration : Note<"declared with %0 attribute here">; 2178*67e74705SXin Lidef err_alignas_mismatch : Error< 2179*67e74705SXin Li "redeclaration has different alignment requirement (%1 vs %0)">; 2180*67e74705SXin Lidef err_alignas_underaligned : Error< 2181*67e74705SXin Li "requested alignment is less than minimum alignment of %1 for type %0">; 2182*67e74705SXin Lidef err_attribute_argument_n_type : Error< 2183*67e74705SXin Li "%0 attribute requires parameter %1 to be %select{int or bool|an integer " 2184*67e74705SXin Li "constant|a string|an identifier}2">; 2185*67e74705SXin Lidef err_attribute_argument_type : Error< 2186*67e74705SXin Li "%0 attribute requires %select{int or bool|an integer " 2187*67e74705SXin Li "constant|a string|an identifier}1">; 2188*67e74705SXin Lidef err_attribute_argument_outof_range : Error< 2189*67e74705SXin Li "%0 attribute requires integer constant between %1 and %2 inclusive">; 2190*67e74705SXin Lidef err_init_priority_object_attr : Error< 2191*67e74705SXin Li "can only use 'init_priority' attribute on file-scope definitions " 2192*67e74705SXin Li "of objects of class type">; 2193*67e74705SXin Lidef err_attribute_argument_vec_type_hint : Error< 2194*67e74705SXin Li "invalid attribute argument %0 - expecting a vector or vectorizable scalar type">; 2195*67e74705SXin Lidef err_attribute_argument_out_of_bounds : Error< 2196*67e74705SXin Li "%0 attribute parameter %1 is out of bounds">; 2197*67e74705SXin Lidef err_attribute_only_once_per_parameter : Error< 2198*67e74705SXin Li "%0 attribute can only be applied once per parameter">; 2199*67e74705SXin Lidef err_attribute_uuid_malformed_guid : Error< 2200*67e74705SXin Li "uuid attribute contains a malformed GUID">; 2201*67e74705SXin Lidef warn_attribute_pointers_only : Warning< 2202*67e74705SXin Li "%0 attribute only applies to%select{| constant}1 pointer arguments">, 2203*67e74705SXin Li InGroup<IgnoredAttributes>; 2204*67e74705SXin Lidef err_attribute_pointers_only : Error<warn_attribute_pointers_only.Text>; 2205*67e74705SXin Lidef warn_attribute_return_pointers_only : Warning< 2206*67e74705SXin Li "%0 attribute only applies to return values that are pointers">, 2207*67e74705SXin Li InGroup<IgnoredAttributes>; 2208*67e74705SXin Lidef warn_attribute_return_pointers_refs_only : Warning< 2209*67e74705SXin Li "%0 attribute only applies to return values that are pointers or references">, 2210*67e74705SXin Li InGroup<IgnoredAttributes>; 2211*67e74705SXin Lidef warn_attribute_pointer_or_reference_only : Warning< 2212*67e74705SXin Li "%0 attribute only applies to a pointer or reference (%1 is invalid)">, 2213*67e74705SXin Li InGroup<IgnoredAttributes>; 2214*67e74705SXin Lidef err_attribute_no_member_pointers : Error< 2215*67e74705SXin Li "%0 attribute cannot be used with pointers to members">; 2216*67e74705SXin Lidef err_attribute_invalid_implicit_this_argument : Error< 2217*67e74705SXin Li "%0 attribute is invalid for the implicit this argument">; 2218*67e74705SXin Lidef err_ownership_type : Error< 2219*67e74705SXin Li "%0 attribute only applies to %select{pointer|integer}1 arguments">; 2220*67e74705SXin Lidef err_ownership_returns_index_mismatch : Error< 2221*67e74705SXin Li "'ownership_returns' attribute index does not match; here it is %0">; 2222*67e74705SXin Lidef note_ownership_returns_index_mismatch : Note< 2223*67e74705SXin Li "declared with index %0 here">; 2224*67e74705SXin Lidef err_format_strftime_third_parameter : Error< 2225*67e74705SXin Li "strftime format attribute requires 3rd parameter to be 0">; 2226*67e74705SXin Lidef err_format_attribute_requires_variadic : Error< 2227*67e74705SXin Li "format attribute requires variadic function">; 2228*67e74705SXin Lidef err_format_attribute_not : Error<"format argument not %0">; 2229*67e74705SXin Lidef err_format_attribute_result_not : Error<"function does not return %0">; 2230*67e74705SXin Lidef err_format_attribute_implicit_this_format_string : Error< 2231*67e74705SXin Li "format attribute cannot specify the implicit this argument as the format " 2232*67e74705SXin Li "string">; 2233*67e74705SXin Lidef err_init_method_bad_return_type : Error< 2234*67e74705SXin Li "init methods must return an object pointer type, not %0">; 2235*67e74705SXin Lidef err_attribute_invalid_size : Error< 2236*67e74705SXin Li "vector size not an integral multiple of component size">; 2237*67e74705SXin Lidef err_attribute_zero_size : Error<"zero vector size">; 2238*67e74705SXin Lidef err_attribute_size_too_large : Error<"vector size too large">; 2239*67e74705SXin Lidef err_typecheck_vector_not_convertable : Error< 2240*67e74705SXin Li "cannot convert between vector values of different size (%0 and %1)">; 2241*67e74705SXin Lidef err_typecheck_vector_not_convertable_non_scalar : Error< 2242*67e74705SXin Li "cannot convert between vector and non-scalar values (%0 and %1)">; 2243*67e74705SXin Lidef err_typecheck_vector_lengths_not_equal : Error< 2244*67e74705SXin Li "vector operands do not have the same number of elements (%0 and %1)">; 2245*67e74705SXin Lidef err_ext_vector_component_exceeds_length : Error< 2246*67e74705SXin Li "vector component access exceeds type %0">; 2247*67e74705SXin Lidef err_ext_vector_component_name_illegal : Error< 2248*67e74705SXin Li "illegal vector component name '%0'">; 2249*67e74705SXin Lidef err_attribute_address_space_negative : Error< 2250*67e74705SXin Li "address space is negative">; 2251*67e74705SXin Lidef err_attribute_address_space_too_high : Error< 2252*67e74705SXin Li "address space is larger than the maximum supported (%0)">; 2253*67e74705SXin Lidef err_attribute_address_multiple_qualifiers : Error< 2254*67e74705SXin Li "multiple address spaces specified for type">; 2255*67e74705SXin Lidef err_attribute_address_function_type : Error< 2256*67e74705SXin Li "function type may not be qualified with an address space">; 2257*67e74705SXin Lidef err_as_qualified_auto_decl : Error< 2258*67e74705SXin Li "automatic variable qualified with an address space">; 2259*67e74705SXin Lidef err_arg_with_address_space : Error< 2260*67e74705SXin Li "parameter may not be qualified with an address space">; 2261*67e74705SXin Lidef err_field_with_address_space : Error< 2262*67e74705SXin Li "field may not be qualified with an address space">; 2263*67e74705SXin Lidef err_attr_objc_ownership_redundant : Error< 2264*67e74705SXin Li "the type %0 is already explicitly ownership-qualified">; 2265*67e74705SXin Lidef err_invalid_nsnumber_type : Error< 2266*67e74705SXin Li "%0 is not a valid literal type for NSNumber">; 2267*67e74705SXin Lidef err_objc_illegal_boxed_expression_type : Error< 2268*67e74705SXin Li "illegal type %0 used in a boxed expression">; 2269*67e74705SXin Lidef err_objc_non_trivially_copyable_boxed_expression_type : Error< 2270*67e74705SXin Li "non-trivially copyable type %0 cannot be used in a boxed expression">; 2271*67e74705SXin Lidef err_objc_incomplete_boxed_expression_type : Error< 2272*67e74705SXin Li "incomplete type %0 used in a boxed expression">; 2273*67e74705SXin Lidef err_undeclared_objc_literal_class : Error< 2274*67e74705SXin Li "definition of class %0 must be available to use Objective-C " 2275*67e74705SXin Li "%select{array literals|dictionary literals|numeric literals|boxed expressions|" 2276*67e74705SXin Li "string literals}1">; 2277*67e74705SXin Lidef err_undeclared_boxing_method : Error< 2278*67e74705SXin Li "declaration of %0 is missing in %1 class">; 2279*67e74705SXin Lidef err_objc_literal_method_sig : Error< 2280*67e74705SXin Li "literal construction method %0 has incompatible signature">; 2281*67e74705SXin Lidef note_objc_literal_method_param : Note< 2282*67e74705SXin Li "%select{first|second|third}0 parameter has unexpected type %1 " 2283*67e74705SXin Li "(should be %2)">; 2284*67e74705SXin Lidef note_objc_literal_method_return : Note< 2285*67e74705SXin Li "method returns unexpected type %0 (should be an object type)">; 2286*67e74705SXin Lidef err_invalid_collection_element : Error< 2287*67e74705SXin Li "collection element of type %0 is not an Objective-C object">; 2288*67e74705SXin Lidef err_box_literal_collection : Error< 2289*67e74705SXin Li "%select{string|character|boolean|numeric}0 literal must be prefixed by '@' " 2290*67e74705SXin Li "in a collection">; 2291*67e74705SXin Lidef warn_objc_literal_comparison : Warning< 2292*67e74705SXin Li "direct comparison of %select{an array literal|a dictionary literal|" 2293*67e74705SXin Li "a numeric literal|a boxed expression|}0 has undefined behavior">, 2294*67e74705SXin Li InGroup<ObjCLiteralComparison>; 2295*67e74705SXin Lidef err_missing_atsign_prefix : Error< 2296*67e74705SXin Li "string literal must be prefixed by '@' ">; 2297*67e74705SXin Lidef warn_objc_string_literal_comparison : Warning< 2298*67e74705SXin Li "direct comparison of a string literal has undefined behavior">, 2299*67e74705SXin Li InGroup<ObjCStringComparison>; 2300*67e74705SXin Lidef warn_concatenated_nsarray_literal : Warning< 2301*67e74705SXin Li "concatenated NSString literal for an NSArray expression - " 2302*67e74705SXin Li "possibly missing a comma">, 2303*67e74705SXin Li InGroup<ObjCStringConcatenation>; 2304*67e74705SXin Lidef note_objc_literal_comparison_isequal : Note< 2305*67e74705SXin Li "use 'isEqual:' instead">; 2306*67e74705SXin Lidef warn_objc_collection_literal_element : Warning< 2307*67e74705SXin Li "object of type %0 is not compatible with " 2308*67e74705SXin Li "%select{array element type|dictionary key type|dictionary value type}1 %2">, 2309*67e74705SXin Li InGroup<ObjCLiteralConversion>; 2310*67e74705SXin Lidef err_swift_param_attr_not_swiftcall : Error< 2311*67e74705SXin Li "'%0' parameter can only be used with swiftcall calling convention">; 2312*67e74705SXin Lidef err_swift_indirect_result_not_first : Error< 2313*67e74705SXin Li "'swift_indirect_result' parameters must be first parameters of function">; 2314*67e74705SXin Lidef err_swift_context_not_before_swift_error_result : Error< 2315*67e74705SXin Li "'swift_context' parameter can only be followed by 'swift_error_result' " 2316*67e74705SXin Li "parameter">; 2317*67e74705SXin Lidef err_swift_error_result_not_last : Error< 2318*67e74705SXin Li "'swift_error_result' parameter must be last parameter of function">; 2319*67e74705SXin Lidef err_swift_error_result_not_after_swift_context : Error< 2320*67e74705SXin Li "'swift_error_result' parameter must follow 'swift_context' parameter">; 2321*67e74705SXin Lidef err_swift_abi_parameter_wrong_type : Error< 2322*67e74705SXin Li "'%0' parameter must have pointer%select{| to unqualified pointer}1 type; " 2323*67e74705SXin Li "type here is %2">; 2324*67e74705SXin Li 2325*67e74705SXin Lidef err_attribute_argument_is_zero : Error< 2326*67e74705SXin Li "%0 attribute must be greater than 0">; 2327*67e74705SXin Lidef warn_attribute_argument_n_negative : Warning< 2328*67e74705SXin Li "%0 attribute parameter %1 is negative and will be ignored">, 2329*67e74705SXin Li InGroup<CudaCompat>; 2330*67e74705SXin Lidef err_property_function_in_objc_container : Error< 2331*67e74705SXin Li "use of Objective-C property in function nested in Objective-C " 2332*67e74705SXin Li "container not supported, move function outside its container">; 2333*67e74705SXin Li 2334*67e74705SXin Lilet CategoryName = "Cocoa API Issue" in { 2335*67e74705SXin Lidef warn_objc_redundant_literal_use : Warning< 2336*67e74705SXin Li "using %0 with a literal is redundant">, InGroup<ObjCRedundantLiteralUse>; 2337*67e74705SXin Li} 2338*67e74705SXin Li 2339*67e74705SXin Lidef err_attr_tlsmodel_arg : Error<"tls_model must be \"global-dynamic\", " 2340*67e74705SXin Li "\"local-dynamic\", \"initial-exec\" or \"local-exec\"">; 2341*67e74705SXin Li 2342*67e74705SXin Lidef err_tls_var_aligned_over_maximum : Error< 2343*67e74705SXin Li "alignment (%0) of thread-local variable %1 is greater than the maximum supported " 2344*67e74705SXin Li "alignment (%2) for a thread-local variable on this target">; 2345*67e74705SXin Li 2346*67e74705SXin Lidef err_only_annotate_after_access_spec : Error< 2347*67e74705SXin Li "access specifier can only have annotation attributes">; 2348*67e74705SXin Li 2349*67e74705SXin Lidef err_attribute_section_invalid_for_target : Error< 2350*67e74705SXin Li "argument to 'section' attribute is not valid for this target: %0">; 2351*67e74705SXin Lidef warn_mismatched_section : Warning< 2352*67e74705SXin Li "section does not match previous declaration">, InGroup<Section>; 2353*67e74705SXin Li 2354*67e74705SXin Lidef err_anonymous_property: Error< 2355*67e74705SXin Li "anonymous property is not supported">; 2356*67e74705SXin Lidef err_property_is_variably_modified : Error< 2357*67e74705SXin Li "property %0 has a variably modified type">; 2358*67e74705SXin Lidef err_no_accessor_for_property : Error< 2359*67e74705SXin Li "no %select{getter|setter}0 defined for property %1">; 2360*67e74705SXin Lidef error_cannot_find_suitable_accessor : Error< 2361*67e74705SXin Li "cannot find suitable %select{getter|setter}0 for property %1">; 2362*67e74705SXin Li 2363*67e74705SXin Lidef err_alignment_not_power_of_two : Error< 2364*67e74705SXin Li "requested alignment is not a power of 2">; 2365*67e74705SXin Lidef err_alignment_dependent_typedef_name : Error< 2366*67e74705SXin Li "requested alignment is dependent but declaration is not dependent">; 2367*67e74705SXin Li 2368*67e74705SXin Lidef err_attribute_aligned_too_great : Error< 2369*67e74705SXin Li "requested alignment must be %0 bytes or smaller">; 2370*67e74705SXin Lidef warn_redeclaration_without_attribute_prev_attribute_ignored : Warning< 2371*67e74705SXin Li "%q0 redeclared without %1 attribute: previous %1 ignored">, 2372*67e74705SXin Li InGroup<MicrosoftInconsistentDllImport>; 2373*67e74705SXin Lidef warn_redeclaration_without_import_attribute : Warning< 2374*67e74705SXin Li "%q0 redeclared without 'dllimport' attribute: 'dllexport' attribute added">, 2375*67e74705SXin Li InGroup<MicrosoftInconsistentDllImport>; 2376*67e74705SXin Lidef warn_dllimport_dropped_from_inline_function : Warning< 2377*67e74705SXin Li "%q0 redeclared inline; %1 attribute ignored">, 2378*67e74705SXin Li InGroup<IgnoredAttributes>; 2379*67e74705SXin Lidef warn_attribute_ignored : Warning<"%0 attribute ignored">, 2380*67e74705SXin Li InGroup<IgnoredAttributes>; 2381*67e74705SXin Lidef warn_attribute_ignored_on_inline : 2382*67e74705SXin Li Warning<"%0 attribute ignored on inline function">, 2383*67e74705SXin Li InGroup<IgnoredAttributes>; 2384*67e74705SXin Lidef warn_attribute_after_definition_ignored : Warning< 2385*67e74705SXin Li "attribute %0 after definition is ignored">, 2386*67e74705SXin Li InGroup<IgnoredAttributes>; 2387*67e74705SXin Lidef warn_unknown_attribute_ignored : Warning< 2388*67e74705SXin Li "unknown attribute %0 ignored">, InGroup<UnknownAttributes>; 2389*67e74705SXin Lidef warn_cxx11_gnu_attribute_on_type : Warning< 2390*67e74705SXin Li "attribute %0 ignored, because it cannot be applied to a type">, 2391*67e74705SXin Li InGroup<IgnoredAttributes>; 2392*67e74705SXin Lidef warn_unhandled_ms_attribute_ignored : Warning< 2393*67e74705SXin Li "__declspec attribute %0 is not supported">, 2394*67e74705SXin Li InGroup<IgnoredAttributes>; 2395*67e74705SXin Lidef err_decl_attribute_invalid_on_stmt : Error< 2396*67e74705SXin Li "%0 attribute cannot be applied to a statement">; 2397*67e74705SXin Lidef err_stmt_attribute_invalid_on_decl : Error< 2398*67e74705SXin Li "%0 attribute cannot be applied to a declaration">; 2399*67e74705SXin Lidef warn_declspec_attribute_ignored : Warning< 2400*67e74705SXin Li "attribute %0 is ignored, place it after " 2401*67e74705SXin Li "\"%select{class|struct|interface|union|enum}1\" to apply attribute to " 2402*67e74705SXin Li "type declaration">, InGroup<IgnoredAttributes>; 2403*67e74705SXin Lidef warn_attribute_precede_definition : Warning< 2404*67e74705SXin Li "attribute declaration must precede definition">, 2405*67e74705SXin Li InGroup<IgnoredAttributes>; 2406*67e74705SXin Lidef warn_attribute_void_function_method : Warning< 2407*67e74705SXin Li "attribute %0 cannot be applied to " 2408*67e74705SXin Li "%select{functions|Objective-C method}1 without return value">, 2409*67e74705SXin Li InGroup<IgnoredAttributes>; 2410*67e74705SXin Lidef warn_attribute_weak_on_field : Warning< 2411*67e74705SXin Li "__weak attribute cannot be specified on a field declaration">, 2412*67e74705SXin Li InGroup<IgnoredAttributes>; 2413*67e74705SXin Lidef warn_gc_attribute_weak_on_local : Warning< 2414*67e74705SXin Li "Objective-C GC does not allow weak variables on the stack">, 2415*67e74705SXin Li InGroup<IgnoredAttributes>; 2416*67e74705SXin Lidef warn_nsobject_attribute : Warning< 2417*67e74705SXin Li "'NSObject' attribute may be put on a typedef only; attribute is ignored">, 2418*67e74705SXin Li InGroup<NSobjectAttribute>; 2419*67e74705SXin Lidef warn_independentclass_attribute : Warning< 2420*67e74705SXin Li "'objc_independent_class' attribute may be put on a typedef only; " 2421*67e74705SXin Li "attribute is ignored">, 2422*67e74705SXin Li InGroup<IndependentClassAttribute>; 2423*67e74705SXin Lidef warn_ptr_independentclass_attribute : Warning< 2424*67e74705SXin Li "'objc_independent_class' attribute may be put on Objective-C object " 2425*67e74705SXin Li "pointer type only; attribute is ignored">, 2426*67e74705SXin Li InGroup<IndependentClassAttribute>; 2427*67e74705SXin Lidef warn_attribute_weak_on_local : Warning< 2428*67e74705SXin Li "__weak attribute cannot be specified on an automatic variable when ARC " 2429*67e74705SXin Li "is not enabled">, 2430*67e74705SXin Li InGroup<IgnoredAttributes>; 2431*67e74705SXin Lidef warn_weak_identifier_undeclared : Warning< 2432*67e74705SXin Li "weak identifier %0 never declared">; 2433*67e74705SXin Lidef err_attribute_weak_static : Error< 2434*67e74705SXin Li "weak declaration cannot have internal linkage">; 2435*67e74705SXin Lidef err_attribute_selectany_non_extern_data : Error< 2436*67e74705SXin Li "'selectany' can only be applied to data items with external linkage">; 2437*67e74705SXin Lidef err_declspec_thread_on_thread_variable : Error< 2438*67e74705SXin Li "'__declspec(thread)' applied to variable that already has a " 2439*67e74705SXin Li "thread-local storage specifier">; 2440*67e74705SXin Lidef err_attribute_dll_not_extern : Error< 2441*67e74705SXin Li "%q0 must have external linkage when declared %q1">; 2442*67e74705SXin Lidef err_attribute_dll_thread_local : Error< 2443*67e74705SXin Li "%q0 cannot be thread local when declared %q1">; 2444*67e74705SXin Lidef err_attribute_dll_lambda : Error< 2445*67e74705SXin Li "lambda cannot be declared %0">; 2446*67e74705SXin Lidef warn_attribute_invalid_on_definition : Warning< 2447*67e74705SXin Li "'%0' attribute cannot be specified on a definition">, 2448*67e74705SXin Li InGroup<IgnoredAttributes>; 2449*67e74705SXin Lidef err_attribute_dll_redeclaration : Error< 2450*67e74705SXin Li "redeclaration of %q0 cannot add %q1 attribute">; 2451*67e74705SXin Lidef warn_attribute_dll_redeclaration : Warning< 2452*67e74705SXin Li "redeclaration of %q0 should not add %q1 attribute">, 2453*67e74705SXin Li InGroup<DiagGroup<"dll-attribute-on-redeclaration">>; 2454*67e74705SXin Lidef err_attribute_dllimport_function_definition : Error< 2455*67e74705SXin Li "dllimport cannot be applied to non-inline function definition">; 2456*67e74705SXin Lidef err_attribute_dll_deleted : Error< 2457*67e74705SXin Li "attribute %q0 cannot be applied to a deleted function">; 2458*67e74705SXin Lidef err_attribute_dllimport_data_definition : Error< 2459*67e74705SXin Li "definition of dllimport data">; 2460*67e74705SXin Lidef err_attribute_dllimport_static_field_definition : Error< 2461*67e74705SXin Li "definition of dllimport static field not allowed">; 2462*67e74705SXin Lidef warn_attribute_dllimport_static_field_definition : Warning< 2463*67e74705SXin Li "definition of dllimport static field">, 2464*67e74705SXin Li InGroup<DiagGroup<"dllimport-static-field-def">>; 2465*67e74705SXin Lidef warn_attribute_dllexport_explicit_instantiation_decl : Warning< 2466*67e74705SXin Li "explicit instantiation declaration should not be 'dllexport'">, 2467*67e74705SXin Li InGroup<DiagGroup<"dllexport-explicit-instantiation-decl">>; 2468*67e74705SXin Lidef warn_invalid_initializer_from_system_header : Warning< 2469*67e74705SXin Li "invalid constructor form class in system header, should not be explicit">, 2470*67e74705SXin Li InGroup<DiagGroup<"invalid-initializer-from-system-header">>; 2471*67e74705SXin Lidef note_used_in_initialization_here : Note<"used in initialization here">; 2472*67e74705SXin Lidef err_attribute_dll_member_of_dll_class : Error< 2473*67e74705SXin Li "attribute %q0 cannot be applied to member of %q1 class">; 2474*67e74705SXin Lidef warn_attribute_dll_instantiated_base_class : Warning< 2475*67e74705SXin Li "propagating dll attribute to %select{already instantiated|explicitly specialized}0 " 2476*67e74705SXin Li "base class template without dll attribute is not supported">, 2477*67e74705SXin Li InGroup<DiagGroup<"unsupported-dll-base-class-template">>, DefaultIgnore; 2478*67e74705SXin Lidef err_attribute_dll_ambiguous_default_ctor : Error< 2479*67e74705SXin Li "'__declspec(dllexport)' cannot be applied to more than one default constructor in %0">; 2480*67e74705SXin Lidef err_attribute_weakref_not_static : Error< 2481*67e74705SXin Li "weakref declaration must have internal linkage">; 2482*67e74705SXin Lidef err_attribute_weakref_not_global_context : Error< 2483*67e74705SXin Li "weakref declaration of %0 must be in a global context">; 2484*67e74705SXin Lidef err_attribute_weakref_without_alias : Error< 2485*67e74705SXin Li "weakref declaration of %0 must also have an alias attribute">; 2486*67e74705SXin Lidef err_alias_not_supported_on_darwin : Error < 2487*67e74705SXin Li "only weak aliases are supported on darwin">; 2488*67e74705SXin Lidef err_alias_to_undefined : Error< 2489*67e74705SXin Li "%select{alias|ifunc}0 must point to a defined %select{variable or |}1function">; 2490*67e74705SXin Lidef warn_alias_to_weak_alias : Warning< 2491*67e74705SXin Li "%select{alias|ifunc}2 will always resolve to %0 even if weak definition of %1 is overridden">, 2492*67e74705SXin Li InGroup<IgnoredAttributes>; 2493*67e74705SXin Lidef warn_alias_with_section : Warning< 2494*67e74705SXin Li "%select{alias|ifunc}1 will not be in section '%0' but in the same section as the %select{aliasee|resolver}2">, 2495*67e74705SXin Li InGroup<IgnoredAttributes>; 2496*67e74705SXin Lidef err_duplicate_mangled_name : Error< 2497*67e74705SXin Li "definition with same mangled name as another definition">; 2498*67e74705SXin Lidef err_cyclic_alias : Error< 2499*67e74705SXin Li "%select{alias|ifunc}0 definition is part of a cycle">; 2500*67e74705SXin Lidef err_ifunc_resolver_return : Error< 2501*67e74705SXin Li "ifunc resolver function must return a pointer">; 2502*67e74705SXin Lidef err_ifunc_resolver_params : Error< 2503*67e74705SXin Li "ifunc resolver function must have no parameters">; 2504*67e74705SXin Lidef warn_attribute_wrong_decl_type : Warning< 2505*67e74705SXin Li "%0 attribute only applies to %select{functions|unions|" 2506*67e74705SXin Li "variables and functions|functions and methods|parameters|" 2507*67e74705SXin Li "functions, methods and blocks|functions, methods, and classes|" 2508*67e74705SXin Li "functions, methods, and parameters|classes|enums|variables|methods|" 2509*67e74705SXin Li "fields and global variables|structs|parameters and typedefs|variables and typedefs|" 2510*67e74705SXin Li "thread-local variables|variables and fields|variables, data members and tag types|" 2511*67e74705SXin Li "types and namespaces|Objective-C interfaces|methods and properties|" 2512*67e74705SXin Li "struct or union|struct, union or class|types|" 2513*67e74705SXin Li "Objective-C instance methods|init methods of interface or class extension declarations|" 2514*67e74705SXin Li "variables, functions and classes|Objective-C protocols|" 2515*67e74705SXin Li "functions and global variables|structs, unions, and typedefs|structs and typedefs|" 2516*67e74705SXin Li "interface or protocol declarations|kernel functions|non-K&R-style functions|" 2517*67e74705SXin Li "variables, enums, fields and typedefs|functions, methods, enums, and classes|" 2518*67e74705SXin Li "structs, classes, variables, functions, and inline namespaces|" 2519*67e74705SXin Li "variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members}1">, 2520*67e74705SXin Li InGroup<IgnoredAttributes>; 2521*67e74705SXin Lidef err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>; 2522*67e74705SXin Lidef warn_type_attribute_wrong_type : Warning< 2523*67e74705SXin Li "'%0' only applies to %select{function|pointer|" 2524*67e74705SXin Li "Objective-C object or block pointer}1 types; type here is %2">, 2525*67e74705SXin Li InGroup<IgnoredAttributes>; 2526*67e74705SXin Lidef warn_incomplete_encoded_type : Warning< 2527*67e74705SXin Li "encoding of %0 type is incomplete because %1 component has unknown encoding">, 2528*67e74705SXin Li InGroup<DiagGroup<"encode-type">>; 2529*67e74705SXin Lidef warn_gnu_inline_attribute_requires_inline : Warning< 2530*67e74705SXin Li "'gnu_inline' attribute requires function to be marked 'inline'," 2531*67e74705SXin Li " attribute ignored">, 2532*67e74705SXin Li InGroup<IgnoredAttributes>; 2533*67e74705SXin Lidef err_attribute_vecreturn_only_vector_member : Error< 2534*67e74705SXin Li "the vecreturn attribute can only be used on a class or structure with one member, which must be a vector">; 2535*67e74705SXin Lidef err_attribute_vecreturn_only_pod_record : Error< 2536*67e74705SXin Li "the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions)">; 2537*67e74705SXin Lidef err_cconv_change : Error< 2538*67e74705SXin Li "function declared '%0' here was previously declared " 2539*67e74705SXin Li "%select{'%2'|without calling convention}1">; 2540*67e74705SXin Lidef warn_cconv_ignored : Warning< 2541*67e74705SXin Li "calling convention %0 ignored for this target">, InGroup<IgnoredAttributes>; 2542*67e74705SXin Lidef err_cconv_knr : Error< 2543*67e74705SXin Li "function with no prototype cannot use the %0 calling convention">; 2544*67e74705SXin Lidef warn_cconv_knr : Warning< 2545*67e74705SXin Li err_cconv_knr.Text>, 2546*67e74705SXin Li InGroup<DiagGroup<"missing-prototype-for-cc">>; 2547*67e74705SXin Lidef err_cconv_varargs : Error< 2548*67e74705SXin Li "variadic function cannot use %0 calling convention">; 2549*67e74705SXin Lidef warn_cconv_varargs : Warning< 2550*67e74705SXin Li "%0 calling convention ignored on variadic function">, 2551*67e74705SXin Li InGroup<IgnoredAttributes>; 2552*67e74705SXin Lidef warn_cconv_structors : Warning< 2553*67e74705SXin Li "%0 calling convention ignored on constructor/destructor">, 2554*67e74705SXin Li InGroup<IgnoredAttributes>; 2555*67e74705SXin Lidef err_regparm_mismatch : Error<"function declared with regparm(%0) " 2556*67e74705SXin Li "attribute was previously declared " 2557*67e74705SXin Li "%plural{0:without the regparm|:with the regparm(%1)}1 attribute">; 2558*67e74705SXin Lidef err_returns_retained_mismatch : Error< 2559*67e74705SXin Li "function declared with the ns_returns_retained attribute " 2560*67e74705SXin Li "was previously declared without the ns_returns_retained attribute">; 2561*67e74705SXin Lidef err_objc_precise_lifetime_bad_type : Error< 2562*67e74705SXin Li "objc_precise_lifetime only applies to retainable types; type here is %0">; 2563*67e74705SXin Lidef warn_objc_precise_lifetime_meaningless : Error< 2564*67e74705SXin Li "objc_precise_lifetime is not meaningful for " 2565*67e74705SXin Li "%select{__unsafe_unretained|__autoreleasing}0 objects">; 2566*67e74705SXin Lidef err_invalid_pcs : Error<"invalid PCS type">; 2567*67e74705SXin Lidef warn_attribute_not_on_decl : Warning< 2568*67e74705SXin Li "%0 attribute ignored when parsing type">, InGroup<IgnoredAttributes>; 2569*67e74705SXin Lidef err_base_specifier_attribute : Error< 2570*67e74705SXin Li "%0 attribute cannot be applied to a base specifier">; 2571*67e74705SXin Lidef err_invalid_attribute_on_virtual_function : Error< 2572*67e74705SXin Li "%0 attribute cannot be applied to virtual functions">; 2573*67e74705SXin Li 2574*67e74705SXin Li// Availability attribute 2575*67e74705SXin Lidef warn_availability_unknown_platform : Warning< 2576*67e74705SXin Li "unknown platform %0 in availability macro">, InGroup<Availability>; 2577*67e74705SXin Lidef warn_availability_version_ordering : Warning< 2578*67e74705SXin Li "feature cannot be %select{introduced|deprecated|obsoleted}0 in %1 version " 2579*67e74705SXin Li "%2 before it was %select{introduced|deprecated|obsoleted}3 in version %4; " 2580*67e74705SXin Li "attribute ignored">, InGroup<Availability>; 2581*67e74705SXin Lidef warn_mismatched_availability: Warning< 2582*67e74705SXin Li "availability does not match previous declaration">, InGroup<Availability>; 2583*67e74705SXin Lidef warn_mismatched_availability_override : Warning< 2584*67e74705SXin Li "%select{|overriding }4method %select{introduced after|" 2585*67e74705SXin Li "deprecated before|obsoleted before}0 " 2586*67e74705SXin Li "%select{the protocol method it implements|overridden method}4 " 2587*67e74705SXin Li "on %1 (%2 vs. %3)">, InGroup<Availability>; 2588*67e74705SXin Lidef warn_mismatched_availability_override_unavail : Warning< 2589*67e74705SXin Li "%select{|overriding }1method cannot be unavailable on %0 when " 2590*67e74705SXin Li "%select{the protocol method it implements|its overridden method}1 is " 2591*67e74705SXin Li "available">, 2592*67e74705SXin Li InGroup<Availability>; 2593*67e74705SXin Lidef note_overridden_method : Note< 2594*67e74705SXin Li "overridden method is here">; 2595*67e74705SXin Lidef note_protocol_method : Note< 2596*67e74705SXin Li "protocol method is here">; 2597*67e74705SXin Li 2598*67e74705SXin Li// Thread Safety Attributes 2599*67e74705SXin Lidef warn_invalid_capability_name : Warning< 2600*67e74705SXin Li "invalid capability name '%0'; capability name must be 'mutex' or 'role'">, 2601*67e74705SXin Li InGroup<ThreadSafetyAttributes>, DefaultIgnore; 2602*67e74705SXin Lidef warn_thread_attribute_ignored : Warning< 2603*67e74705SXin Li "ignoring %0 attribute because its argument is invalid">, 2604*67e74705SXin Li InGroup<ThreadSafetyAttributes>, DefaultIgnore; 2605*67e74705SXin Lidef warn_thread_attribute_argument_not_lockable : Warning< 2606*67e74705SXin Li "%0 attribute requires arguments whose type is annotated " 2607*67e74705SXin Li "with 'capability' attribute; type here is %1">, 2608*67e74705SXin Li InGroup<ThreadSafetyAttributes>, DefaultIgnore; 2609*67e74705SXin Lidef warn_thread_attribute_decl_not_lockable : Warning< 2610*67e74705SXin Li "%0 attribute can only be applied in a context annotated " 2611*67e74705SXin Li "with 'capability(\"mutex\")' attribute">, 2612*67e74705SXin Li InGroup<ThreadSafetyAttributes>, DefaultIgnore; 2613*67e74705SXin Lidef warn_thread_attribute_decl_not_pointer : Warning< 2614*67e74705SXin Li "%0 only applies to pointer types; type here is %1">, 2615*67e74705SXin Li InGroup<ThreadSafetyAttributes>, DefaultIgnore; 2616*67e74705SXin Lidef err_attribute_argument_out_of_range : Error< 2617*67e74705SXin Li "%0 attribute parameter %1 is out of bounds: " 2618*67e74705SXin Li "%plural{0:no parameters to index into|" 2619*67e74705SXin Li "1:can only be 1, since there is one parameter|" 2620*67e74705SXin Li ":must be between 1 and %2}2">; 2621*67e74705SXin Li 2622*67e74705SXin Li// Thread Safety Analysis 2623*67e74705SXin Lidef warn_unlock_but_no_lock : Warning<"releasing %0 '%1' that was not held">, 2624*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2625*67e74705SXin Lidef warn_unlock_kind_mismatch : Warning< 2626*67e74705SXin Li "releasing %0 '%1' using %select{shared|exclusive}2 access, expected " 2627*67e74705SXin Li "%select{shared|exclusive}3 access">, 2628*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2629*67e74705SXin Lidef warn_double_lock : Warning<"acquiring %0 '%1' that is already held">, 2630*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2631*67e74705SXin Lidef warn_no_unlock : Warning< 2632*67e74705SXin Li "%0 '%1' is still held at the end of function">, 2633*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2634*67e74705SXin Lidef warn_expecting_locked : Warning< 2635*67e74705SXin Li "expecting %0 '%1' to be held at the end of function">, 2636*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2637*67e74705SXin Li// FIXME: improve the error message about locks not in scope 2638*67e74705SXin Lidef warn_lock_some_predecessors : Warning< 2639*67e74705SXin Li "%0 '%1' is not held on every path through here">, 2640*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2641*67e74705SXin Lidef warn_expecting_lock_held_on_loop : Warning< 2642*67e74705SXin Li "expecting %0 '%1' to be held at start of each loop">, 2643*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2644*67e74705SXin Lidef note_locked_here : Note<"%0 acquired here">; 2645*67e74705SXin Lidef warn_lock_exclusive_and_shared : Warning< 2646*67e74705SXin Li "%0 '%1' is acquired exclusively and shared in the same scope">, 2647*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2648*67e74705SXin Lidef note_lock_exclusive_and_shared : Note< 2649*67e74705SXin Li "the other acquisition of %0 '%1' is here">; 2650*67e74705SXin Lidef warn_variable_requires_any_lock : Warning< 2651*67e74705SXin Li "%select{reading|writing}1 variable '%0' requires holding " 2652*67e74705SXin Li "%select{any mutex|any mutex exclusively}1">, 2653*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2654*67e74705SXin Lidef warn_var_deref_requires_any_lock : Warning< 2655*67e74705SXin Li "%select{reading|writing}1 the value pointed to by '%0' requires holding " 2656*67e74705SXin Li "%select{any mutex|any mutex exclusively}1">, 2657*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2658*67e74705SXin Lidef warn_fun_excludes_mutex : Warning< 2659*67e74705SXin Li "cannot call function '%1' while %0 '%2' is held">, 2660*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2661*67e74705SXin Lidef warn_cannot_resolve_lock : Warning< 2662*67e74705SXin Li "cannot resolve lock expression">, 2663*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2664*67e74705SXin Lidef warn_acquired_before : Warning< 2665*67e74705SXin Li "%0 '%1' must be acquired before '%2'">, 2666*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2667*67e74705SXin Lidef warn_acquired_before_after_cycle : Warning< 2668*67e74705SXin Li "Cycle in acquired_before/after dependencies, starting with '%0'">, 2669*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2670*67e74705SXin Li 2671*67e74705SXin Li 2672*67e74705SXin Li// Thread safety warnings negative capabilities 2673*67e74705SXin Lidef warn_acquire_requires_negative_cap : Warning< 2674*67e74705SXin Li "acquiring %0 '%1' requires negative capability '%2'">, 2675*67e74705SXin Li InGroup<ThreadSafetyNegative>, DefaultIgnore; 2676*67e74705SXin Li 2677*67e74705SXin Li// Thread safety warnings on pass by reference 2678*67e74705SXin Lidef warn_guarded_pass_by_reference : Warning< 2679*67e74705SXin Li "passing variable '%1' by reference requires holding %0 " 2680*67e74705SXin Li "%select{'%2'|'%2' exclusively}3">, 2681*67e74705SXin Li InGroup<ThreadSafetyReference>, DefaultIgnore; 2682*67e74705SXin Lidef warn_pt_guarded_pass_by_reference : Warning< 2683*67e74705SXin Li "passing the value that '%1' points to by reference requires holding %0 " 2684*67e74705SXin Li "%select{'%2'|'%2' exclusively}3">, 2685*67e74705SXin Li InGroup<ThreadSafetyReference>, DefaultIgnore; 2686*67e74705SXin Li 2687*67e74705SXin Li// Imprecise thread safety warnings 2688*67e74705SXin Lidef warn_variable_requires_lock : Warning< 2689*67e74705SXin Li "%select{reading|writing}3 variable '%1' requires holding %0 " 2690*67e74705SXin Li "%select{'%2'|'%2' exclusively}3">, 2691*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2692*67e74705SXin Lidef warn_var_deref_requires_lock : Warning< 2693*67e74705SXin Li "%select{reading|writing}3 the value pointed to by '%1' requires " 2694*67e74705SXin Li "holding %0 %select{'%2'|'%2' exclusively}3">, 2695*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2696*67e74705SXin Lidef warn_fun_requires_lock : Warning< 2697*67e74705SXin Li "calling function '%1' requires holding %0 %select{'%2'|'%2' exclusively}3">, 2698*67e74705SXin Li InGroup<ThreadSafetyAnalysis>, DefaultIgnore; 2699*67e74705SXin Li 2700*67e74705SXin Li// Precise thread safety warnings 2701*67e74705SXin Lidef warn_variable_requires_lock_precise : 2702*67e74705SXin Li Warning<warn_variable_requires_lock.Text>, 2703*67e74705SXin Li InGroup<ThreadSafetyPrecise>, DefaultIgnore; 2704*67e74705SXin Lidef warn_var_deref_requires_lock_precise : 2705*67e74705SXin Li Warning<warn_var_deref_requires_lock.Text>, 2706*67e74705SXin Li InGroup<ThreadSafetyPrecise>, DefaultIgnore; 2707*67e74705SXin Lidef warn_fun_requires_lock_precise : 2708*67e74705SXin Li Warning<warn_fun_requires_lock.Text>, 2709*67e74705SXin Li InGroup<ThreadSafetyPrecise>, DefaultIgnore; 2710*67e74705SXin Lidef note_found_mutex_near_match : Note<"found near match '%0'">; 2711*67e74705SXin Li 2712*67e74705SXin Li// Verbose thread safety warnings 2713*67e74705SXin Lidef warn_thread_safety_verbose : Warning<"Thread safety verbose warning.">, 2714*67e74705SXin Li InGroup<ThreadSafetyVerbose>, DefaultIgnore; 2715*67e74705SXin Lidef note_thread_warning_in_fun : Note<"Thread warning in function '%0'">; 2716*67e74705SXin Lidef note_guarded_by_declared_here : Note<"Guarded_by declared here.">; 2717*67e74705SXin Li 2718*67e74705SXin Li// Dummy warning that will trigger "beta" warnings from the analysis if enabled. 2719*67e74705SXin Lidef warn_thread_safety_beta : Warning<"Thread safety beta warning.">, 2720*67e74705SXin Li InGroup<ThreadSafetyBeta>, DefaultIgnore; 2721*67e74705SXin Li 2722*67e74705SXin Li// Consumed warnings 2723*67e74705SXin Lidef warn_use_in_invalid_state : Warning< 2724*67e74705SXin Li "invalid invocation of method '%0' on object '%1' while it is in the '%2' " 2725*67e74705SXin Li "state">, InGroup<Consumed>, DefaultIgnore; 2726*67e74705SXin Lidef warn_use_of_temp_in_invalid_state : Warning< 2727*67e74705SXin Li "invalid invocation of method '%0' on a temporary object while it is in the " 2728*67e74705SXin Li "'%1' state">, InGroup<Consumed>, DefaultIgnore; 2729*67e74705SXin Lidef warn_attr_on_unconsumable_class : Warning< 2730*67e74705SXin Li "consumed analysis attribute is attached to member of class '%0' which isn't " 2731*67e74705SXin Li "marked as consumable">, InGroup<Consumed>, DefaultIgnore; 2732*67e74705SXin Lidef warn_return_typestate_for_unconsumable_type : Warning< 2733*67e74705SXin Li "return state set for an unconsumable type '%0'">, InGroup<Consumed>, 2734*67e74705SXin Li DefaultIgnore; 2735*67e74705SXin Lidef warn_return_typestate_mismatch : Warning< 2736*67e74705SXin Li "return value not in expected state; expected '%0', observed '%1'">, 2737*67e74705SXin Li InGroup<Consumed>, DefaultIgnore; 2738*67e74705SXin Lidef warn_loop_state_mismatch : Warning< 2739*67e74705SXin Li "state of variable '%0' must match at the entry and exit of loop">, 2740*67e74705SXin Li InGroup<Consumed>, DefaultIgnore; 2741*67e74705SXin Lidef warn_param_return_typestate_mismatch : Warning< 2742*67e74705SXin Li "parameter '%0' not in expected state when the function returns: expected " 2743*67e74705SXin Li "'%1', observed '%2'">, InGroup<Consumed>, DefaultIgnore; 2744*67e74705SXin Lidef warn_param_typestate_mismatch : Warning< 2745*67e74705SXin Li "argument not in expected state; expected '%0', observed '%1'">, 2746*67e74705SXin Li InGroup<Consumed>, DefaultIgnore; 2747*67e74705SXin Li 2748*67e74705SXin Li// no_sanitize attribute 2749*67e74705SXin Lidef warn_unknown_sanitizer_ignored : Warning< 2750*67e74705SXin Li "unknown sanitizer '%0' ignored">, InGroup<UnknownSanitizers>; 2751*67e74705SXin Li 2752*67e74705SXin Lidef warn_impcast_vector_scalar : Warning< 2753*67e74705SXin Li "implicit conversion turns vector to scalar: %0 to %1">, 2754*67e74705SXin Li InGroup<Conversion>, DefaultIgnore; 2755*67e74705SXin Lidef warn_impcast_complex_scalar : Warning< 2756*67e74705SXin Li "implicit conversion discards imaginary component: %0 to %1">, 2757*67e74705SXin Li InGroup<Conversion>, DefaultIgnore; 2758*67e74705SXin Lidef warn_impcast_float_precision : Warning< 2759*67e74705SXin Li "implicit conversion loses floating-point precision: %0 to %1">, 2760*67e74705SXin Li InGroup<Conversion>, DefaultIgnore; 2761*67e74705SXin Lidef warn_impcast_double_promotion : Warning< 2762*67e74705SXin Li "implicit conversion increases floating-point precision: %0 to %1">, 2763*67e74705SXin Li InGroup<DoublePromotion>, DefaultIgnore; 2764*67e74705SXin Lidef warn_impcast_integer_sign : Warning< 2765*67e74705SXin Li "implicit conversion changes signedness: %0 to %1">, 2766*67e74705SXin Li InGroup<SignConversion>, DefaultIgnore; 2767*67e74705SXin Lidef warn_impcast_integer_sign_conditional : Warning< 2768*67e74705SXin Li "operand of ? changes signedness: %0 to %1">, 2769*67e74705SXin Li InGroup<SignConversion>, DefaultIgnore; 2770*67e74705SXin Lidef warn_impcast_integer_precision : Warning< 2771*67e74705SXin Li "implicit conversion loses integer precision: %0 to %1">, 2772*67e74705SXin Li InGroup<Conversion>, DefaultIgnore; 2773*67e74705SXin Lidef warn_impcast_integer_64_32 : Warning< 2774*67e74705SXin Li "implicit conversion loses integer precision: %0 to %1">, 2775*67e74705SXin Li InGroup<Shorten64To32>, DefaultIgnore; 2776*67e74705SXin Lidef warn_impcast_integer_precision_constant : Warning< 2777*67e74705SXin Li "implicit conversion from %2 to %3 changes value from %0 to %1">, 2778*67e74705SXin Li InGroup<ConstantConversion>; 2779*67e74705SXin Lidef warn_impcast_bitfield_precision_constant : Warning< 2780*67e74705SXin Li "implicit truncation from %2 to bitfield changes value from %0 to %1">, 2781*67e74705SXin Li InGroup<BitFieldConstantConversion>; 2782*67e74705SXin Li 2783*67e74705SXin Lidef warn_impcast_literal_float_to_integer : Warning< 2784*67e74705SXin Li "implicit conversion from %0 to %1 changes value from %2 to %3">, 2785*67e74705SXin Li InGroup<LiteralConversion>; 2786*67e74705SXin Lidef warn_impcast_float_integer : Warning< 2787*67e74705SXin Li "implicit conversion turns floating-point number into integer: %0 to %1">, 2788*67e74705SXin Li InGroup<FloatConversion>, DefaultIgnore; 2789*67e74705SXin Li 2790*67e74705SXin Lidef warn_impcast_float_to_integer : Warning< 2791*67e74705SXin Li "implicit conversion of out of range value from %0 to %1 changes value " 2792*67e74705SXin Li "from %2 to %3">, 2793*67e74705SXin Li InGroup<FloatOverflowConversion>, DefaultIgnore; 2794*67e74705SXin Lidef warn_impcast_float_to_integer_zero : Warning< 2795*67e74705SXin Li "implicit conversion from %0 to %1 changes non-zero value from %2 to %3">, 2796*67e74705SXin Li InGroup<FloatZeroConversion>, DefaultIgnore; 2797*67e74705SXin Li 2798*67e74705SXin Lidef warn_impcast_string_literal_to_bool : Warning< 2799*67e74705SXin Li "implicit conversion turns string literal into bool: %0 to %1">, 2800*67e74705SXin Li InGroup<StringConversion>, DefaultIgnore; 2801*67e74705SXin Lidef warn_impcast_different_enum_types : Warning< 2802*67e74705SXin Li "implicit conversion from enumeration type %0 to different enumeration type " 2803*67e74705SXin Li "%1">, InGroup<EnumConversion>; 2804*67e74705SXin Lidef warn_impcast_bool_to_null_pointer : Warning< 2805*67e74705SXin Li "initialization of pointer of type %0 to null from a constant boolean " 2806*67e74705SXin Li "expression">, InGroup<BoolConversion>; 2807*67e74705SXin Lidef warn_non_literal_null_pointer : Warning< 2808*67e74705SXin Li "expression which evaluates to zero treated as a null pointer constant of " 2809*67e74705SXin Li "type %0">, InGroup<NonLiteralNullConversion>; 2810*67e74705SXin Lidef warn_impcast_null_pointer_to_integer : Warning< 2811*67e74705SXin Li "implicit conversion of %select{NULL|nullptr}0 constant to %1">, 2812*67e74705SXin Li InGroup<NullConversion>; 2813*67e74705SXin Lidef warn_impcast_floating_point_to_bool : Warning< 2814*67e74705SXin Li "implicit conversion turns floating-point number into bool: %0 to %1">, 2815*67e74705SXin Li InGroup<ImplicitConversionFloatingPointToBool>; 2816*67e74705SXin Lidef ext_ms_impcast_fn_obj : ExtWarn< 2817*67e74705SXin Li "implicit conversion between pointer-to-function and pointer-to-object is a " 2818*67e74705SXin Li "Microsoft extension">, InGroup<MicrosoftCast>; 2819*67e74705SXin Li 2820*67e74705SXin Lidef warn_impcast_pointer_to_bool : Warning< 2821*67e74705SXin Li "address of%select{| function| array}0 '%1' will always evaluate to " 2822*67e74705SXin Li "'true'">, 2823*67e74705SXin Li InGroup<PointerBoolConversion>; 2824*67e74705SXin Lidef warn_cast_nonnull_to_bool : Warning< 2825*67e74705SXin Li "nonnull %select{function call|parameter}0 '%1' will evaluate to " 2826*67e74705SXin Li "'true' on first encounter">, 2827*67e74705SXin Li InGroup<PointerBoolConversion>; 2828*67e74705SXin Lidef warn_this_bool_conversion : Warning< 2829*67e74705SXin Li "'this' pointer cannot be null in well-defined C++ code; pointer may be " 2830*67e74705SXin Li "assumed to always convert to true">, InGroup<UndefinedBoolConversion>; 2831*67e74705SXin Lidef warn_address_of_reference_bool_conversion : Warning< 2832*67e74705SXin Li "reference cannot be bound to dereferenced null pointer in well-defined C++ " 2833*67e74705SXin Li "code; pointer may be assumed to always convert to true">, 2834*67e74705SXin Li InGroup<UndefinedBoolConversion>; 2835*67e74705SXin Li 2836*67e74705SXin Lidef warn_null_pointer_compare : Warning< 2837*67e74705SXin Li "comparison of %select{address of|function|array}0 '%1' %select{not |}2" 2838*67e74705SXin Li "equal to a null pointer is always %select{true|false}2">, 2839*67e74705SXin Li InGroup<TautologicalPointerCompare>; 2840*67e74705SXin Lidef warn_nonnull_expr_compare : Warning< 2841*67e74705SXin Li "comparison of nonnull %select{function call|parameter}0 '%1' " 2842*67e74705SXin Li "%select{not |}2equal to a null pointer is '%select{true|false}2' on first " 2843*67e74705SXin Li "encounter">, 2844*67e74705SXin Li InGroup<TautologicalPointerCompare>; 2845*67e74705SXin Lidef warn_this_null_compare : Warning< 2846*67e74705SXin Li "'this' pointer cannot be null in well-defined C++ code; comparison may be " 2847*67e74705SXin Li "assumed to always evaluate to %select{true|false}0">, 2848*67e74705SXin Li InGroup<TautologicalUndefinedCompare>; 2849*67e74705SXin Lidef warn_address_of_reference_null_compare : Warning< 2850*67e74705SXin Li "reference cannot be bound to dereferenced null pointer in well-defined C++ " 2851*67e74705SXin Li "code; comparison may be assumed to always evaluate to " 2852*67e74705SXin Li "%select{true|false}0">, 2853*67e74705SXin Li InGroup<TautologicalUndefinedCompare>; 2854*67e74705SXin Lidef note_reference_is_return_value : Note<"%0 returns a reference">; 2855*67e74705SXin Li 2856*67e74705SXin Lidef note_function_warning_silence : Note< 2857*67e74705SXin Li "prefix with the address-of operator to silence this warning">; 2858*67e74705SXin Lidef note_function_to_function_call : Note< 2859*67e74705SXin Li "suffix with parentheses to turn this into a function call">; 2860*67e74705SXin Lidef warn_impcast_objective_c_literal_to_bool : Warning< 2861*67e74705SXin Li "implicit boolean conversion of Objective-C object literal always " 2862*67e74705SXin Li "evaluates to true">, 2863*67e74705SXin Li InGroup<ObjCLiteralConversion>; 2864*67e74705SXin Li 2865*67e74705SXin Lidef warn_cast_align : Warning< 2866*67e74705SXin Li "cast from %0 to %1 increases required alignment from %2 to %3">, 2867*67e74705SXin Li InGroup<CastAlign>, DefaultIgnore; 2868*67e74705SXin Lidef warn_old_style_cast : Warning< 2869*67e74705SXin Li "use of old-style cast">, InGroup<OldStyleCast>, DefaultIgnore; 2870*67e74705SXin Li 2871*67e74705SXin Li// Separate between casts to void* and non-void* pointers. 2872*67e74705SXin Li// Some APIs use (abuse) void* for something like a user context, 2873*67e74705SXin Li// and often that value is an integer even if it isn't a pointer itself. 2874*67e74705SXin Li// Having a separate warning flag allows users to control the warning 2875*67e74705SXin Li// for their workflow. 2876*67e74705SXin Lidef warn_int_to_pointer_cast : Warning< 2877*67e74705SXin Li "cast to %1 from smaller integer type %0">, 2878*67e74705SXin Li InGroup<IntToPointerCast>; 2879*67e74705SXin Lidef warn_int_to_void_pointer_cast : Warning< 2880*67e74705SXin Li "cast to %1 from smaller integer type %0">, 2881*67e74705SXin Li InGroup<IntToVoidPointerCast>; 2882*67e74705SXin Li 2883*67e74705SXin Lidef warn_attribute_packed_for_bitfield : Warning< 2884*67e74705SXin Li "'packed' attribute was ignored on bit-fields with single-byte alignment " 2885*67e74705SXin Li "in older versions of GCC and Clang">, 2886*67e74705SXin Li InGroup<DiagGroup<"attribute-packed-for-bitfield">>; 2887*67e74705SXin Lidef warn_transparent_union_attribute_field_size_align : Warning< 2888*67e74705SXin Li "%select{alignment|size}0 of field %1 (%2 bits) does not match the " 2889*67e74705SXin Li "%select{alignment|size}0 of the first field in transparent union; " 2890*67e74705SXin Li "transparent_union attribute ignored">, 2891*67e74705SXin Li InGroup<IgnoredAttributes>; 2892*67e74705SXin Lidef note_transparent_union_first_field_size_align : Note< 2893*67e74705SXin Li "%select{alignment|size}0 of first field is %1 bits">; 2894*67e74705SXin Lidef warn_transparent_union_attribute_not_definition : Warning< 2895*67e74705SXin Li "transparent_union attribute can only be applied to a union definition; " 2896*67e74705SXin Li "attribute ignored">, 2897*67e74705SXin Li InGroup<IgnoredAttributes>; 2898*67e74705SXin Lidef warn_transparent_union_attribute_floating : Warning< 2899*67e74705SXin Li "first field of a transparent union cannot have %select{floating point|" 2900*67e74705SXin Li "vector}0 type %1; transparent_union attribute ignored">, 2901*67e74705SXin Li InGroup<IgnoredAttributes>; 2902*67e74705SXin Lidef warn_transparent_union_attribute_zero_fields : Warning< 2903*67e74705SXin Li "transparent union definition must contain at least one field; " 2904*67e74705SXin Li "transparent_union attribute ignored">, 2905*67e74705SXin Li InGroup<IgnoredAttributes>; 2906*67e74705SXin Lidef warn_attribute_type_not_supported : Warning< 2907*67e74705SXin Li "%0 attribute argument not supported: %1">, 2908*67e74705SXin Li InGroup<IgnoredAttributes>; 2909*67e74705SXin Lidef warn_attribute_unknown_visibility : Warning<"unknown visibility %0">, 2910*67e74705SXin Li InGroup<IgnoredAttributes>; 2911*67e74705SXin Lidef warn_attribute_protected_visibility : 2912*67e74705SXin Li Warning<"target does not support 'protected' visibility; using 'default'">, 2913*67e74705SXin Li InGroup<DiagGroup<"unsupported-visibility">>; 2914*67e74705SXin Lidef err_mismatched_visibility: Error<"visibility does not match previous declaration">; 2915*67e74705SXin Lidef note_previous_attribute : Note<"previous attribute is here">; 2916*67e74705SXin Lidef note_conflicting_attribute : Note<"conflicting attribute is here">; 2917*67e74705SXin Lidef note_attribute : Note<"attribute is here">; 2918*67e74705SXin Lidef err_mismatched_ms_inheritance : Error< 2919*67e74705SXin Li "inheritance model does not match %select{definition|previous declaration}0">; 2920*67e74705SXin Lidef warn_ignored_ms_inheritance : Warning< 2921*67e74705SXin Li "inheritance model ignored on %select{primary template|partial specialization}0">, 2922*67e74705SXin Li InGroup<IgnoredAttributes>; 2923*67e74705SXin Lidef note_previous_ms_inheritance : Note< 2924*67e74705SXin Li "previous inheritance model specified here">; 2925*67e74705SXin Lidef err_machine_mode : Error<"%select{unknown|unsupported}0 machine mode %1">; 2926*67e74705SXin Lidef err_mode_not_primitive : Error< 2927*67e74705SXin Li "mode attribute only supported for integer and floating-point types">; 2928*67e74705SXin Lidef err_mode_wrong_type : Error< 2929*67e74705SXin Li "type of machine mode does not match type of base type">; 2930*67e74705SXin Lidef warn_vector_mode_deprecated : Warning< 2931*67e74705SXin Li "specifying vector types with the 'mode' attribute is deprecated; " 2932*67e74705SXin Li "use the 'vector_size' attribute instead">, 2933*67e74705SXin Li InGroup<DeprecatedAttributes>; 2934*67e74705SXin Lidef err_complex_mode_vector_type : Error< 2935*67e74705SXin Li "type of machine mode does not support base vector types">; 2936*67e74705SXin Lidef err_enum_mode_vector_type : Error< 2937*67e74705SXin Li "mode %0 is not supported for enumeration types">; 2938*67e74705SXin Lidef warn_attribute_nonnull_no_pointers : Warning< 2939*67e74705SXin Li "'nonnull' attribute applied to function with no pointer arguments">, 2940*67e74705SXin Li InGroup<IgnoredAttributes>; 2941*67e74705SXin Lidef warn_attribute_nonnull_parm_no_args : Warning< 2942*67e74705SXin Li "'nonnull' attribute when used on parameters takes no arguments">, 2943*67e74705SXin Li InGroup<IgnoredAttributes>; 2944*67e74705SXin Lidef note_declared_nonnull : Note< 2945*67e74705SXin Li "declared %select{'returns_nonnull'|'nonnull'}0 here">; 2946*67e74705SXin Lidef warn_attribute_sentinel_named_arguments : Warning< 2947*67e74705SXin Li "'sentinel' attribute requires named arguments">, 2948*67e74705SXin Li InGroup<IgnoredAttributes>; 2949*67e74705SXin Lidef warn_attribute_sentinel_not_variadic : Warning< 2950*67e74705SXin Li "'sentinel' attribute only supported for variadic %select{functions|blocks}0">, 2951*67e74705SXin Li InGroup<IgnoredAttributes>; 2952*67e74705SXin Lidef err_attribute_sentinel_less_than_zero : Error< 2953*67e74705SXin Li "'sentinel' parameter 1 less than zero">; 2954*67e74705SXin Lidef err_attribute_sentinel_not_zero_or_one : Error< 2955*67e74705SXin Li "'sentinel' parameter 2 not 0 or 1">; 2956*67e74705SXin Lidef warn_cleanup_ext : Warning< 2957*67e74705SXin Li "GCC does not allow the 'cleanup' attribute argument to be anything other " 2958*67e74705SXin Li "than a simple identifier">, 2959*67e74705SXin Li InGroup<GccCompat>; 2960*67e74705SXin Lidef err_attribute_cleanup_arg_not_function : Error< 2961*67e74705SXin Li "'cleanup' argument %select{|%1 |%1 }0is not a %select{||single }0function">; 2962*67e74705SXin Lidef err_attribute_cleanup_func_must_take_one_arg : Error< 2963*67e74705SXin Li "'cleanup' function %0 must take 1 parameter">; 2964*67e74705SXin Lidef err_attribute_cleanup_func_arg_incompatible_type : Error< 2965*67e74705SXin Li "'cleanup' function %0 parameter has " 2966*67e74705SXin Li "%diff{type $ which is incompatible with type $|incompatible type}1,2">; 2967*67e74705SXin Lidef err_attribute_regparm_wrong_platform : Error< 2968*67e74705SXin Li "'regparm' is not valid on this platform">; 2969*67e74705SXin Lidef err_attribute_regparm_invalid_number : Error< 2970*67e74705SXin Li "'regparm' parameter must be between 0 and %0 inclusive">; 2971*67e74705SXin Lidef err_attribute_not_supported_in_lang : Error< 2972*67e74705SXin Li "%0 attribute is not supported in %select{C|C++|Objective-C}1">; 2973*67e74705SXin Li 2974*67e74705SXin Li 2975*67e74705SXin Li// Clang-Specific Attributes 2976*67e74705SXin Lidef warn_attribute_iboutlet : Warning< 2977*67e74705SXin Li "%0 attribute can only be applied to instance variables or properties">, 2978*67e74705SXin Li InGroup<IgnoredAttributes>; 2979*67e74705SXin Lidef err_iboutletcollection_type : Error< 2980*67e74705SXin Li "invalid type %0 as argument of iboutletcollection attribute">; 2981*67e74705SXin Lidef err_iboutletcollection_builtintype : Error< 2982*67e74705SXin Li "type argument of iboutletcollection attribute cannot be a builtin type">; 2983*67e74705SXin Lidef warn_iboutlet_object_type : Warning< 2984*67e74705SXin Li "%select{instance variable|property}2 with %0 attribute must " 2985*67e74705SXin Li "be an object type (invalid %1)">, InGroup<ObjCInvalidIBOutletProperty>; 2986*67e74705SXin Lidef warn_iboutletcollection_property_assign : Warning< 2987*67e74705SXin Li "IBOutletCollection properties should be copy/strong and not assign">, 2988*67e74705SXin Li InGroup<ObjCInvalidIBOutletProperty>; 2989*67e74705SXin Li 2990*67e74705SXin Lidef err_attribute_overloadable_missing : Error< 2991*67e74705SXin Li "%select{overloaded function|redeclaration of}0 %1 must have the " 2992*67e74705SXin Li "'overloadable' attribute">; 2993*67e74705SXin Lidef note_attribute_overloadable_prev_overload : Note< 2994*67e74705SXin Li "previous overload of function is here">; 2995*67e74705SXin Lidef err_attribute_overloadable_no_prototype : Error< 2996*67e74705SXin Li "'overloadable' function %0 must have a prototype">; 2997*67e74705SXin Lidef warn_ns_attribute_wrong_return_type : Warning< 2998*67e74705SXin Li "%0 attribute only applies to %select{functions|methods|properties}1 that " 2999*67e74705SXin Li "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">, 3000*67e74705SXin Li InGroup<IgnoredAttributes>; 3001*67e74705SXin Lidef err_ns_attribute_wrong_parameter_type : Error< 3002*67e74705SXin Li "%0 attribute only applies to " 3003*67e74705SXin Li "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">; 3004*67e74705SXin Lidef warn_ns_attribute_wrong_parameter_type : Warning< 3005*67e74705SXin Li "%0 attribute only applies to " 3006*67e74705SXin Li "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">, 3007*67e74705SXin Li InGroup<IgnoredAttributes>; 3008*67e74705SXin Lidef warn_objc_requires_super_protocol : Warning< 3009*67e74705SXin Li "%0 attribute cannot be applied to %select{methods in protocols|dealloc}1">, 3010*67e74705SXin Li InGroup<DiagGroup<"requires-super-attribute">>; 3011*67e74705SXin Lidef note_protocol_decl : Note< 3012*67e74705SXin Li "protocol is declared here">; 3013*67e74705SXin Lidef note_protocol_decl_undefined : Note< 3014*67e74705SXin Li "protocol %0 has no definition">; 3015*67e74705SXin Li 3016*67e74705SXin Li// objc_designated_initializer attribute diagnostics. 3017*67e74705SXin Lidef warn_objc_designated_init_missing_super_call : Warning< 3018*67e74705SXin Li "designated initializer missing a 'super' call to a designated initializer of the super class">, 3019*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3020*67e74705SXin Lidef note_objc_designated_init_marked_here : Note< 3021*67e74705SXin Li "method marked as designated initializer of the class here">; 3022*67e74705SXin Lidef warn_objc_designated_init_non_super_designated_init_call : Warning< 3023*67e74705SXin Li "designated initializer should only invoke a designated initializer on 'super'">, 3024*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3025*67e74705SXin Lidef warn_objc_designated_init_non_designated_init_call : Warning< 3026*67e74705SXin Li "designated initializer invoked a non-designated initializer">, 3027*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3028*67e74705SXin Lidef warn_objc_secondary_init_super_init_call : Warning< 3029*67e74705SXin Li "convenience initializer should not invoke an initializer on 'super'">, 3030*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3031*67e74705SXin Lidef warn_objc_secondary_init_missing_init_call : Warning< 3032*67e74705SXin Li "convenience initializer missing a 'self' call to another initializer">, 3033*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3034*67e74705SXin Lidef warn_objc_implementation_missing_designated_init_override : Warning< 3035*67e74705SXin Li "method override for the designated initializer of the superclass %objcinstance0 not found">, 3036*67e74705SXin Li InGroup<ObjCDesignatedInit>; 3037*67e74705SXin Li 3038*67e74705SXin Li// objc_bridge attribute diagnostics. 3039*67e74705SXin Lidef err_objc_attr_not_id : Error< 3040*67e74705SXin Li "parameter of %0 attribute must be a single name of an Objective-C %select{class|protocol}1">; 3041*67e74705SXin Lidef err_objc_attr_typedef_not_id : Error< 3042*67e74705SXin Li "parameter of %0 attribute must be 'id' when used on a typedef">; 3043*67e74705SXin Lidef err_objc_attr_typedef_not_void_pointer : Error< 3044*67e74705SXin Li "'objc_bridge(id)' is only allowed on structs and typedefs of void pointers">; 3045*67e74705SXin Lidef err_objc_cf_bridged_not_interface : Error< 3046*67e74705SXin Li "CF object of type %0 is bridged to %1, which is not an Objective-C class">; 3047*67e74705SXin Lidef err_objc_ns_bridged_invalid_cfobject : Error< 3048*67e74705SXin Li "ObjectiveC object of type %0 is bridged to %1, which is not valid CF object">; 3049*67e74705SXin Lidef warn_objc_invalid_bridge : Warning< 3050*67e74705SXin Li "%0 bridges to %1, not %2">, InGroup<ObjCBridge>; 3051*67e74705SXin Lidef warn_objc_invalid_bridge_to_cf : Warning< 3052*67e74705SXin Li "%0 cannot bridge to %1">, InGroup<ObjCBridge>; 3053*67e74705SXin Li 3054*67e74705SXin Li// objc_bridge_related attribute diagnostics. 3055*67e74705SXin Lidef err_objc_bridged_related_invalid_class : Error< 3056*67e74705SXin Li "could not find Objective-C class %0 to convert %1 to %2">; 3057*67e74705SXin Lidef err_objc_bridged_related_invalid_class_name : Error< 3058*67e74705SXin Li "%0 must be name of an Objective-C class to be able to convert %1 to %2">; 3059*67e74705SXin Lidef err_objc_bridged_related_known_method : Error< 3060*67e74705SXin Li "%0 must be explicitly converted to %1; use %select{%objcclass2|%objcinstance2}3 " 3061*67e74705SXin Li "method for this conversion">; 3062*67e74705SXin Li 3063*67e74705SXin Lidef err_objc_attr_protocol_requires_definition : Error< 3064*67e74705SXin Li "attribute %0 can only be applied to @protocol definitions, not forward declarations">; 3065*67e74705SXin Li 3066*67e74705SXin Li// Function Parameter Semantic Analysis. 3067*67e74705SXin Lidef err_param_with_void_type : Error<"argument may not have 'void' type">; 3068*67e74705SXin Lidef err_void_only_param : Error< 3069*67e74705SXin Li "'void' must be the first and only parameter if specified">; 3070*67e74705SXin Lidef err_void_param_qualified : Error< 3071*67e74705SXin Li "'void' as parameter must not have type qualifiers">; 3072*67e74705SXin Lidef err_ident_list_in_fn_declaration : Error< 3073*67e74705SXin Li "a parameter list without types is only allowed in a function definition">; 3074*67e74705SXin Lidef ext_param_not_declared : Extension< 3075*67e74705SXin Li "parameter %0 was not declared, defaulting to type 'int'">; 3076*67e74705SXin Lidef err_param_default_argument : Error< 3077*67e74705SXin Li "C does not support default arguments">; 3078*67e74705SXin Lidef err_param_default_argument_redefinition : Error< 3079*67e74705SXin Li "redefinition of default argument">; 3080*67e74705SXin Lidef ext_param_default_argument_redefinition : ExtWarn< 3081*67e74705SXin Li err_param_default_argument_redefinition.Text>, 3082*67e74705SXin Li InGroup<MicrosoftDefaultArgRedefinition>; 3083*67e74705SXin Lidef err_param_default_argument_missing : Error< 3084*67e74705SXin Li "missing default argument on parameter">; 3085*67e74705SXin Lidef err_param_default_argument_missing_name : Error< 3086*67e74705SXin Li "missing default argument on parameter %0">; 3087*67e74705SXin Lidef err_param_default_argument_references_param : Error< 3088*67e74705SXin Li "default argument references parameter %0">; 3089*67e74705SXin Lidef err_param_default_argument_references_local : Error< 3090*67e74705SXin Li "default argument references local variable %0 of enclosing function">; 3091*67e74705SXin Lidef err_param_default_argument_references_this : Error< 3092*67e74705SXin Li "default argument references 'this'">; 3093*67e74705SXin Lidef err_param_default_argument_nonfunc : Error< 3094*67e74705SXin Li "default arguments can only be specified for parameters in a function " 3095*67e74705SXin Li "declaration">; 3096*67e74705SXin Lidef err_param_default_argument_template_redecl : Error< 3097*67e74705SXin Li "default arguments cannot be added to a function template that has already " 3098*67e74705SXin Li "been declared">; 3099*67e74705SXin Lidef err_param_default_argument_member_template_redecl : Error< 3100*67e74705SXin Li "default arguments cannot be added to an out-of-line definition of a member " 3101*67e74705SXin Li "of a %select{class template|class template partial specialization|nested " 3102*67e74705SXin Li "class in a template}0">; 3103*67e74705SXin Lidef err_param_default_argument_on_parameter_pack : Error< 3104*67e74705SXin Li "parameter pack cannot have a default argument">; 3105*67e74705SXin Lidef err_uninitialized_member_for_assign : Error< 3106*67e74705SXin Li "cannot define the implicit copy assignment operator for %0, because " 3107*67e74705SXin Li "non-static %select{reference|const}1 member %2 cannot use copy " 3108*67e74705SXin Li "assignment operator">; 3109*67e74705SXin Lidef err_uninitialized_member_in_ctor : Error< 3110*67e74705SXin Li "%select{constructor for %1|" 3111*67e74705SXin Li "implicit default constructor for %1|" 3112*67e74705SXin Li "cannot use constructor inherited from %1:}0 must explicitly " 3113*67e74705SXin Li "initialize the %select{reference|const}2 member %3">; 3114*67e74705SXin Lidef err_default_arg_makes_ctor_special : Error< 3115*67e74705SXin Li "addition of default argument on redeclaration makes this constructor a " 3116*67e74705SXin Li "%select{default|copy|move}0 constructor">; 3117*67e74705SXin Li 3118*67e74705SXin Lidef err_use_of_default_argument_to_function_declared_later : Error< 3119*67e74705SXin Li "use of default argument to function %0 that is declared later in class %1">; 3120*67e74705SXin Lidef note_default_argument_declared_here : Note< 3121*67e74705SXin Li "default argument declared here">; 3122*67e74705SXin Lidef err_recursive_default_argument : Error<"recursive evaluation of default argument">; 3123*67e74705SXin Li 3124*67e74705SXin Lidef ext_param_promoted_not_compatible_with_prototype : ExtWarn< 3125*67e74705SXin Li "%diff{promoted type $ of K&R function parameter is not compatible with the " 3126*67e74705SXin Li "parameter type $|promoted type of K&R function parameter is not compatible " 3127*67e74705SXin Li "with parameter type}0,1 declared in a previous prototype">, 3128*67e74705SXin Li InGroup<KNRPromotedParameter>; 3129*67e74705SXin Li 3130*67e74705SXin Li 3131*67e74705SXin Li// C++ Overloading Semantic Analysis. 3132*67e74705SXin Lidef err_ovl_diff_return_type : Error< 3133*67e74705SXin Li "functions that differ only in their return type cannot be overloaded">; 3134*67e74705SXin Lidef err_ovl_static_nonstatic_member : Error< 3135*67e74705SXin Li "static and non-static member functions with the same parameter types " 3136*67e74705SXin Li "cannot be overloaded">; 3137*67e74705SXin Li 3138*67e74705SXin Lidef err_ovl_no_viable_function_in_call : Error< 3139*67e74705SXin Li "no matching function for call to %0">; 3140*67e74705SXin Lidef err_ovl_no_viable_member_function_in_call : Error< 3141*67e74705SXin Li "no matching member function for call to %0">; 3142*67e74705SXin Lidef err_ovl_ambiguous_call : Error< 3143*67e74705SXin Li "call to %0 is ambiguous">; 3144*67e74705SXin Lidef err_ovl_deleted_call : Error< 3145*67e74705SXin Li "call to %select{unavailable|deleted}0 function %1%2">; 3146*67e74705SXin Lidef err_ovl_ambiguous_member_call : Error< 3147*67e74705SXin Li "call to member function %0 is ambiguous">; 3148*67e74705SXin Lidef err_ovl_deleted_member_call : Error< 3149*67e74705SXin Li "call to %select{unavailable|deleted}0 member function %1%2">; 3150*67e74705SXin Lidef note_ovl_too_many_candidates : Note< 3151*67e74705SXin Li "remaining %0 candidate%s0 omitted; " 3152*67e74705SXin Li "pass -fshow-overloads=all to show them">; 3153*67e74705SXin Lidef note_ovl_candidate : Note<"candidate " 3154*67e74705SXin Li "%select{function|function|constructor|" 3155*67e74705SXin Li "function |function |constructor |" 3156*67e74705SXin Li "is the implicit default constructor|" 3157*67e74705SXin Li "is the implicit copy constructor|" 3158*67e74705SXin Li "is the implicit move constructor|" 3159*67e74705SXin Li "is the implicit copy assignment operator|" 3160*67e74705SXin Li "is the implicit move assignment operator|" 3161*67e74705SXin Li "inherited constructor|" 3162*67e74705SXin Li "inherited constructor }0%1" 3163*67e74705SXin Li "%select{| has different class%diff{ (expected $ but has $)|}3,4" 3164*67e74705SXin Li "| has different number of parameters (expected %3 but has %4)" 3165*67e74705SXin Li "| has type mismatch at %ordinal3 parameter" 3166*67e74705SXin Li "%diff{ (expected $ but has $)|}4,5" 3167*67e74705SXin Li "| has different return type%diff{ ($ expected but has $)|}3,4" 3168*67e74705SXin Li "| has different qualifiers (expected " 3169*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile" 3170*67e74705SXin Li "|volatile and restrict|const, volatile, and restrict}3 but found " 3171*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile" 3172*67e74705SXin Li "|volatile and restrict|const, volatile, and restrict}4)}2">; 3173*67e74705SXin Li 3174*67e74705SXin Lidef note_ovl_candidate_inherited_constructor : Note< 3175*67e74705SXin Li "constructor from base class %0 inherited here">; 3176*67e74705SXin Lidef note_ovl_candidate_illegal_constructor : Note< 3177*67e74705SXin Li "candidate %select{constructor|template}0 ignored: " 3178*67e74705SXin Li "instantiation %select{takes|would take}0 its own class type by value">; 3179*67e74705SXin Lidef note_ovl_candidate_bad_deduction : Note< 3180*67e74705SXin Li "candidate template ignored: failed template argument deduction">; 3181*67e74705SXin Lidef note_ovl_candidate_incomplete_deduction : Note<"candidate template ignored: " 3182*67e74705SXin Li "couldn't infer template argument %0">; 3183*67e74705SXin Lidef note_ovl_candidate_inconsistent_deduction : Note< 3184*67e74705SXin Li "candidate template ignored: deduced conflicting %select{types|values|" 3185*67e74705SXin Li "templates}0 for parameter %1%diff{ ($ vs. $)|}2,3">; 3186*67e74705SXin Lidef note_ovl_candidate_explicit_arg_mismatch_named : Note< 3187*67e74705SXin Li "candidate template ignored: invalid explicitly-specified argument " 3188*67e74705SXin Li "for template parameter %0">; 3189*67e74705SXin Lidef note_ovl_candidate_explicit_arg_mismatch_unnamed : Note< 3190*67e74705SXin Li "candidate template ignored: invalid explicitly-specified argument " 3191*67e74705SXin Li "for %ordinal0 template parameter">; 3192*67e74705SXin Lidef note_ovl_candidate_instantiation_depth : Note< 3193*67e74705SXin Li "candidate template ignored: substitution exceeded maximum template " 3194*67e74705SXin Li "instantiation depth">; 3195*67e74705SXin Lidef note_ovl_candidate_underqualified : Note< 3196*67e74705SXin Li "candidate template ignored: cannot deduce a type for %0 that would " 3197*67e74705SXin Li "make %2 equal %1">; 3198*67e74705SXin Lidef note_ovl_candidate_substitution_failure : Note< 3199*67e74705SXin Li "candidate template ignored: substitution failure%0%1">; 3200*67e74705SXin Lidef note_ovl_candidate_disabled_by_enable_if : Note< 3201*67e74705SXin Li "candidate template ignored: disabled by %0%1">; 3202*67e74705SXin Lidef note_ovl_candidate_has_pass_object_size_params: Note< 3203*67e74705SXin Li "candidate address cannot be taken because parameter %0 has " 3204*67e74705SXin Li "pass_object_size attribute">; 3205*67e74705SXin Lidef note_ovl_candidate_disabled_by_enable_if_attr : Note< 3206*67e74705SXin Li "candidate disabled: %0">; 3207*67e74705SXin Lidef err_addrof_function_disabled_by_enable_if_attr : Error< 3208*67e74705SXin Li "cannot take address of function %0 becuase it has one or more " 3209*67e74705SXin Li "non-tautological enable_if conditions">; 3210*67e74705SXin Lidef note_addrof_ovl_candidate_disabled_by_enable_if_attr : Note< 3211*67e74705SXin Li "candidate function made ineligible by enable_if">; 3212*67e74705SXin Lidef note_ovl_candidate_failed_overload_resolution : Note< 3213*67e74705SXin Li "candidate template ignored: couldn't resolve reference to overloaded " 3214*67e74705SXin Li "function %0">; 3215*67e74705SXin Lidef note_ovl_candidate_deduced_mismatch : Note< 3216*67e74705SXin Li "candidate template ignored: deduced type " 3217*67e74705SXin Li "%diff{$ of %ordinal0 parameter does not match adjusted type $ of argument" 3218*67e74705SXin Li "|of %ordinal0 parameter does not match adjusted type of argument}1,2%3">; 3219*67e74705SXin Lidef note_ovl_candidate_non_deduced_mismatch : Note< 3220*67e74705SXin Li "candidate template ignored: could not match %diff{$ against $|types}0,1">; 3221*67e74705SXin Li// This note is needed because the above note would sometimes print two 3222*67e74705SXin Li// different types with the same name. Remove this note when the above note 3223*67e74705SXin Li// can handle that case properly. 3224*67e74705SXin Lidef note_ovl_candidate_non_deduced_mismatch_qualified : Note< 3225*67e74705SXin Li "candidate template ignored: could not match %q0 against %q1">; 3226*67e74705SXin Li 3227*67e74705SXin Li// Note that we don't treat templates differently for this diagnostic. 3228*67e74705SXin Lidef note_ovl_candidate_arity : Note<"candidate " 3229*67e74705SXin Li "%select{function|function|constructor|function|function|constructor|" 3230*67e74705SXin Li "constructor (the implicit default constructor)|" 3231*67e74705SXin Li "constructor (the implicit copy constructor)|" 3232*67e74705SXin Li "constructor (the implicit move constructor)|" 3233*67e74705SXin Li "function (the implicit copy assignment operator)|" 3234*67e74705SXin Li "function (the implicit move assignment operator)|" 3235*67e74705SXin Li "inherited constructor|" 3236*67e74705SXin Li "inherited constructor}0 %select{|template }1" 3237*67e74705SXin Li "not viable: requires%select{ at least| at most|}2 %3 argument%s3, but %4 " 3238*67e74705SXin Li "%plural{1:was|:were}4 provided">; 3239*67e74705SXin Li 3240*67e74705SXin Lidef note_ovl_candidate_arity_one : Note<"candidate " 3241*67e74705SXin Li "%select{function|function|constructor|function|function|constructor|" 3242*67e74705SXin Li "constructor (the implicit default constructor)|" 3243*67e74705SXin Li "constructor (the implicit copy constructor)|" 3244*67e74705SXin Li "constructor (the implicit move constructor)|" 3245*67e74705SXin Li "function (the implicit copy assignment operator)|" 3246*67e74705SXin Li "function (the implicit move assignment operator)|" 3247*67e74705SXin Li "inherited constructor|" 3248*67e74705SXin Li "inherited constructor}0 %select{|template }1not viable: " 3249*67e74705SXin Li "%select{requires at least|allows at most single|requires single}2 " 3250*67e74705SXin Li "argument %3, but %plural{0:no|:%4}4 arguments were provided">; 3251*67e74705SXin Li 3252*67e74705SXin Lidef note_ovl_candidate_deleted : Note< 3253*67e74705SXin Li "candidate %select{function|function|constructor|" 3254*67e74705SXin Li "function |function |constructor |" 3255*67e74705SXin Li "constructor (the implicit default constructor)|" 3256*67e74705SXin Li "constructor (the implicit copy constructor)|" 3257*67e74705SXin Li "constructor (the implicit move constructor)|" 3258*67e74705SXin Li "function (the implicit copy assignment operator)|" 3259*67e74705SXin Li "function (the implicit move assignment operator)|" 3260*67e74705SXin Li "inherited constructor|" 3261*67e74705SXin Li "inherited constructor }0%1 has been " 3262*67e74705SXin Li "%select{explicitly made unavailable|explicitly deleted|" 3263*67e74705SXin Li "implicitly deleted}2">; 3264*67e74705SXin Li 3265*67e74705SXin Li// Giving the index of the bad argument really clutters this message, and 3266*67e74705SXin Li// it's relatively unimportant because 1) it's generally obvious which 3267*67e74705SXin Li// argument(s) are of the given object type and 2) the fix is usually 3268*67e74705SXin Li// to complete the type, which doesn't involve changes to the call line 3269*67e74705SXin Li// anyway. If people complain, we can change it. 3270*67e74705SXin Lidef note_ovl_candidate_bad_conv_incomplete : Note<"candidate " 3271*67e74705SXin Li "%select{function|function|constructor|" 3272*67e74705SXin Li "function |function |constructor |" 3273*67e74705SXin Li "constructor (the implicit default constructor)|" 3274*67e74705SXin Li "constructor (the implicit copy constructor)|" 3275*67e74705SXin Li "constructor (the implicit move constructor)|" 3276*67e74705SXin Li "function (the implicit copy assignment operator)|" 3277*67e74705SXin Li "function (the implicit move assignment operator)|" 3278*67e74705SXin Li "inherited constructor|" 3279*67e74705SXin Li "inherited constructor }0%1 " 3280*67e74705SXin Li "not viable: cannot convert argument of incomplete type " 3281*67e74705SXin Li "%diff{$ to $|to parameter type}2,3 for " 3282*67e74705SXin Li "%select{%ordinal5 argument|object argument}4" 3283*67e74705SXin Li "%select{|; dereference the argument with *|" 3284*67e74705SXin Li "; take the address of the argument with &|" 3285*67e74705SXin Li "; remove *|" 3286*67e74705SXin Li "; remove &}6">; 3287*67e74705SXin Lidef note_ovl_candidate_bad_list_argument : Note<"candidate " 3288*67e74705SXin Li "%select{function|function|constructor|" 3289*67e74705SXin Li "function |function |constructor |" 3290*67e74705SXin Li "constructor (the implicit default constructor)|" 3291*67e74705SXin Li "constructor (the implicit copy constructor)|" 3292*67e74705SXin Li "constructor (the implicit move constructor)|" 3293*67e74705SXin Li "function (the implicit copy assignment operator)|" 3294*67e74705SXin Li "function (the implicit move assignment operator)|" 3295*67e74705SXin Li "inherited constructor|" 3296*67e74705SXin Li "inherited constructor }0%1 " 3297*67e74705SXin Li "not viable: cannot convert initializer list argument to %3">; 3298*67e74705SXin Lidef note_ovl_candidate_bad_overload : Note<"candidate " 3299*67e74705SXin Li "%select{function|function|constructor|" 3300*67e74705SXin Li "function |function |constructor |" 3301*67e74705SXin Li "constructor (the implicit default constructor)|" 3302*67e74705SXin Li "constructor (the implicit copy constructor)|" 3303*67e74705SXin Li "constructor (the implicit move constructor)|" 3304*67e74705SXin Li "function (the implicit copy assignment operator)|" 3305*67e74705SXin Li "function (the implicit move assignment operator)|" 3306*67e74705SXin Li "inherited constructor|" 3307*67e74705SXin Li "inherited constructor }0%1" 3308*67e74705SXin Li " not viable: no overload of %3 matching %2 for %ordinal4 argument">; 3309*67e74705SXin Lidef note_ovl_candidate_bad_conv : Note<"candidate " 3310*67e74705SXin Li "%select{function|function|constructor|" 3311*67e74705SXin Li "function |function |constructor |" 3312*67e74705SXin Li "constructor (the implicit default constructor)|" 3313*67e74705SXin Li "constructor (the implicit copy constructor)|" 3314*67e74705SXin Li "constructor (the implicit move constructor)|" 3315*67e74705SXin Li "function (the implicit copy assignment operator)|" 3316*67e74705SXin Li "function (the implicit move assignment operator)|" 3317*67e74705SXin Li "inherited constructor|" 3318*67e74705SXin Li "inherited constructor }0%1" 3319*67e74705SXin Li " not viable: no known conversion " 3320*67e74705SXin Li "%diff{from $ to $|from argument type to parameter type}2,3 for " 3321*67e74705SXin Li "%select{%ordinal5 argument|object argument}4" 3322*67e74705SXin Li "%select{|; dereference the argument with *|" 3323*67e74705SXin Li "; take the address of the argument with &|" 3324*67e74705SXin Li "; remove *|" 3325*67e74705SXin Li "; remove &}6">; 3326*67e74705SXin Lidef note_ovl_candidate_bad_arc_conv : Note<"candidate " 3327*67e74705SXin Li "%select{function|function|constructor|" 3328*67e74705SXin Li "function |function |constructor |" 3329*67e74705SXin Li "constructor (the implicit default constructor)|" 3330*67e74705SXin Li "constructor (the implicit copy constructor)|" 3331*67e74705SXin Li "constructor (the implicit move constructor)|" 3332*67e74705SXin Li "function (the implicit copy assignment operator)|" 3333*67e74705SXin Li "function (the implicit move assignment operator)|" 3334*67e74705SXin Li "inherited constructor|" 3335*67e74705SXin Li "inherited constructor }0%1" 3336*67e74705SXin Li " not viable: cannot implicitly convert argument " 3337*67e74705SXin Li "%diff{of type $ to $|type to parameter type}2,3 for " 3338*67e74705SXin Li "%select{%ordinal5 argument|object argument}4 under ARC">; 3339*67e74705SXin Lidef note_ovl_candidate_bad_lvalue : Note<"candidate " 3340*67e74705SXin Li "%select{function|function|constructor|" 3341*67e74705SXin Li "function |function |constructor |" 3342*67e74705SXin Li "constructor (the implicit default constructor)|" 3343*67e74705SXin Li "constructor (the implicit copy constructor)|" 3344*67e74705SXin Li "constructor (the implicit move constructor)|" 3345*67e74705SXin Li "function (the implicit copy assignment operator)|" 3346*67e74705SXin Li "function (the implicit move assignment operator)|" 3347*67e74705SXin Li "inherited constructor|" 3348*67e74705SXin Li "inherited constructor }0%1" 3349*67e74705SXin Li " not viable: expects an l-value for " 3350*67e74705SXin Li "%select{%ordinal3 argument|object argument}2">; 3351*67e74705SXin Lidef note_ovl_candidate_bad_addrspace : Note<"candidate " 3352*67e74705SXin Li "%select{function|function|constructor|" 3353*67e74705SXin Li "function |function |constructor |" 3354*67e74705SXin Li "constructor (the implicit default constructor)|" 3355*67e74705SXin Li "constructor (the implicit copy constructor)|" 3356*67e74705SXin Li "constructor (the implicit move constructor)|" 3357*67e74705SXin Li "function (the implicit copy assignment operator)|" 3358*67e74705SXin Li "function (the implicit move assignment operator)|" 3359*67e74705SXin Li "inherited constructor|" 3360*67e74705SXin Li "inherited constructor }0%1 not viable: " 3361*67e74705SXin Li "%select{%ordinal6|'this'}5 argument (%2) is in " 3362*67e74705SXin Li "address space %3, but parameter must be in address space %4">; 3363*67e74705SXin Lidef note_ovl_candidate_bad_gc : Note<"candidate " 3364*67e74705SXin Li "%select{function|function|constructor|" 3365*67e74705SXin Li "function |function |constructor |" 3366*67e74705SXin Li "constructor (the implicit default constructor)|" 3367*67e74705SXin Li "constructor (the implicit copy constructor)|" 3368*67e74705SXin Li "constructor (the implicit move constructor)|" 3369*67e74705SXin Li "function (the implicit copy assignment operator)|" 3370*67e74705SXin Li "function (the implicit move assignment operator)|" 3371*67e74705SXin Li "inherited constructor|" 3372*67e74705SXin Li "inherited constructor }0%1 not viable: " 3373*67e74705SXin Li "%select{%ordinal6|'this'}5 argument (%2) has %select{no|__weak|__strong}3 " 3374*67e74705SXin Li "ownership, but parameter has %select{no|__weak|__strong}4 ownership">; 3375*67e74705SXin Lidef note_ovl_candidate_bad_ownership : Note<"candidate " 3376*67e74705SXin Li "%select{function|function|constructor|" 3377*67e74705SXin Li "function |function |constructor |" 3378*67e74705SXin Li "constructor (the implicit default constructor)|" 3379*67e74705SXin Li "constructor (the implicit copy constructor)|" 3380*67e74705SXin Li "constructor (the implicit move constructor)|" 3381*67e74705SXin Li "function (the implicit copy assignment operator)|" 3382*67e74705SXin Li "function (the implicit move assignment operator)|" 3383*67e74705SXin Li "inherited constructor|" 3384*67e74705SXin Li "inherited constructor }0%1 not viable: " 3385*67e74705SXin Li "%select{%ordinal6|'this'}5 argument (%2) has " 3386*67e74705SXin Li "%select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}3 ownership," 3387*67e74705SXin Li " but parameter has %select{no|__unsafe_unretained|__strong|__weak|" 3388*67e74705SXin Li "__autoreleasing}4 ownership">; 3389*67e74705SXin Lidef note_ovl_candidate_bad_cvr_this : Note<"candidate " 3390*67e74705SXin Li "%select{|function|||function|||||" 3391*67e74705SXin Li "function (the implicit copy assignment operator)|" 3392*67e74705SXin Li "function (the implicit move assignment operator)||}0 not viable: " 3393*67e74705SXin Li "'this' argument has type %2, but method is not marked " 3394*67e74705SXin Li "%select{const|restrict|const or restrict|volatile|const or volatile|" 3395*67e74705SXin Li "volatile or restrict|const, volatile, or restrict}3">; 3396*67e74705SXin Lidef note_ovl_candidate_bad_cvr : Note<"candidate " 3397*67e74705SXin Li "%select{function|function|constructor|" 3398*67e74705SXin Li "function |function |constructor |" 3399*67e74705SXin Li "constructor (the implicit default constructor)|" 3400*67e74705SXin Li "constructor (the implicit copy constructor)|" 3401*67e74705SXin Li "constructor (the implicit move constructor)|" 3402*67e74705SXin Li "function (the implicit copy assignment operator)|" 3403*67e74705SXin Li "function (the implicit move assignment operator)|" 3404*67e74705SXin Li "inherited constructor|" 3405*67e74705SXin Li "inherited constructor }0%1 not viable: " 3406*67e74705SXin Li "%ordinal4 argument (%2) would lose " 3407*67e74705SXin Li "%select{const|restrict|const and restrict|volatile|const and volatile|" 3408*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}3 qualifier" 3409*67e74705SXin Li "%select{||s||s|s|s}3">; 3410*67e74705SXin Lidef note_ovl_candidate_bad_unaligned : Note<"candidate " 3411*67e74705SXin Li "%select{function|function|constructor|" 3412*67e74705SXin Li "function |function |constructor |" 3413*67e74705SXin Li "constructor (the implicit default constructor)|" 3414*67e74705SXin Li "constructor (the implicit copy constructor)|" 3415*67e74705SXin Li "constructor (the implicit move constructor)|" 3416*67e74705SXin Li "function (the implicit copy assignment operator)|" 3417*67e74705SXin Li "function (the implicit move assignment operator)|" 3418*67e74705SXin Li "inherited constructor|" 3419*67e74705SXin Li "inherited constructor }0%1 not viable: " 3420*67e74705SXin Li "%ordinal4 argument (%2) would lose __unaligned qualifier">; 3421*67e74705SXin Lidef note_ovl_candidate_bad_base_to_derived_conv : Note<"candidate " 3422*67e74705SXin Li "%select{function|function|constructor|" 3423*67e74705SXin Li "function |function |constructor |" 3424*67e74705SXin Li "constructor (the implicit default constructor)|" 3425*67e74705SXin Li "constructor (the implicit copy constructor)|" 3426*67e74705SXin Li "constructor (the implicit move constructor)|" 3427*67e74705SXin Li "function (the implicit copy assignment operator)|" 3428*67e74705SXin Li "function (the implicit move assignment operator)|" 3429*67e74705SXin Li "inherited constructor|" 3430*67e74705SXin Li "inherited constructor }0%1 not viable: " 3431*67e74705SXin Li "cannot %select{convert from|convert from|bind}2 " 3432*67e74705SXin Li "%select{base class pointer|superclass|base class object of type}2 %3 to " 3433*67e74705SXin Li "%select{derived class pointer|subclass|derived class reference}2 %4 for " 3434*67e74705SXin Li "%ordinal5 argument">; 3435*67e74705SXin Lidef note_ovl_candidate_bad_target : Note< 3436*67e74705SXin Li "candidate %select{function|function|constructor|" 3437*67e74705SXin Li "function|function|constructor|" 3438*67e74705SXin Li "constructor (the implicit default constructor)|" 3439*67e74705SXin Li "constructor (the implicit copy constructor)|" 3440*67e74705SXin Li "constructor (the implicit move constructor)|" 3441*67e74705SXin Li "function (the implicit copy assignment operator)|" 3442*67e74705SXin Li "function (the implicit move assignment operator)|" 3443*67e74705SXin Li "inherited constructor|" 3444*67e74705SXin Li "inherited constructor}0 not viable: " 3445*67e74705SXin Li "call to " 3446*67e74705SXin Li "%select{__device__|__global__|__host__|__host__ __device__|invalid}1 function from" 3447*67e74705SXin Li " %select{__device__|__global__|__host__|__host__ __device__|invalid}2 function">; 3448*67e74705SXin Lidef note_implicit_member_target_infer_collision : Note< 3449*67e74705SXin Li "implicit %select{" 3450*67e74705SXin Li "default constructor|" 3451*67e74705SXin Li "copy constructor|" 3452*67e74705SXin Li "move constructor|" 3453*67e74705SXin Li "copy assignment operator|" 3454*67e74705SXin Li "move assignment operator|" 3455*67e74705SXin Li "destructor}0 inferred target collision: call to both " 3456*67e74705SXin Li "%select{__device__|__global__|__host__|__host__ __device__}1 and " 3457*67e74705SXin Li "%select{__device__|__global__|__host__|__host__ __device__}2 members">; 3458*67e74705SXin Li 3459*67e74705SXin Lidef note_ambiguous_type_conversion: Note< 3460*67e74705SXin Li "because of ambiguity in conversion %diff{of $ to $|between types}0,1">; 3461*67e74705SXin Lidef note_ovl_builtin_binary_candidate : Note< 3462*67e74705SXin Li "built-in candidate %0">; 3463*67e74705SXin Lidef note_ovl_builtin_unary_candidate : Note< 3464*67e74705SXin Li "built-in candidate %0">; 3465*67e74705SXin Lidef err_ovl_no_viable_function_in_init : Error< 3466*67e74705SXin Li "no matching constructor for initialization of %0">; 3467*67e74705SXin Lidef err_ovl_no_conversion_in_cast : Error< 3468*67e74705SXin Li "cannot convert %1 to %2 without a conversion operator">; 3469*67e74705SXin Lidef err_ovl_no_viable_conversion_in_cast : Error< 3470*67e74705SXin Li "no matching conversion for %select{|static_cast|reinterpret_cast|" 3471*67e74705SXin Li "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">; 3472*67e74705SXin Lidef err_ovl_ambiguous_conversion_in_cast : Error< 3473*67e74705SXin Li "ambiguous conversion for %select{|static_cast|reinterpret_cast|" 3474*67e74705SXin Li "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">; 3475*67e74705SXin Lidef err_ovl_deleted_conversion_in_cast : Error< 3476*67e74705SXin Li "%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 3477*67e74705SXin Li "functional-style cast}0 from %1 to %2 uses deleted function">; 3478*67e74705SXin Lidef err_ovl_ambiguous_init : Error<"call to constructor of %0 is ambiguous">; 3479*67e74705SXin Lidef err_ref_init_ambiguous : Error< 3480*67e74705SXin Li "reference initialization of type %0 with initializer of type %1 is ambiguous">; 3481*67e74705SXin Lidef err_ovl_deleted_init : Error< 3482*67e74705SXin Li "call to %select{unavailable|deleted}0 constructor of %1">; 3483*67e74705SXin Lidef err_ovl_deleted_special_init : Error< 3484*67e74705SXin Li "call to implicitly-deleted %select{default constructor|copy constructor|" 3485*67e74705SXin Li "move constructor|copy assignment operator|move assignment operator|" 3486*67e74705SXin Li "destructor|function}0 of %1">; 3487*67e74705SXin Lidef err_ovl_ambiguous_oper_unary : Error< 3488*67e74705SXin Li "use of overloaded operator '%0' is ambiguous (operand type %1)">; 3489*67e74705SXin Lidef err_ovl_ambiguous_oper_binary : Error< 3490*67e74705SXin Li "use of overloaded operator '%0' is ambiguous (with operand types %1 and %2)">; 3491*67e74705SXin Lidef err_ovl_no_viable_oper : Error<"no viable overloaded '%0'">; 3492*67e74705SXin Lidef note_assign_lhs_incomplete : Note<"type %0 is incomplete">; 3493*67e74705SXin Lidef err_ovl_deleted_oper : Error< 3494*67e74705SXin Li "overload resolution selected %select{unavailable|deleted}0 operator '%1'%2">; 3495*67e74705SXin Lidef err_ovl_deleted_special_oper : Error< 3496*67e74705SXin Li "object of type %0 cannot be %select{constructed|copied|moved|assigned|" 3497*67e74705SXin Li "assigned|destroyed}1 because its %select{default constructor|" 3498*67e74705SXin Li "copy constructor|move constructor|copy assignment operator|" 3499*67e74705SXin Li "move assignment operator|destructor}1 is implicitly deleted">; 3500*67e74705SXin Lidef err_ovl_no_viable_subscript : 3501*67e74705SXin Li Error<"no viable overloaded operator[] for type %0">; 3502*67e74705SXin Lidef err_ovl_no_oper : 3503*67e74705SXin Li Error<"type %0 does not provide a %select{subscript|call}1 operator">; 3504*67e74705SXin Lidef err_ovl_unresolvable : Error< 3505*67e74705SXin Li "reference to overloaded function could not be resolved; " 3506*67e74705SXin Li "did you mean to call it%select{| with no arguments}0?">; 3507*67e74705SXin Lidef err_bound_member_function : Error< 3508*67e74705SXin Li "reference to non-static member function must be called" 3509*67e74705SXin Li "%select{|; did you mean to call it with no arguments?}0">; 3510*67e74705SXin Lidef note_possible_target_of_call : Note<"possible target for call">; 3511*67e74705SXin Li 3512*67e74705SXin Lidef err_ovl_no_viable_object_call : Error< 3513*67e74705SXin Li "no matching function for call to object of type %0">; 3514*67e74705SXin Lidef err_ovl_ambiguous_object_call : Error< 3515*67e74705SXin Li "call to object of type %0 is ambiguous">; 3516*67e74705SXin Lidef err_ovl_deleted_object_call : Error< 3517*67e74705SXin Li "call to %select{unavailable|deleted}0 function call operator in type %1%2">; 3518*67e74705SXin Lidef note_ovl_surrogate_cand : Note<"conversion candidate of type %0">; 3519*67e74705SXin Lidef err_member_call_without_object : Error< 3520*67e74705SXin Li "call to non-static member function without an object argument">; 3521*67e74705SXin Li 3522*67e74705SXin Li// C++ Address of Overloaded Function 3523*67e74705SXin Lidef err_addr_ovl_no_viable : Error< 3524*67e74705SXin Li "address of overloaded function %0 does not match required type %1">; 3525*67e74705SXin Lidef err_addr_ovl_ambiguous : Error< 3526*67e74705SXin Li "address of overloaded function %0 is ambiguous">; 3527*67e74705SXin Lidef err_addr_ovl_not_func_ptrref : Error< 3528*67e74705SXin Li "address of overloaded function %0 cannot be converted to type %1">; 3529*67e74705SXin Lidef err_addr_ovl_no_qualifier : Error< 3530*67e74705SXin Li "cannot form member pointer of type %0 without '&' and class name">; 3531*67e74705SXin Li 3532*67e74705SXin Li// C++11 Literal Operators 3533*67e74705SXin Lidef err_ovl_no_viable_literal_operator : Error< 3534*67e74705SXin Li "no matching literal operator for call to %0" 3535*67e74705SXin Li "%select{| with argument of type %2| with arguments of types %2 and %3}1" 3536*67e74705SXin Li "%select{| or 'const char *'}4" 3537*67e74705SXin Li "%select{|, and no matching literal operator template}5">; 3538*67e74705SXin Li 3539*67e74705SXin Li// C++ Template Declarations 3540*67e74705SXin Lidef err_template_param_shadow : Error< 3541*67e74705SXin Li "declaration of %0 shadows template parameter">; 3542*67e74705SXin Lidef note_template_param_here : Note<"template parameter is declared here">; 3543*67e74705SXin Lidef warn_template_export_unsupported : Warning< 3544*67e74705SXin Li "exported templates are unsupported">; 3545*67e74705SXin Lidef err_template_outside_namespace_or_class_scope : Error< 3546*67e74705SXin Li "templates can only be declared in namespace or class scope">; 3547*67e74705SXin Lidef err_template_inside_local_class : Error< 3548*67e74705SXin Li "templates cannot be declared inside of a local class">; 3549*67e74705SXin Lidef err_template_linkage : Error<"templates must have C++ linkage">; 3550*67e74705SXin Lidef err_template_typedef : Error<"a typedef cannot be a template">; 3551*67e74705SXin Lidef err_template_unnamed_class : Error< 3552*67e74705SXin Li "cannot declare a class template with no name">; 3553*67e74705SXin Lidef err_template_param_list_different_arity : Error< 3554*67e74705SXin Li "%select{too few|too many}0 template parameters in template " 3555*67e74705SXin Li "%select{|template parameter }1redeclaration">; 3556*67e74705SXin Lidef note_template_param_list_different_arity : Note< 3557*67e74705SXin Li "%select{too few|too many}0 template parameters in template template " 3558*67e74705SXin Li "argument">; 3559*67e74705SXin Lidef note_template_prev_declaration : Note< 3560*67e74705SXin Li "previous template %select{declaration|template parameter}0 is here">; 3561*67e74705SXin Lidef err_template_param_different_kind : Error< 3562*67e74705SXin Li "template parameter has a different kind in template " 3563*67e74705SXin Li "%select{|template parameter }0redeclaration">; 3564*67e74705SXin Lidef note_template_param_different_kind : Note< 3565*67e74705SXin Li "template parameter has a different kind in template argument">; 3566*67e74705SXin Li 3567*67e74705SXin Lidef err_template_nontype_parm_different_type : Error< 3568*67e74705SXin Li "template non-type parameter has a different type %0 in template " 3569*67e74705SXin Li "%select{|template parameter }1redeclaration">; 3570*67e74705SXin Li 3571*67e74705SXin Lidef note_template_nontype_parm_different_type : Note< 3572*67e74705SXin Li "template non-type parameter has a different type %0 in template argument">; 3573*67e74705SXin Lidef note_template_nontype_parm_prev_declaration : Note< 3574*67e74705SXin Li "previous non-type template parameter with type %0 is here">; 3575*67e74705SXin Lidef err_template_nontype_parm_bad_type : Error< 3576*67e74705SXin Li "a non-type template parameter cannot have type %0">; 3577*67e74705SXin Lidef err_template_param_default_arg_redefinition : Error< 3578*67e74705SXin Li "template parameter redefines default argument">; 3579*67e74705SXin Lidef note_template_param_prev_default_arg : Note< 3580*67e74705SXin Li "previous default template argument defined here">; 3581*67e74705SXin Lidef err_template_param_default_arg_missing : Error< 3582*67e74705SXin Li "template parameter missing a default argument">; 3583*67e74705SXin Lidef ext_template_parameter_default_in_function_template : ExtWarn< 3584*67e74705SXin Li "default template arguments for a function template are a C++11 extension">, 3585*67e74705SXin Li InGroup<CXX11>; 3586*67e74705SXin Lidef warn_cxx98_compat_template_parameter_default_in_function_template : Warning< 3587*67e74705SXin Li "default template arguments for a function template are incompatible with C++98">, 3588*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 3589*67e74705SXin Lidef err_template_parameter_default_template_member : Error< 3590*67e74705SXin Li "cannot add a default template argument to the definition of a member of a " 3591*67e74705SXin Li "class template">; 3592*67e74705SXin Lidef err_template_parameter_default_friend_template : Error< 3593*67e74705SXin Li "default template argument not permitted on a friend template">; 3594*67e74705SXin Lidef err_template_template_parm_no_parms : Error< 3595*67e74705SXin Li "template template parameter must have its own template parameters">; 3596*67e74705SXin Li 3597*67e74705SXin Lidef ext_variable_template : ExtWarn<"variable templates are a C++14 extension">, 3598*67e74705SXin Li InGroup<CXX14>; 3599*67e74705SXin Lidef warn_cxx11_compat_variable_template : Warning< 3600*67e74705SXin Li "variable templates are incompatible with C++ standards before C++14">, 3601*67e74705SXin Li InGroup<CXXPre14Compat>, DefaultIgnore; 3602*67e74705SXin Lidef err_template_variable_noparams : Error< 3603*67e74705SXin Li "extraneous 'template<>' in declaration of variable %0">; 3604*67e74705SXin Lidef err_template_member : Error<"member %0 declared as a template">; 3605*67e74705SXin Lidef err_template_member_noparams : Error< 3606*67e74705SXin Li "extraneous 'template<>' in declaration of member %0">; 3607*67e74705SXin Lidef err_template_tag_noparams : Error< 3608*67e74705SXin Li "extraneous 'template<>' in declaration of %0 %1">; 3609*67e74705SXin Lidef err_template_decl_ref : Error< 3610*67e74705SXin Li "cannot refer to %select{class|variable}0 template %1 without a template argument list">; 3611*67e74705SXin Li 3612*67e74705SXin Li// C++ Template Argument Lists 3613*67e74705SXin Lidef err_template_missing_args : Error< 3614*67e74705SXin Li "use of class template %0 requires template arguments">; 3615*67e74705SXin Lidef err_template_arg_list_different_arity : Error< 3616*67e74705SXin Li "%select{too few|too many}0 template arguments for " 3617*67e74705SXin Li "%select{class template|function template|template template parameter" 3618*67e74705SXin Li "|template}1 %2">; 3619*67e74705SXin Lidef note_template_decl_here : Note<"template is declared here">; 3620*67e74705SXin Lidef err_template_arg_must_be_type : Error< 3621*67e74705SXin Li "template argument for template type parameter must be a type">; 3622*67e74705SXin Lidef err_template_arg_must_be_type_suggest : Error< 3623*67e74705SXin Li "template argument for template type parameter must be a type; " 3624*67e74705SXin Li "did you forget 'typename'?">; 3625*67e74705SXin Lidef ext_ms_template_type_arg_missing_typename : ExtWarn< 3626*67e74705SXin Li "template argument for template type parameter must be a type; " 3627*67e74705SXin Li "omitted 'typename' is a Microsoft extension">, 3628*67e74705SXin Li InGroup<MicrosoftTemplate>; 3629*67e74705SXin Lidef err_template_arg_must_be_expr : Error< 3630*67e74705SXin Li "template argument for non-type template parameter must be an expression">; 3631*67e74705SXin Lidef err_template_arg_nontype_ambig : Error< 3632*67e74705SXin Li "template argument for non-type template parameter is treated as function type %0">; 3633*67e74705SXin Lidef err_template_arg_must_be_template : Error< 3634*67e74705SXin Li "template argument for template template parameter must be a class template%select{| or type alias template}0">; 3635*67e74705SXin Lidef ext_template_arg_local_type : ExtWarn< 3636*67e74705SXin Li "template argument uses local type %0">, InGroup<LocalTypeTemplateArgs>; 3637*67e74705SXin Lidef ext_template_arg_unnamed_type : ExtWarn< 3638*67e74705SXin Li "template argument uses unnamed type">, InGroup<UnnamedTypeTemplateArgs>; 3639*67e74705SXin Lidef warn_cxx98_compat_template_arg_local_type : Warning< 3640*67e74705SXin Li "local type %0 as template argument is incompatible with C++98">, 3641*67e74705SXin Li InGroup<CXX98CompatLocalTypeTemplateArgs>, DefaultIgnore; 3642*67e74705SXin Lidef warn_cxx98_compat_template_arg_unnamed_type : Warning< 3643*67e74705SXin Li "unnamed type as template argument is incompatible with C++98">, 3644*67e74705SXin Li InGroup<CXX98CompatUnnamedTypeTemplateArgs>, DefaultIgnore; 3645*67e74705SXin Lidef note_template_unnamed_type_here : Note< 3646*67e74705SXin Li "unnamed type used in template argument was declared here">; 3647*67e74705SXin Lidef err_template_arg_overload_type : Error< 3648*67e74705SXin Li "template argument is the type of an unresolved overloaded function">; 3649*67e74705SXin Lidef err_template_arg_not_valid_template : Error< 3650*67e74705SXin Li "template argument does not refer to a class or alias template, or template " 3651*67e74705SXin Li "template parameter">; 3652*67e74705SXin Lidef note_template_arg_refers_here_func : Note< 3653*67e74705SXin Li "template argument refers to function template %0, here">; 3654*67e74705SXin Lidef err_template_arg_template_params_mismatch : Error< 3655*67e74705SXin Li "template template argument has different template parameters than its " 3656*67e74705SXin Li "corresponding template template parameter">; 3657*67e74705SXin Lidef err_template_arg_not_integral_or_enumeral : Error< 3658*67e74705SXin Li "non-type template argument of type %0 must have an integral or enumeration" 3659*67e74705SXin Li " type">; 3660*67e74705SXin Lidef err_template_arg_not_ice : Error< 3661*67e74705SXin Li "non-type template argument of type %0 is not an integral constant " 3662*67e74705SXin Li "expression">; 3663*67e74705SXin Lidef err_template_arg_not_address_constant : Error< 3664*67e74705SXin Li "non-type template argument of type %0 is not a constant expression">; 3665*67e74705SXin Lidef warn_cxx98_compat_template_arg_null : Warning< 3666*67e74705SXin Li "use of null pointer as non-type template argument is incompatible with " 3667*67e74705SXin Li "C++98">, InGroup<CXX98Compat>, DefaultIgnore; 3668*67e74705SXin Lidef err_template_arg_untyped_null_constant : Error< 3669*67e74705SXin Li "null non-type template argument must be cast to template parameter type %0">; 3670*67e74705SXin Lidef err_template_arg_wrongtype_null_constant : Error< 3671*67e74705SXin Li "null non-type template argument of type %0 does not match template parameter " 3672*67e74705SXin Li "of type %1">; 3673*67e74705SXin Lidef err_deduced_non_type_template_arg_type_mismatch : Error< 3674*67e74705SXin Li "deduced non-type template argument does not have the same type as the " 3675*67e74705SXin Li "its corresponding template parameter%diff{ ($ vs $)|}0,1">; 3676*67e74705SXin Lidef err_non_type_template_arg_subobject : Error< 3677*67e74705SXin Li "non-type template argument refers to subobject '%0'">; 3678*67e74705SXin Lidef err_non_type_template_arg_addr_label_diff : Error< 3679*67e74705SXin Li "template argument / label address difference / what did you expect?">; 3680*67e74705SXin Lidef err_template_arg_not_convertible : Error< 3681*67e74705SXin Li "non-type template argument of type %0 cannot be converted to a value " 3682*67e74705SXin Li "of type %1">; 3683*67e74705SXin Lidef warn_template_arg_negative : Warning< 3684*67e74705SXin Li "non-type template argument with value '%0' converted to '%1' for unsigned " 3685*67e74705SXin Li "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore; 3686*67e74705SXin Lidef warn_template_arg_too_large : Warning< 3687*67e74705SXin Li "non-type template argument value '%0' truncated to '%1' for " 3688*67e74705SXin Li "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore; 3689*67e74705SXin Lidef err_template_arg_no_ref_bind : Error< 3690*67e74705SXin Li "non-type template parameter of reference type " 3691*67e74705SXin Li "%diff{$ cannot bind to template argument of type $" 3692*67e74705SXin Li "|cannot bind to template of incompatible argument type}0,1">; 3693*67e74705SXin Lidef err_template_arg_ref_bind_ignores_quals : Error< 3694*67e74705SXin Li "reference binding of non-type template parameter " 3695*67e74705SXin Li "%diff{of type $ to template argument of type $|to template argument}0,1 " 3696*67e74705SXin Li "ignores qualifiers">; 3697*67e74705SXin Lidef err_template_arg_not_decl_ref : Error< 3698*67e74705SXin Li "non-type template argument does not refer to any declaration">; 3699*67e74705SXin Lidef err_template_arg_not_address_of : Error< 3700*67e74705SXin Li "non-type template argument for template parameter of pointer type %0 must " 3701*67e74705SXin Li "have its address taken">; 3702*67e74705SXin Lidef err_template_arg_address_of_non_pointer : Error< 3703*67e74705SXin Li "address taken in non-type template argument for template parameter of " 3704*67e74705SXin Li "reference type %0">; 3705*67e74705SXin Lidef err_template_arg_reference_var : Error< 3706*67e74705SXin Li "non-type template argument of reference type %0 is not an object">; 3707*67e74705SXin Lidef err_template_arg_field : Error< 3708*67e74705SXin Li "non-type template argument refers to non-static data member %0">; 3709*67e74705SXin Lidef err_template_arg_method : Error< 3710*67e74705SXin Li "non-type template argument refers to non-static member function %0">; 3711*67e74705SXin Lidef err_template_arg_object_no_linkage : Error< 3712*67e74705SXin Li "non-type template argument refers to %select{function|object}0 %1 that " 3713*67e74705SXin Li "does not have linkage">; 3714*67e74705SXin Lidef warn_cxx98_compat_template_arg_object_internal : Warning< 3715*67e74705SXin Li "non-type template argument referring to %select{function|object}0 %1 with " 3716*67e74705SXin Li "internal linkage is incompatible with C++98">, 3717*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 3718*67e74705SXin Lidef ext_template_arg_object_internal : ExtWarn< 3719*67e74705SXin Li "non-type template argument referring to %select{function|object}0 %1 with " 3720*67e74705SXin Li "internal linkage is a C++11 extension">, InGroup<CXX11>; 3721*67e74705SXin Lidef err_template_arg_thread_local : Error< 3722*67e74705SXin Li "non-type template argument refers to thread-local object">; 3723*67e74705SXin Lidef note_template_arg_internal_object : Note< 3724*67e74705SXin Li "non-type template argument refers to %select{function|object}0 here">; 3725*67e74705SXin Lidef note_template_arg_refers_here : Note< 3726*67e74705SXin Li "non-type template argument refers here">; 3727*67e74705SXin Lidef err_template_arg_not_object_or_func : Error< 3728*67e74705SXin Li "non-type template argument does not refer to an object or function">; 3729*67e74705SXin Lidef err_template_arg_not_pointer_to_member_form : Error< 3730*67e74705SXin Li "non-type template argument is not a pointer to member constant">; 3731*67e74705SXin Lidef err_template_arg_member_ptr_base_derived_not_supported : Error< 3732*67e74705SXin Li "sorry, non-type template argument of pointer-to-member type %1 that refers " 3733*67e74705SXin Li "to member %q0 of a different class is not supported yet">; 3734*67e74705SXin Lidef ext_template_arg_extra_parens : ExtWarn< 3735*67e74705SXin Li "address non-type template argument cannot be surrounded by parentheses">; 3736*67e74705SXin Lidef warn_cxx98_compat_template_arg_extra_parens : Warning< 3737*67e74705SXin Li "redundant parentheses surrounding address non-type template argument are " 3738*67e74705SXin Li "incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 3739*67e74705SXin Lidef err_pointer_to_member_type : Error< 3740*67e74705SXin Li "invalid use of pointer to member type after %select{.*|->*}0">; 3741*67e74705SXin Lidef err_pointer_to_member_call_drops_quals : Error< 3742*67e74705SXin Li "call to pointer to member function of type %0 drops '%1' qualifier%s2">; 3743*67e74705SXin Lidef err_pointer_to_member_oper_value_classify: Error< 3744*67e74705SXin Li "pointer-to-member function type %0 can only be called on an " 3745*67e74705SXin Li "%select{rvalue|lvalue}1">; 3746*67e74705SXin Lidef ext_ms_deref_template_argument: ExtWarn< 3747*67e74705SXin Li "non-type template argument containing a dereference operation is a " 3748*67e74705SXin Li "Microsoft extension">, InGroup<MicrosoftTemplate>; 3749*67e74705SXin Lidef ext_ms_delayed_template_argument: ExtWarn< 3750*67e74705SXin Li "using the undeclared type %0 as a default template argument is a " 3751*67e74705SXin Li "Microsoft extension">, InGroup<MicrosoftTemplate>; 3752*67e74705SXin Li 3753*67e74705SXin Li// C++ template specialization 3754*67e74705SXin Lidef err_template_spec_unknown_kind : Error< 3755*67e74705SXin Li "can only provide an explicit specialization for a class template, function " 3756*67e74705SXin Li "template, variable template, or a member function, static data member, " 3757*67e74705SXin Li "%select{or member class|member class, or member enumeration}0 of a " 3758*67e74705SXin Li "class template">; 3759*67e74705SXin Lidef note_specialized_entity : Note< 3760*67e74705SXin Li "explicitly specialized declaration is here">; 3761*67e74705SXin Lidef note_explicit_specialization_declared_here : Note< 3762*67e74705SXin Li "explicit specialization declared here">; 3763*67e74705SXin Lidef err_template_spec_decl_function_scope : Error< 3764*67e74705SXin Li "explicit specialization of %0 in function scope">; 3765*67e74705SXin Lidef err_template_spec_decl_class_scope : Error< 3766*67e74705SXin Li "explicit specialization of %0 in class scope">; 3767*67e74705SXin Lidef err_template_spec_decl_friend : Error< 3768*67e74705SXin Li "cannot declare an explicit specialization in a friend">; 3769*67e74705SXin Lidef err_template_spec_decl_out_of_scope_global : Error< 3770*67e74705SXin Li "%select{class template|class template partial|variable template|" 3771*67e74705SXin Li "variable template partial|function template|member function|" 3772*67e74705SXin Li "static data member|member class|member enumeration}0 " 3773*67e74705SXin Li "specialization of %1 must originally be declared in the global scope">; 3774*67e74705SXin Lidef err_template_spec_decl_out_of_scope : Error< 3775*67e74705SXin Li "%select{class template|class template partial|variable template|" 3776*67e74705SXin Li "variable template partial|function template|member " 3777*67e74705SXin Li "function|static data member|member class|member enumeration}0 " 3778*67e74705SXin Li "specialization of %1 must originally be declared in namespace %2">; 3779*67e74705SXin Lidef ext_template_spec_decl_out_of_scope : ExtWarn< 3780*67e74705SXin Li "first declaration of %select{class template|class template partial|" 3781*67e74705SXin Li "variable template|variable template partial|" 3782*67e74705SXin Li "function template|member function|static data member|member class|" 3783*67e74705SXin Li "member enumeration}0 specialization of %1 outside namespace %2 is a " 3784*67e74705SXin Li "C++11 extension">, InGroup<CXX11>; 3785*67e74705SXin Lidef warn_cxx98_compat_template_spec_decl_out_of_scope : Warning< 3786*67e74705SXin Li "%select{class template|class template partial|variable template|" 3787*67e74705SXin Li "variable template partial|function template|member " 3788*67e74705SXin Li "function|static data member|member class|member enumeration}0 " 3789*67e74705SXin Li "specialization of %1 outside namespace %2 is incompatible with C++98">, 3790*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 3791*67e74705SXin Lidef err_template_spec_redecl_out_of_scope : Error< 3792*67e74705SXin Li "%select{class template|class template partial|variable template|" 3793*67e74705SXin Li "variable template partial|function template|member " 3794*67e74705SXin Li "function|static data member|member class|member enumeration}0 " 3795*67e74705SXin Li "specialization of %1 not in a namespace enclosing %2">; 3796*67e74705SXin Lidef ext_ms_template_spec_redecl_out_of_scope: ExtWarn< 3797*67e74705SXin Li "%select{class template|class template partial|variable template|" 3798*67e74705SXin Li "variable template partial|function template|member " 3799*67e74705SXin Li "function|static data member|member class|member enumeration}0 " 3800*67e74705SXin Li "specialization of %1 outside namespace enclosing %2 " 3801*67e74705SXin Li "is a Microsoft extension">, InGroup<MicrosoftTemplate>; 3802*67e74705SXin Lidef err_template_spec_redecl_global_scope : Error< 3803*67e74705SXin Li "%select{class template|class template partial|variable template|" 3804*67e74705SXin Li "variable template partial|function template|member " 3805*67e74705SXin Li "function|static data member|member class|member enumeration}0 " 3806*67e74705SXin Li "specialization of %1 must occur at global scope">; 3807*67e74705SXin Lidef err_spec_member_not_instantiated : Error< 3808*67e74705SXin Li "specialization of member %q0 does not specialize an instantiated member">; 3809*67e74705SXin Lidef note_specialized_decl : Note<"attempt to specialize declaration here">; 3810*67e74705SXin Lidef err_specialization_after_instantiation : Error< 3811*67e74705SXin Li "explicit specialization of %0 after instantiation">; 3812*67e74705SXin Lidef note_instantiation_required_here : Note< 3813*67e74705SXin Li "%select{implicit|explicit}0 instantiation first required here">; 3814*67e74705SXin Lidef err_template_spec_friend : Error< 3815*67e74705SXin Li "template specialization declaration cannot be a friend">; 3816*67e74705SXin Lidef err_template_spec_default_arg : Error< 3817*67e74705SXin Li "default argument not permitted on an explicit " 3818*67e74705SXin Li "%select{instantiation|specialization}0 of function %1">; 3819*67e74705SXin Lidef err_not_class_template_specialization : Error< 3820*67e74705SXin Li "cannot specialize a %select{dependent template|template template " 3821*67e74705SXin Li "parameter}0">; 3822*67e74705SXin Lidef err_function_specialization_in_class : Error< 3823*67e74705SXin Li "cannot specialize a function %0 within class scope">; 3824*67e74705SXin Lidef ext_function_specialization_in_class : ExtWarn< 3825*67e74705SXin Li "explicit specialization of %0 within class scope is a Microsoft extension">, 3826*67e74705SXin Li InGroup<MicrosoftTemplate>; 3827*67e74705SXin Lidef ext_explicit_specialization_storage_class : ExtWarn< 3828*67e74705SXin Li "explicit specialization cannot have a storage class">; 3829*67e74705SXin Lidef err_explicit_specialization_inconsistent_storage_class : Error< 3830*67e74705SXin Li "explicit specialization has extraneous, inconsistent storage class " 3831*67e74705SXin Li "'%select{none|extern|static|__private_extern__|auto|register}0'">; 3832*67e74705SXin Li 3833*67e74705SXin Li// C++ class template specializations and out-of-line definitions 3834*67e74705SXin Lidef err_template_spec_needs_header : Error< 3835*67e74705SXin Li "template specialization requires 'template<>'">; 3836*67e74705SXin Lidef err_template_spec_needs_template_parameters : Error< 3837*67e74705SXin Li "template specialization or definition requires a template parameter list " 3838*67e74705SXin Li "corresponding to the nested type %0">; 3839*67e74705SXin Lidef err_template_param_list_matches_nontemplate : Error< 3840*67e74705SXin Li "template parameter list matching the non-templated nested type %0 should " 3841*67e74705SXin Li "be empty ('template<>')">; 3842*67e74705SXin Lidef err_alias_template_extra_headers : Error< 3843*67e74705SXin Li "extraneous template parameter list in alias template declaration">; 3844*67e74705SXin Lidef err_template_spec_extra_headers : Error< 3845*67e74705SXin Li "extraneous template parameter list in template specialization or " 3846*67e74705SXin Li "out-of-line template definition">; 3847*67e74705SXin Lidef warn_template_spec_extra_headers : Warning< 3848*67e74705SXin Li "extraneous template parameter list in template specialization">; 3849*67e74705SXin Lidef note_explicit_template_spec_does_not_need_header : Note< 3850*67e74705SXin Li "'template<>' header not required for explicitly-specialized class %0 " 3851*67e74705SXin Li "declared here">; 3852*67e74705SXin Lidef err_template_qualified_declarator_no_match : Error< 3853*67e74705SXin Li "nested name specifier '%0' for declaration does not refer into a class, " 3854*67e74705SXin Li "class template or class template partial specialization">; 3855*67e74705SXin Lidef err_specialize_member_of_template : Error< 3856*67e74705SXin Li "cannot specialize %select{|(with 'template<>') }0a member of an " 3857*67e74705SXin Li "unspecialized template">; 3858*67e74705SXin Li 3859*67e74705SXin Li// C++ Class Template Partial Specialization 3860*67e74705SXin Lidef err_default_arg_in_partial_spec : Error< 3861*67e74705SXin Li "default template argument in a class template partial specialization">; 3862*67e74705SXin Lidef err_dependent_non_type_arg_in_partial_spec : Error< 3863*67e74705SXin Li "non-type template argument depends on a template parameter of the " 3864*67e74705SXin Li "partial specialization">; 3865*67e74705SXin Lidef note_dependent_non_type_default_arg_in_partial_spec : Note< 3866*67e74705SXin Li "template parameter is used in default argument declared here">; 3867*67e74705SXin Lidef err_dependent_typed_non_type_arg_in_partial_spec : Error< 3868*67e74705SXin Li "non-type template argument specializes a template parameter with " 3869*67e74705SXin Li "dependent type %0">; 3870*67e74705SXin Lidef err_partial_spec_args_match_primary_template : Error< 3871*67e74705SXin Li "%select{class|variable}0 template partial specialization does not " 3872*67e74705SXin Li "specialize any template argument; to %select{declare|define}1 the " 3873*67e74705SXin Li "primary template, remove the template argument list">; 3874*67e74705SXin Lidef warn_partial_specs_not_deducible : Warning< 3875*67e74705SXin Li "%select{class|variable}0 template partial specialization contains " 3876*67e74705SXin Li "%select{a template parameter|template parameters}1 that cannot be " 3877*67e74705SXin Li "deduced; this partial specialization will never be used">; 3878*67e74705SXin Lidef note_partial_spec_unused_parameter : Note< 3879*67e74705SXin Li "non-deducible template parameter %0">; 3880*67e74705SXin Lidef err_partial_spec_ordering_ambiguous : Error< 3881*67e74705SXin Li "ambiguous partial specializations of %0">; 3882*67e74705SXin Lidef note_partial_spec_match : Note<"partial specialization matches %0">; 3883*67e74705SXin Lidef err_partial_spec_redeclared : Error< 3884*67e74705SXin Li "class template partial specialization %0 cannot be redeclared">; 3885*67e74705SXin Lidef note_partial_specialization_declared_here : Note< 3886*67e74705SXin Li "explicit specialization declared here">; 3887*67e74705SXin Lidef note_prev_partial_spec_here : Note< 3888*67e74705SXin Li "previous declaration of class template partial specialization %0 is here">; 3889*67e74705SXin Lidef err_partial_spec_fully_specialized : Error< 3890*67e74705SXin Li "partial specialization of %0 does not use any of its template parameters">; 3891*67e74705SXin Li 3892*67e74705SXin Li// C++ Variable Template Partial Specialization 3893*67e74705SXin Lidef err_var_partial_spec_redeclared : Error< 3894*67e74705SXin Li "variable template partial specialization %0 cannot be redefined">; 3895*67e74705SXin Lidef note_var_prev_partial_spec_here : Note< 3896*67e74705SXin Li "previous declaration of variable template partial specialization is here">; 3897*67e74705SXin Lidef err_var_spec_no_template : Error< 3898*67e74705SXin Li "no variable template matches%select{| partial}0 specialization">; 3899*67e74705SXin Lidef err_var_spec_no_template_but_method : Error< 3900*67e74705SXin Li "no variable template matches specialization; " 3901*67e74705SXin Li "did you mean to use %0 as function template instead?">; 3902*67e74705SXin Li 3903*67e74705SXin Li// C++ Function template specializations 3904*67e74705SXin Lidef err_function_template_spec_no_match : Error< 3905*67e74705SXin Li "no function template matches function template specialization %0">; 3906*67e74705SXin Lidef err_function_template_spec_ambiguous : Error< 3907*67e74705SXin Li "function template specialization %0 ambiguously refers to more than one " 3908*67e74705SXin Li "function template; explicitly specify%select{| additional}1 template " 3909*67e74705SXin Li "arguments to identify a particular function template">; 3910*67e74705SXin Lidef note_function_template_spec_matched : Note< 3911*67e74705SXin Li "function template matches specialization %0">; 3912*67e74705SXin Lidef err_function_template_partial_spec : Error< 3913*67e74705SXin Li "function template partial specialization is not allowed">; 3914*67e74705SXin Li 3915*67e74705SXin Li// C++ Template Instantiation 3916*67e74705SXin Lidef err_template_recursion_depth_exceeded : Error< 3917*67e74705SXin Li "recursive template instantiation exceeded maximum depth of %0">, 3918*67e74705SXin Li DefaultFatal, NoSFINAE; 3919*67e74705SXin Lidef note_template_recursion_depth : Note< 3920*67e74705SXin Li "use -ftemplate-depth=N to increase recursive template instantiation depth">; 3921*67e74705SXin Li 3922*67e74705SXin Lidef err_template_instantiate_within_definition : Error< 3923*67e74705SXin Li "%select{implicit|explicit}0 instantiation of template %1 within its" 3924*67e74705SXin Li " own definition">; 3925*67e74705SXin Lidef err_template_instantiate_undefined : Error< 3926*67e74705SXin Li "%select{implicit|explicit}0 instantiation of undefined template %1">; 3927*67e74705SXin Lidef err_implicit_instantiate_member_undefined : Error< 3928*67e74705SXin Li "implicit instantiation of undefined member %0">; 3929*67e74705SXin Lidef note_template_class_instantiation_was_here : Note< 3930*67e74705SXin Li "class template %0 was instantiated here">; 3931*67e74705SXin Lidef note_template_class_explicit_specialization_was_here : Note< 3932*67e74705SXin Li "class template %0 was explicitly specialized here">; 3933*67e74705SXin Lidef note_template_class_instantiation_here : Note< 3934*67e74705SXin Li "in instantiation of template class %0 requested here">; 3935*67e74705SXin Lidef note_template_member_class_here : Note< 3936*67e74705SXin Li "in instantiation of member class %0 requested here">; 3937*67e74705SXin Lidef note_template_member_function_here : Note< 3938*67e74705SXin Li "in instantiation of member function %q0 requested here">; 3939*67e74705SXin Lidef note_function_template_spec_here : Note< 3940*67e74705SXin Li "in instantiation of function template specialization %q0 requested here">; 3941*67e74705SXin Lidef note_template_static_data_member_def_here : Note< 3942*67e74705SXin Li "in instantiation of static data member %q0 requested here">; 3943*67e74705SXin Lidef note_template_variable_def_here : Note< 3944*67e74705SXin Li "in instantiation of variable template specialization %q0 requested here">; 3945*67e74705SXin Lidef note_template_enum_def_here : Note< 3946*67e74705SXin Li "in instantiation of enumeration %q0 requested here">; 3947*67e74705SXin Lidef note_template_nsdmi_here : Note< 3948*67e74705SXin Li "in instantiation of default member initializer %q0 requested here">; 3949*67e74705SXin Lidef note_template_type_alias_instantiation_here : Note< 3950*67e74705SXin Li "in instantiation of template type alias %0 requested here">; 3951*67e74705SXin Lidef note_template_exception_spec_instantiation_here : Note< 3952*67e74705SXin Li "in instantiation of exception specification for %0 requested here">; 3953*67e74705SXin Lidef warn_var_template_missing : Warning<"instantiation of variable %q0 " 3954*67e74705SXin Li "required here, but no definition is available">, 3955*67e74705SXin Li InGroup<UndefinedVarTemplate>; 3956*67e74705SXin Lidef warn_func_template_missing : Warning<"instantiation of function %q0 " 3957*67e74705SXin Li "required here, but no definition is available">, 3958*67e74705SXin Li InGroup<UndefinedFuncTemplate>, DefaultIgnore; 3959*67e74705SXin Lidef note_forward_template_decl : Note< 3960*67e74705SXin Li "forward declaration of template entity is here">; 3961*67e74705SXin Lidef note_inst_declaration_hint : Note<"add an explicit instantiation " 3962*67e74705SXin Li "declaration to suppress this warning if %q0 is explicitly instantiated in " 3963*67e74705SXin Li "another translation unit">; 3964*67e74705SXin Li 3965*67e74705SXin Lidef note_default_arg_instantiation_here : Note< 3966*67e74705SXin Li "in instantiation of default argument for '%0' required here">; 3967*67e74705SXin Lidef note_default_function_arg_instantiation_here : Note< 3968*67e74705SXin Li "in instantiation of default function argument expression " 3969*67e74705SXin Li "for '%0' required here">; 3970*67e74705SXin Lidef note_explicit_template_arg_substitution_here : Note< 3971*67e74705SXin Li "while substituting explicitly-specified template arguments into function " 3972*67e74705SXin Li "template %0 %1">; 3973*67e74705SXin Lidef note_function_template_deduction_instantiation_here : Note< 3974*67e74705SXin Li "while substituting deduced template arguments into function template %0 " 3975*67e74705SXin Li "%1">; 3976*67e74705SXin Lidef note_partial_spec_deduct_instantiation_here : Note< 3977*67e74705SXin Li "during template argument deduction for class template partial " 3978*67e74705SXin Li "specialization %0 %1">; 3979*67e74705SXin Lidef note_prior_template_arg_substitution : Note< 3980*67e74705SXin Li "while substituting prior template arguments into %select{non-type|template}0" 3981*67e74705SXin Li " template parameter%1 %2">; 3982*67e74705SXin Lidef note_template_default_arg_checking : Note< 3983*67e74705SXin Li "while checking a default template argument used here">; 3984*67e74705SXin Lidef note_instantiation_contexts_suppressed : Note< 3985*67e74705SXin Li "(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to " 3986*67e74705SXin Li "see all)">; 3987*67e74705SXin Li 3988*67e74705SXin Lidef err_field_instantiates_to_function : Error< 3989*67e74705SXin Li "data member instantiated with function type %0">; 3990*67e74705SXin Lidef err_variable_instantiates_to_function : Error< 3991*67e74705SXin Li "%select{variable|static data member}0 instantiated with function type %1">; 3992*67e74705SXin Lidef err_nested_name_spec_non_tag : Error< 3993*67e74705SXin Li "type %0 cannot be used prior to '::' because it has no members">; 3994*67e74705SXin Li 3995*67e74705SXin Li// C++ Explicit Instantiation 3996*67e74705SXin Lidef err_explicit_instantiation_duplicate : Error< 3997*67e74705SXin Li "duplicate explicit instantiation of %0">; 3998*67e74705SXin Lidef ext_explicit_instantiation_duplicate : ExtWarn< 3999*67e74705SXin Li "duplicate explicit instantiation of %0 ignored as a Microsoft extension">, 4000*67e74705SXin Li InGroup<MicrosoftTemplate>; 4001*67e74705SXin Lidef note_previous_explicit_instantiation : Note< 4002*67e74705SXin Li "previous explicit instantiation is here">; 4003*67e74705SXin Lidef ext_explicit_instantiation_after_specialization : Extension< 4004*67e74705SXin Li "explicit instantiation of %0 that occurs after an explicit " 4005*67e74705SXin Li "specialization will be ignored (C++11 extension)">, 4006*67e74705SXin Li InGroup<CXX11>; 4007*67e74705SXin Lidef warn_cxx98_compat_explicit_instantiation_after_specialization : Warning< 4008*67e74705SXin Li "explicit instantiation of %0 that occurs after an explicit " 4009*67e74705SXin Li "specialization is incompatible with C++98">, 4010*67e74705SXin Li InGroup<CXX98CompatPedantic>, DefaultIgnore; 4011*67e74705SXin Lidef note_previous_template_specialization : Note< 4012*67e74705SXin Li "previous template specialization is here">; 4013*67e74705SXin Lidef err_explicit_instantiation_nontemplate_type : Error< 4014*67e74705SXin Li "explicit instantiation of non-templated type %0">; 4015*67e74705SXin Lidef note_nontemplate_decl_here : Note< 4016*67e74705SXin Li "non-templated declaration is here">; 4017*67e74705SXin Lidef err_explicit_instantiation_in_class : Error< 4018*67e74705SXin Li "explicit instantiation of %0 in class scope">; 4019*67e74705SXin Lidef err_explicit_instantiation_out_of_scope : Error< 4020*67e74705SXin Li "explicit instantiation of %0 not in a namespace enclosing %1">; 4021*67e74705SXin Lidef err_explicit_instantiation_must_be_global : Error< 4022*67e74705SXin Li "explicit instantiation of %0 must occur at global scope">; 4023*67e74705SXin Lidef warn_explicit_instantiation_out_of_scope_0x : Warning< 4024*67e74705SXin Li "explicit instantiation of %0 not in a namespace enclosing %1">, 4025*67e74705SXin Li InGroup<CXX11Compat>, DefaultIgnore; 4026*67e74705SXin Lidef warn_explicit_instantiation_must_be_global_0x : Warning< 4027*67e74705SXin Li "explicit instantiation of %0 must occur at global scope">, 4028*67e74705SXin Li InGroup<CXX11Compat>, DefaultIgnore; 4029*67e74705SXin Li 4030*67e74705SXin Lidef err_explicit_instantiation_requires_name : Error< 4031*67e74705SXin Li "explicit instantiation declaration requires a name">; 4032*67e74705SXin Lidef err_explicit_instantiation_of_typedef : Error< 4033*67e74705SXin Li "explicit instantiation of typedef %0">; 4034*67e74705SXin Lidef err_explicit_instantiation_storage_class : Error< 4035*67e74705SXin Li "explicit instantiation cannot have a storage class">; 4036*67e74705SXin Lidef err_explicit_instantiation_not_known : Error< 4037*67e74705SXin Li "explicit instantiation of %0 does not refer to a function template, " 4038*67e74705SXin Li "variable template, member function, member class, or static data member">; 4039*67e74705SXin Lidef note_explicit_instantiation_here : Note< 4040*67e74705SXin Li "explicit instantiation refers here">; 4041*67e74705SXin Lidef err_explicit_instantiation_data_member_not_instantiated : Error< 4042*67e74705SXin Li "explicit instantiation refers to static data member %q0 that is not an " 4043*67e74705SXin Li "instantiation">; 4044*67e74705SXin Lidef err_explicit_instantiation_member_function_not_instantiated : Error< 4045*67e74705SXin Li "explicit instantiation refers to member function %q0 that is not an " 4046*67e74705SXin Li "instantiation">; 4047*67e74705SXin Lidef err_explicit_instantiation_ambiguous : Error< 4048*67e74705SXin Li "partial ordering for explicit instantiation of %0 is ambiguous">; 4049*67e74705SXin Lidef note_explicit_instantiation_candidate : Note< 4050*67e74705SXin Li "explicit instantiation candidate function template here %0">; 4051*67e74705SXin Lidef err_explicit_instantiation_inline : Error< 4052*67e74705SXin Li "explicit instantiation cannot be 'inline'">; 4053*67e74705SXin Lidef warn_explicit_instantiation_inline_0x : Warning< 4054*67e74705SXin Li "explicit instantiation cannot be 'inline'">, InGroup<CXX11Compat>, 4055*67e74705SXin Li DefaultIgnore; 4056*67e74705SXin Lidef err_explicit_instantiation_constexpr : Error< 4057*67e74705SXin Li "explicit instantiation cannot be 'constexpr'">; 4058*67e74705SXin Lidef ext_explicit_instantiation_without_qualified_id : Extension< 4059*67e74705SXin Li "qualifier in explicit instantiation of %q0 requires a template-id " 4060*67e74705SXin Li "(a typedef is not permitted)">; 4061*67e74705SXin Lidef err_explicit_instantiation_without_template_id : Error< 4062*67e74705SXin Li "explicit instantiation of %q0 must specify a template argument list">; 4063*67e74705SXin Lidef err_explicit_instantiation_unqualified_wrong_namespace : Error< 4064*67e74705SXin Li "explicit instantiation of %q0 must occur in namespace %1">; 4065*67e74705SXin Lidef warn_explicit_instantiation_unqualified_wrong_namespace_0x : Warning< 4066*67e74705SXin Li "explicit instantiation of %q0 must occur in namespace %1">, 4067*67e74705SXin Li InGroup<CXX11Compat>, DefaultIgnore; 4068*67e74705SXin Lidef err_explicit_instantiation_undefined_member : Error< 4069*67e74705SXin Li "explicit instantiation of undefined %select{member class|member function|" 4070*67e74705SXin Li "static data member}0 %1 of class template %2">; 4071*67e74705SXin Lidef err_explicit_instantiation_undefined_func_template : Error< 4072*67e74705SXin Li "explicit instantiation of undefined function template %0">; 4073*67e74705SXin Lidef err_explicit_instantiation_undefined_var_template : Error< 4074*67e74705SXin Li "explicit instantiation of undefined variable template %q0">; 4075*67e74705SXin Lidef err_explicit_instantiation_declaration_after_definition : Error< 4076*67e74705SXin Li "explicit instantiation declaration (with 'extern') follows explicit " 4077*67e74705SXin Li "instantiation definition (without 'extern')">; 4078*67e74705SXin Lidef note_explicit_instantiation_definition_here : Note< 4079*67e74705SXin Li "explicit instantiation definition is here">; 4080*67e74705SXin Lidef err_invalid_var_template_spec_type : Error<"type %2 " 4081*67e74705SXin Li "of %select{explicit instantiation|explicit specialization|" 4082*67e74705SXin Li "partial specialization|redeclaration}0 of %1 does not match" 4083*67e74705SXin Li " expected type %3">; 4084*67e74705SXin Lidef err_mismatched_exception_spec_explicit_instantiation : Error< 4085*67e74705SXin Li "exception specification in explicit instantiation does not match " 4086*67e74705SXin Li "instantiated one">; 4087*67e74705SXin Lidef ext_mismatched_exception_spec_explicit_instantiation : ExtWarn< 4088*67e74705SXin Li err_mismatched_exception_spec_explicit_instantiation.Text>, 4089*67e74705SXin Li InGroup<MicrosoftExceptionSpec>; 4090*67e74705SXin Li 4091*67e74705SXin Li// C++ typename-specifiers 4092*67e74705SXin Lidef err_typename_nested_not_found : Error<"no type named %0 in %1">; 4093*67e74705SXin Lidef err_typename_nested_not_found_enable_if : Error< 4094*67e74705SXin Li "no type named 'type' in %0; 'enable_if' cannot be used to disable " 4095*67e74705SXin Li "this declaration">; 4096*67e74705SXin Lidef err_typename_nested_not_type : Error< 4097*67e74705SXin Li "typename specifier refers to non-type member %0 in %1">; 4098*67e74705SXin Lidef note_typename_refers_here : Note< 4099*67e74705SXin Li "referenced member %0 is declared here">; 4100*67e74705SXin Lidef err_typename_missing : Error< 4101*67e74705SXin Li "missing 'typename' prior to dependent type name '%0%1'">; 4102*67e74705SXin Lidef ext_typename_missing : ExtWarn< 4103*67e74705SXin Li "missing 'typename' prior to dependent type name '%0%1'">, 4104*67e74705SXin Li InGroup<DiagGroup<"typename-missing">>; 4105*67e74705SXin Lidef ext_typename_outside_of_template : ExtWarn< 4106*67e74705SXin Li "'typename' occurs outside of a template">, InGroup<CXX11>; 4107*67e74705SXin Lidef warn_cxx98_compat_typename_outside_of_template : Warning< 4108*67e74705SXin Li "use of 'typename' outside of a template is incompatible with C++98">, 4109*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4110*67e74705SXin Lidef err_typename_refers_to_using_value_decl : Error< 4111*67e74705SXin Li "typename specifier refers to a dependent using declaration for a value " 4112*67e74705SXin Li "%0 in %1">; 4113*67e74705SXin Lidef note_using_value_decl_missing_typename : Note< 4114*67e74705SXin Li "add 'typename' to treat this using declaration as a type">; 4115*67e74705SXin Li 4116*67e74705SXin Lidef err_template_kw_refers_to_non_template : Error< 4117*67e74705SXin Li "%0 following the 'template' keyword does not refer to a template">; 4118*67e74705SXin Lidef err_template_kw_refers_to_class_template : Error< 4119*67e74705SXin Li "'%0%1' instantiated to a class template, not a function template">; 4120*67e74705SXin Lidef note_referenced_class_template : Error< 4121*67e74705SXin Li "class template declared here">; 4122*67e74705SXin Lidef err_template_kw_missing : Error< 4123*67e74705SXin Li "missing 'template' keyword prior to dependent template name '%0%1'">; 4124*67e74705SXin Lidef ext_template_outside_of_template : ExtWarn< 4125*67e74705SXin Li "'template' keyword outside of a template">, InGroup<CXX11>; 4126*67e74705SXin Lidef warn_cxx98_compat_template_outside_of_template : Warning< 4127*67e74705SXin Li "use of 'template' keyword outside of a template is incompatible with C++98">, 4128*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4129*67e74705SXin Li 4130*67e74705SXin Lidef err_non_type_template_in_nested_name_specifier : Error< 4131*67e74705SXin Li "qualified name refers into a specialization of %select{function|variable}0 " 4132*67e74705SXin Li "template %1">; 4133*67e74705SXin Lidef err_template_id_not_a_type : Error< 4134*67e74705SXin Li "template name refers to non-type template %0">; 4135*67e74705SXin Lidef note_template_declared_here : Note< 4136*67e74705SXin Li "%select{function template|class template|variable template" 4137*67e74705SXin Li "|type alias template|template template parameter}0 " 4138*67e74705SXin Li "%1 declared here">; 4139*67e74705SXin Lidef err_alias_template_expansion_into_fixed_list : Error< 4140*67e74705SXin Li "pack expansion used as argument for non-pack parameter of alias template">; 4141*67e74705SXin Lidef note_parameter_type : Note< 4142*67e74705SXin Li "parameter of type %0 is declared here">; 4143*67e74705SXin Li 4144*67e74705SXin Li// C++11 Variadic Templates 4145*67e74705SXin Lidef err_template_param_pack_default_arg : Error< 4146*67e74705SXin Li "template parameter pack cannot have a default argument">; 4147*67e74705SXin Lidef err_template_param_pack_must_be_last_template_parameter : Error< 4148*67e74705SXin Li "template parameter pack must be the last template parameter">; 4149*67e74705SXin Li 4150*67e74705SXin Lidef err_template_parameter_pack_non_pack : Error< 4151*67e74705SXin Li "%select{template type|non-type template|template template}0 parameter" 4152*67e74705SXin Li "%select{| pack}1 conflicts with previous %select{template type|" 4153*67e74705SXin Li "non-type template|template template}0 parameter%select{ pack|}1">; 4154*67e74705SXin Lidef note_template_parameter_pack_non_pack : Note< 4155*67e74705SXin Li "%select{template type|non-type template|template template}0 parameter" 4156*67e74705SXin Li "%select{| pack}1 does not match %select{template type|non-type template" 4157*67e74705SXin Li "|template template}0 parameter%select{ pack|}1 in template argument">; 4158*67e74705SXin Lidef note_template_parameter_pack_here : Note< 4159*67e74705SXin Li "previous %select{template type|non-type template|template template}0 " 4160*67e74705SXin Li "parameter%select{| pack}1 declared here">; 4161*67e74705SXin Li 4162*67e74705SXin Lidef err_unexpanded_parameter_pack : Error< 4163*67e74705SXin Li "%select{expression|base type|declaration type|data member type|bit-field " 4164*67e74705SXin Li "size|static assertion|fixed underlying type|enumerator value|" 4165*67e74705SXin Li "using declaration|friend declaration|qualifier|initializer|default argument|" 4166*67e74705SXin Li "non-type template parameter type|exception type|partial specialization|" 4167*67e74705SXin Li "__if_exists name|__if_not_exists name|lambda|block}0 contains" 4168*67e74705SXin Li "%plural{0: an|:}1 unexpanded parameter pack" 4169*67e74705SXin Li "%plural{0:|1: %2|2:s %2 and %3|:s %2, %3, ...}1">; 4170*67e74705SXin Li 4171*67e74705SXin Lidef err_pack_expansion_without_parameter_packs : Error< 4172*67e74705SXin Li "pack expansion does not contain any unexpanded parameter packs">; 4173*67e74705SXin Lidef err_pack_expansion_length_conflict : Error< 4174*67e74705SXin Li "pack expansion contains parameter packs %0 and %1 that have different " 4175*67e74705SXin Li "lengths (%2 vs. %3)">; 4176*67e74705SXin Lidef err_pack_expansion_length_conflict_multilevel : Error< 4177*67e74705SXin Li "pack expansion contains parameter pack %0 that has a different " 4178*67e74705SXin Li "length (%1 vs. %2) from outer parameter packs">; 4179*67e74705SXin Lidef err_pack_expansion_member_init : Error< 4180*67e74705SXin Li "pack expansion for initialization of member %0">; 4181*67e74705SXin Li 4182*67e74705SXin Lidef err_function_parameter_pack_without_parameter_packs : Error< 4183*67e74705SXin Li "type %0 of function parameter pack does not contain any unexpanded " 4184*67e74705SXin Li "parameter packs">; 4185*67e74705SXin Lidef err_ellipsis_in_declarator_not_parameter : Error< 4186*67e74705SXin Li "only function and template parameters can be parameter packs">; 4187*67e74705SXin Li 4188*67e74705SXin Lidef err_sizeof_pack_no_pack_name : Error< 4189*67e74705SXin Li "%0 does not refer to the name of a parameter pack">; 4190*67e74705SXin Li 4191*67e74705SXin Lidef err_fold_expression_packs_both_sides : Error< 4192*67e74705SXin Li "binary fold expression has unexpanded parameter packs in both operands">; 4193*67e74705SXin Lidef err_fold_expression_empty : Error< 4194*67e74705SXin Li "unary fold expression has empty expansion for operator '%0' " 4195*67e74705SXin Li "with no fallback value">; 4196*67e74705SXin Lidef err_fold_expression_bad_operand : Error< 4197*67e74705SXin Li "expression not permitted as operand of fold expression">; 4198*67e74705SXin Li 4199*67e74705SXin Lidef err_unexpected_typedef : Error< 4200*67e74705SXin Li "unexpected type name %0: expected expression">; 4201*67e74705SXin Lidef err_unexpected_namespace : Error< 4202*67e74705SXin Li "unexpected namespace name %0: expected expression">; 4203*67e74705SXin Lidef err_undeclared_var_use : Error<"use of undeclared identifier %0">; 4204*67e74705SXin Lidef ext_undeclared_unqual_id_with_dependent_base : ExtWarn< 4205*67e74705SXin Li "use of undeclared identifier %0; " 4206*67e74705SXin Li "unqualified lookup into dependent bases of class template %1 is a Microsoft extension">, 4207*67e74705SXin Li InGroup<MicrosoftTemplate>; 4208*67e74705SXin Lidef ext_found_via_dependent_bases_lookup : ExtWarn<"use of identifier %0 " 4209*67e74705SXin Li "found via unqualified lookup into dependent bases of class templates is a " 4210*67e74705SXin Li "Microsoft extension">, InGroup<MicrosoftTemplate>; 4211*67e74705SXin Lidef note_dependent_var_use : Note<"must qualify identifier to find this " 4212*67e74705SXin Li "declaration in dependent base class">; 4213*67e74705SXin Lidef err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neither " 4214*67e74705SXin Li "visible in the template definition nor found by argument-dependent lookup">; 4215*67e74705SXin Lidef note_not_found_by_two_phase_lookup : Note<"%0 should be declared prior to the " 4216*67e74705SXin Li "call site%select{| or in %2| or in an associated namespace of one of its arguments}1">; 4217*67e74705SXin Lidef err_undeclared_use : Error<"use of undeclared %0">; 4218*67e74705SXin Lidef warn_partial_availability : Warning<"%0 is only available conditionally">, 4219*67e74705SXin Li InGroup<PartialAvailability>, DefaultIgnore; 4220*67e74705SXin Lidef note_partial_availability_silence : Note< 4221*67e74705SXin Li "explicitly redeclare %0 to silence this warning">; 4222*67e74705SXin Lidef warn_partial_message : Warning<"%0 is partial: %1">, 4223*67e74705SXin Li InGroup<PartialAvailability>, DefaultIgnore; 4224*67e74705SXin Lidef warn_partial_fwdclass_message : Warning< 4225*67e74705SXin Li "%0 may be partial because the receiver type is unknown">, 4226*67e74705SXin Li InGroup<PartialAvailability>, DefaultIgnore; 4227*67e74705SXin Lidef warn_deprecated : Warning<"%0 is deprecated">, 4228*67e74705SXin Li InGroup<DeprecatedDeclarations>; 4229*67e74705SXin Lidef warn_property_method_deprecated : 4230*67e74705SXin Li Warning<"property access is using %0 method which is deprecated">, 4231*67e74705SXin Li InGroup<DeprecatedDeclarations>; 4232*67e74705SXin Lidef warn_deprecated_message : Warning<"%0 is deprecated: %1">, 4233*67e74705SXin Li InGroup<DeprecatedDeclarations>; 4234*67e74705SXin Lidef warn_deprecated_anonymous_namespace : Warning< 4235*67e74705SXin Li "'deprecated' attribute on anonymous namespace ignored">, 4236*67e74705SXin Li InGroup<IgnoredAttributes>; 4237*67e74705SXin Lidef warn_deprecated_fwdclass_message : Warning< 4238*67e74705SXin Li "%0 may be deprecated because the receiver type is unknown">, 4239*67e74705SXin Li InGroup<DeprecatedDeclarations>; 4240*67e74705SXin Lidef warn_deprecated_def : Warning< 4241*67e74705SXin Li "Implementing deprecated %select{method|class|category}0">, 4242*67e74705SXin Li InGroup<DeprecatedImplementations>, DefaultIgnore; 4243*67e74705SXin Lidef err_unavailable : Error<"%0 is unavailable">; 4244*67e74705SXin Lidef err_property_method_unavailable : 4245*67e74705SXin Li Error<"property access is using %0 method which is unavailable">; 4246*67e74705SXin Lidef err_unavailable_message : Error<"%0 is unavailable: %1">; 4247*67e74705SXin Lidef warn_unavailable_fwdclass_message : Warning< 4248*67e74705SXin Li "%0 may be unavailable because the receiver type is unknown">, 4249*67e74705SXin Li InGroup<UnavailableDeclarations>; 4250*67e74705SXin Lidef note_availability_specified_here : Note< 4251*67e74705SXin Li "%0 has been explicitly marked " 4252*67e74705SXin Li "%select{unavailable|deleted|deprecated|partial}1 here">; 4253*67e74705SXin Lidef note_implicitly_deleted : Note< 4254*67e74705SXin Li "explicitly defaulted function was implicitly deleted here">; 4255*67e74705SXin Lidef note_inherited_deleted_here : Note< 4256*67e74705SXin Li "deleted constructor was inherited here">; 4257*67e74705SXin Lidef warn_not_enough_argument : Warning< 4258*67e74705SXin Li "not enough variable arguments in %0 declaration to fit a sentinel">, 4259*67e74705SXin Li InGroup<Sentinel>; 4260*67e74705SXin Lidef warn_missing_sentinel : Warning < 4261*67e74705SXin Li "missing sentinel in %select{function call|method dispatch|block call}0">, 4262*67e74705SXin Li InGroup<Sentinel>; 4263*67e74705SXin Lidef note_sentinel_here : Note< 4264*67e74705SXin Li "%select{function|method|block}0 has been explicitly marked sentinel here">; 4265*67e74705SXin Lidef warn_missing_prototype : Warning< 4266*67e74705SXin Li "no previous prototype for function %0">, 4267*67e74705SXin Li InGroup<DiagGroup<"missing-prototypes">>, DefaultIgnore; 4268*67e74705SXin Lidef note_declaration_not_a_prototype : Note< 4269*67e74705SXin Li "this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">; 4270*67e74705SXin Lidef warn_missing_variable_declarations : Warning< 4271*67e74705SXin Li "no previous extern declaration for non-static variable %0">, 4272*67e74705SXin Li InGroup<DiagGroup<"missing-variable-declarations">>, DefaultIgnore; 4273*67e74705SXin Lidef err_static_data_member_reinitialization : 4274*67e74705SXin Li Error<"static data member %0 already has an initializer">; 4275*67e74705SXin Lidef err_redefinition : Error<"redefinition of %0">; 4276*67e74705SXin Lidef err_alias_after_tentative : 4277*67e74705SXin Li Error<"alias definition of %0 after tentative definition">; 4278*67e74705SXin Lidef err_alias_is_definition : 4279*67e74705SXin Li Error<"definition %0 cannot also be an %select{alias|ifunc}1">; 4280*67e74705SXin Lidef err_definition_of_implicitly_declared_member : Error< 4281*67e74705SXin Li "definition of implicitly declared %select{default constructor|copy " 4282*67e74705SXin Li "constructor|move constructor|copy assignment operator|move assignment " 4283*67e74705SXin Li "operator|destructor|function}1">; 4284*67e74705SXin Lidef err_definition_of_explicitly_defaulted_member : Error< 4285*67e74705SXin Li "definition of explicitly defaulted %select{default constructor|copy " 4286*67e74705SXin Li "constructor|move constructor|copy assignment operator|move assignment " 4287*67e74705SXin Li "operator|destructor}0">; 4288*67e74705SXin Lidef err_redefinition_extern_inline : Error< 4289*67e74705SXin Li "redefinition of a 'extern inline' function %0 is not supported in " 4290*67e74705SXin Li "%select{C99 mode|C++}1">; 4291*67e74705SXin Lidef warn_attr_abi_tag_namespace : Warning< 4292*67e74705SXin Li "'abi_tag' attribute on %select{non-inline|anonymous}0 namespace ignored">, 4293*67e74705SXin Li InGroup<IgnoredAttributes>; 4294*67e74705SXin Lidef err_abi_tag_on_redeclaration : Error< 4295*67e74705SXin Li "cannot add 'abi_tag' attribute in a redeclaration">; 4296*67e74705SXin Lidef err_new_abi_tag_on_redeclaration : Error< 4297*67e74705SXin Li "'abi_tag' %0 missing in original declaration">; 4298*67e74705SXin Li 4299*67e74705SXin Lidef note_deleted_dtor_no_operator_delete : Note< 4300*67e74705SXin Li "virtual destructor requires an unambiguous, accessible 'operator delete'">; 4301*67e74705SXin Lidef note_deleted_special_member_class_subobject : Note< 4302*67e74705SXin Li "%select{default constructor of|copy constructor of|move constructor of|" 4303*67e74705SXin Li "copy assignment operator of|move assignment operator of|destructor of|" 4304*67e74705SXin Li "constructor inherited by}0 " 4305*67e74705SXin Li "%1 is implicitly deleted because " 4306*67e74705SXin Li "%select{base class %3|%select{||||variant }4field %3}2 has " 4307*67e74705SXin Li "%select{no|a deleted|multiple|an inaccessible|a non-trivial}4 " 4308*67e74705SXin Li "%select{%select{default constructor|copy constructor|move constructor|copy " 4309*67e74705SXin Li "assignment operator|move assignment operator|destructor|" 4310*67e74705SXin Li "%select{default|corresponding|default|default|default}4 constructor}0|" 4311*67e74705SXin Li "destructor}5" 4312*67e74705SXin Li "%select{||s||}4">; 4313*67e74705SXin Lidef note_deleted_default_ctor_uninit_field : Note< 4314*67e74705SXin Li "%select{default constructor of|constructor inherited by}0 " 4315*67e74705SXin Li "%1 is implicitly deleted because field %2 of " 4316*67e74705SXin Li "%select{reference|const-qualified}4 type %3 would not be initialized">; 4317*67e74705SXin Lidef note_deleted_default_ctor_all_const : Note< 4318*67e74705SXin Li "%select{default constructor of|constructor inherited by}0 " 4319*67e74705SXin Li "%1 is implicitly deleted because all " 4320*67e74705SXin Li "%select{data members|data members of an anonymous union member}2" 4321*67e74705SXin Li " are const-qualified">; 4322*67e74705SXin Lidef note_deleted_copy_ctor_rvalue_reference : Note< 4323*67e74705SXin Li "copy constructor of %0 is implicitly deleted because field %1 is of " 4324*67e74705SXin Li "rvalue reference type %2">; 4325*67e74705SXin Lidef note_deleted_copy_user_declared_move : Note< 4326*67e74705SXin Li "copy %select{constructor|assignment operator}0 is implicitly deleted because" 4327*67e74705SXin Li " %1 has a user-declared move %select{constructor|assignment operator}2">; 4328*67e74705SXin Lidef note_deleted_assign_field : Note< 4329*67e74705SXin Li "%select{copy|move}0 assignment operator of %1 is implicitly deleted " 4330*67e74705SXin Li "because field %2 is of %select{reference|const-qualified}4 type %3">; 4331*67e74705SXin Li 4332*67e74705SXin Li// These should be errors. 4333*67e74705SXin Lidef warn_undefined_internal : Warning< 4334*67e74705SXin Li "%select{function|variable}0 %q1 has internal linkage but is not defined">, 4335*67e74705SXin Li InGroup<DiagGroup<"undefined-internal">>; 4336*67e74705SXin Lidef warn_undefined_inline : Warning<"inline function %q0 is not defined">, 4337*67e74705SXin Li InGroup<DiagGroup<"undefined-inline">>; 4338*67e74705SXin Lidef err_undefined_inline_var : Error<"inline variable %q0 is not defined">; 4339*67e74705SXin Lidef note_used_here : Note<"used here">; 4340*67e74705SXin Li 4341*67e74705SXin Lidef err_internal_linkage_redeclaration : Error< 4342*67e74705SXin Li "'internal_linkage' attribute does not appear on the first declaration of %0">; 4343*67e74705SXin Lidef warn_internal_linkage_local_storage : Warning< 4344*67e74705SXin Li "'internal_linkage' attribute on a non-static local variable is ignored">, 4345*67e74705SXin Li InGroup<IgnoredAttributes>; 4346*67e74705SXin Li 4347*67e74705SXin Lidef ext_internal_in_extern_inline : ExtWarn< 4348*67e74705SXin Li "static %select{function|variable}0 %1 is used in an inline function with " 4349*67e74705SXin Li "external linkage">, InGroup<StaticInInline>; 4350*67e74705SXin Lidef ext_internal_in_extern_inline_quiet : Extension< 4351*67e74705SXin Li "static %select{function|variable}0 %1 is used in an inline function with " 4352*67e74705SXin Li "external linkage">, InGroup<StaticInInline>; 4353*67e74705SXin Lidef warn_static_local_in_extern_inline : Warning< 4354*67e74705SXin Li "non-constant static local variable in inline function may be different " 4355*67e74705SXin Li "in different files">, InGroup<StaticLocalInInline>; 4356*67e74705SXin Lidef note_convert_inline_to_static : Note< 4357*67e74705SXin Li "use 'static' to give inline function %0 internal linkage">; 4358*67e74705SXin Li 4359*67e74705SXin Lidef ext_redefinition_of_typedef : ExtWarn< 4360*67e74705SXin Li "redefinition of typedef %0 is a C11 feature">, 4361*67e74705SXin Li InGroup<DiagGroup<"typedef-redefinition"> >; 4362*67e74705SXin Lidef err_redefinition_variably_modified_typedef : Error< 4363*67e74705SXin Li "redefinition of %select{typedef|type alias}0 for variably-modified type %1">; 4364*67e74705SXin Li 4365*67e74705SXin Lidef err_inline_decl_follows_def : Error< 4366*67e74705SXin Li "inline declaration of %0 follows non-inline definition">; 4367*67e74705SXin Lidef err_inline_declaration_block_scope : Error< 4368*67e74705SXin Li "inline declaration of %0 not allowed in block scope">; 4369*67e74705SXin Lidef err_static_non_static : Error< 4370*67e74705SXin Li "static declaration of %0 follows non-static declaration">; 4371*67e74705SXin Lidef err_different_language_linkage : Error< 4372*67e74705SXin Li "declaration of %0 has a different language linkage">; 4373*67e74705SXin Lidef ext_retained_language_linkage : Extension< 4374*67e74705SXin Li "friend function %0 retaining previous language linkage is an extension">, 4375*67e74705SXin Li InGroup<DiagGroup<"retained-language-linkage">>; 4376*67e74705SXin Lidef err_extern_c_global_conflict : Error< 4377*67e74705SXin Li "declaration of %1 %select{with C language linkage|in global scope}0 " 4378*67e74705SXin Li "conflicts with declaration %select{in global scope|with C language linkage}0">; 4379*67e74705SXin Lidef note_extern_c_global_conflict : Note< 4380*67e74705SXin Li "declared %select{in global scope|with C language linkage}0 here">; 4381*67e74705SXin Lidef warn_weak_import : Warning < 4382*67e74705SXin Li "an already-declared variable is made a weak_import declaration %0">; 4383*67e74705SXin Lidef ext_static_non_static : Extension< 4384*67e74705SXin Li "redeclaring non-static %0 as static is a Microsoft extension">, 4385*67e74705SXin Li InGroup<MicrosoftRedeclareStatic>; 4386*67e74705SXin Lidef err_non_static_static : Error< 4387*67e74705SXin Li "non-static declaration of %0 follows static declaration">; 4388*67e74705SXin Lidef err_extern_non_extern : Error< 4389*67e74705SXin Li "extern declaration of %0 follows non-extern declaration">; 4390*67e74705SXin Lidef err_non_extern_extern : Error< 4391*67e74705SXin Li "non-extern declaration of %0 follows extern declaration">; 4392*67e74705SXin Lidef err_non_thread_thread : Error< 4393*67e74705SXin Li "non-thread-local declaration of %0 follows thread-local declaration">; 4394*67e74705SXin Lidef err_thread_non_thread : Error< 4395*67e74705SXin Li "thread-local declaration of %0 follows non-thread-local declaration">; 4396*67e74705SXin Lidef err_thread_thread_different_kind : Error< 4397*67e74705SXin Li "thread-local declaration of %0 with %select{static|dynamic}1 initialization " 4398*67e74705SXin Li "follows declaration with %select{dynamic|static}1 initialization">; 4399*67e74705SXin Lidef err_redefinition_different_type : Error< 4400*67e74705SXin Li "redefinition of %0 with a different type%diff{: $ vs $|}1,2">; 4401*67e74705SXin Lidef err_redefinition_different_kind : Error< 4402*67e74705SXin Li "redefinition of %0 as different kind of symbol">; 4403*67e74705SXin Lidef err_redefinition_different_namespace_alias : Error< 4404*67e74705SXin Li "redefinition of %0 as an alias for a different namespace">; 4405*67e74705SXin Lidef note_previous_namespace_alias : Note< 4406*67e74705SXin Li "previously defined as an alias for %0">; 4407*67e74705SXin Lidef warn_forward_class_redefinition : Warning< 4408*67e74705SXin Li "redefinition of forward class %0 of a typedef name of an object type is ignored">, 4409*67e74705SXin Li InGroup<DiagGroup<"objc-forward-class-redefinition">>; 4410*67e74705SXin Lidef err_redefinition_different_typedef : Error< 4411*67e74705SXin Li "%select{typedef|type alias|type alias template}0 " 4412*67e74705SXin Li "redefinition with different types%diff{ ($ vs $)|}1,2">; 4413*67e74705SXin Lidef err_tag_reference_non_tag : Error< 4414*67e74705SXin Li "elaborated type refers to %select{a non-tag type|a typedef|a type alias|a template|a type alias template|a template template argument}0">; 4415*67e74705SXin Lidef err_tag_reference_conflict : Error< 4416*67e74705SXin Li "implicit declaration introduced by elaborated type conflicts with " 4417*67e74705SXin Li "%select{a declaration|a typedef|a type alias|a template}0 of the same name">; 4418*67e74705SXin Lidef err_dependent_tag_decl : Error< 4419*67e74705SXin Li "%select{declaration|definition}0 of " 4420*67e74705SXin Li "%select{struct|interface|union|class|enum}1 in a dependent scope">; 4421*67e74705SXin Lidef err_tag_definition_of_typedef : Error< 4422*67e74705SXin Li "definition of type %0 conflicts with %select{typedef|type alias}1 of the same name">; 4423*67e74705SXin Lidef err_conflicting_types : Error<"conflicting types for %0">; 4424*67e74705SXin Lidef err_different_pass_object_size_params : Error< 4425*67e74705SXin Li "conflicting pass_object_size attributes on parameters">; 4426*67e74705SXin Lidef err_late_asm_label_name : Error< 4427*67e74705SXin Li "cannot apply asm label to %select{variable|function}0 after its first use">; 4428*67e74705SXin Lidef err_different_asm_label : Error<"conflicting asm label">; 4429*67e74705SXin Lidef err_nested_redefinition : Error<"nested redefinition of %0">; 4430*67e74705SXin Lidef err_use_with_wrong_tag : Error< 4431*67e74705SXin Li "use of %0 with tag type that does not match previous declaration">; 4432*67e74705SXin Lidef warn_struct_class_tag_mismatch : Warning< 4433*67e74705SXin Li "%select{struct|interface|class}0%select{| template}1 %2 was previously " 4434*67e74705SXin Li "declared as a %select{struct|interface|class}3%select{| template}1">, 4435*67e74705SXin Li InGroup<MismatchedTags>, DefaultIgnore; 4436*67e74705SXin Lidef warn_struct_class_previous_tag_mismatch : Warning< 4437*67e74705SXin Li "%2 defined as %select{a struct|an interface|a class}0%select{| template}1 " 4438*67e74705SXin Li "here but previously declared as " 4439*67e74705SXin Li "%select{a struct|an interface|a class}3%select{| template}1">, 4440*67e74705SXin Li InGroup<MismatchedTags>, DefaultIgnore; 4441*67e74705SXin Lidef note_struct_class_suggestion : Note< 4442*67e74705SXin Li "did you mean %select{struct|interface|class}0 here?">; 4443*67e74705SXin Lidef ext_forward_ref_enum : Extension< 4444*67e74705SXin Li "ISO C forbids forward references to 'enum' types">; 4445*67e74705SXin Lidef err_forward_ref_enum : Error< 4446*67e74705SXin Li "ISO C++ forbids forward references to 'enum' types">; 4447*67e74705SXin Lidef ext_ms_forward_ref_enum : Extension< 4448*67e74705SXin Li "forward references to 'enum' types are a Microsoft extension">, 4449*67e74705SXin Li InGroup<MicrosoftEnumForwardReference>; 4450*67e74705SXin Lidef ext_forward_ref_enum_def : Extension< 4451*67e74705SXin Li "redeclaration of already-defined enum %0 is a GNU extension">, 4452*67e74705SXin Li InGroup<GNURedeclaredEnum>; 4453*67e74705SXin Li 4454*67e74705SXin Lidef err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">; 4455*67e74705SXin Lidef err_duplicate_member : Error<"duplicate member %0">; 4456*67e74705SXin Lidef err_misplaced_ivar : Error< 4457*67e74705SXin Li "instance variables may not be placed in %select{categories|class extension}0">; 4458*67e74705SXin Lidef warn_ivars_in_interface : Warning< 4459*67e74705SXin Li "declaration of instance variables in the interface is deprecated">, 4460*67e74705SXin Li InGroup<DiagGroup<"objc-interface-ivars">>, DefaultIgnore; 4461*67e74705SXin Lidef ext_enum_value_not_int : Extension< 4462*67e74705SXin Li "ISO C restricts enumerator values to range of 'int' (%0 is too " 4463*67e74705SXin Li "%select{small|large}1)">; 4464*67e74705SXin Lidef ext_enum_too_large : ExtWarn< 4465*67e74705SXin Li "enumeration values exceed range of largest integer">, InGroup<EnumTooLarge>; 4466*67e74705SXin Lidef ext_enumerator_increment_too_large : ExtWarn< 4467*67e74705SXin Li "incremented enumerator value %0 is not representable in the " 4468*67e74705SXin Li "largest integer type">, InGroup<EnumTooLarge>; 4469*67e74705SXin Lidef warn_flag_enum_constant_out_of_range : Warning< 4470*67e74705SXin Li "enumeration value %0 is out of range of flags in enumeration type %1">, 4471*67e74705SXin Li InGroup<FlagEnum>; 4472*67e74705SXin Li 4473*67e74705SXin Lidef warn_illegal_constant_array_size : Extension< 4474*67e74705SXin Li "size of static array must be an integer constant expression">; 4475*67e74705SXin Lidef err_vm_decl_in_file_scope : Error< 4476*67e74705SXin Li "variably modified type declaration not allowed at file scope">; 4477*67e74705SXin Lidef err_vm_decl_has_extern_linkage : Error< 4478*67e74705SXin Li "variably modified type declaration cannot have 'extern' linkage">; 4479*67e74705SXin Lidef err_typecheck_field_variable_size : Error< 4480*67e74705SXin Li "fields must have a constant size: 'variable length array in structure' " 4481*67e74705SXin Li "extension will never be supported">; 4482*67e74705SXin Lidef err_vm_func_decl : Error< 4483*67e74705SXin Li "function declaration cannot have variably modified type">; 4484*67e74705SXin Lidef err_array_too_large : Error< 4485*67e74705SXin Li "array is too large (%0 elements)">; 4486*67e74705SXin Lidef warn_array_new_too_large : Warning<"array is too large (%0 elements)">, 4487*67e74705SXin Li // FIXME PR11644: ", will throw std::bad_array_new_length at runtime" 4488*67e74705SXin Li InGroup<BadArrayNewLength>; 4489*67e74705SXin Li 4490*67e74705SXin Li// -Wpadded, -Wpacked 4491*67e74705SXin Lidef warn_padded_struct_field : Warning< 4492*67e74705SXin Li "padding %select{struct|interface|class}0 %1 with %2 " 4493*67e74705SXin Li "%select{byte|bit}3%s2 to align %4">, 4494*67e74705SXin Li InGroup<Padded>, DefaultIgnore; 4495*67e74705SXin Lidef warn_padded_struct_anon_field : Warning< 4496*67e74705SXin Li "padding %select{struct|interface|class}0 %1 with %2 " 4497*67e74705SXin Li "%select{byte|bit}3%s2 to align anonymous bit-field">, 4498*67e74705SXin Li InGroup<Padded>, DefaultIgnore; 4499*67e74705SXin Lidef warn_padded_struct_size : Warning< 4500*67e74705SXin Li "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">, 4501*67e74705SXin Li InGroup<Padded>, DefaultIgnore; 4502*67e74705SXin Lidef warn_unnecessary_packed : Warning< 4503*67e74705SXin Li "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore; 4504*67e74705SXin Li 4505*67e74705SXin Lidef err_typecheck_negative_array_size : Error<"array size is negative">; 4506*67e74705SXin Lidef warn_typecheck_negative_array_new_size : Warning<"array size is negative">, 4507*67e74705SXin Li // FIXME PR11644: ", will throw std::bad_array_new_length at runtime" 4508*67e74705SXin Li InGroup<BadArrayNewLength>; 4509*67e74705SXin Lidef warn_typecheck_function_qualifiers_ignored : Warning< 4510*67e74705SXin Li "'%0' qualifier on function type %1 has no effect">, 4511*67e74705SXin Li InGroup<IgnoredQualifiers>; 4512*67e74705SXin Lidef warn_typecheck_function_qualifiers_unspecified : Warning< 4513*67e74705SXin Li "'%0' qualifier on function type %1 has unspecified behavior">; 4514*67e74705SXin Lidef warn_typecheck_reference_qualifiers : Warning< 4515*67e74705SXin Li "'%0' qualifier on reference type %1 has no effect">, 4516*67e74705SXin Li InGroup<IgnoredQualifiers>; 4517*67e74705SXin Lidef err_typecheck_invalid_restrict_not_pointer : Error< 4518*67e74705SXin Li "restrict requires a pointer or reference (%0 is invalid)">; 4519*67e74705SXin Lidef err_typecheck_invalid_restrict_not_pointer_noarg : Error< 4520*67e74705SXin Li "restrict requires a pointer or reference">; 4521*67e74705SXin Lidef err_typecheck_invalid_restrict_invalid_pointee : Error< 4522*67e74705SXin Li "pointer to function type %0 may not be 'restrict' qualified">; 4523*67e74705SXin Lidef ext_typecheck_zero_array_size : Extension< 4524*67e74705SXin Li "zero size arrays are an extension">, InGroup<ZeroLengthArray>; 4525*67e74705SXin Lidef err_typecheck_zero_array_size : Error< 4526*67e74705SXin Li "zero-length arrays are not permitted in C++">; 4527*67e74705SXin Lidef warn_typecheck_zero_static_array_size : Warning< 4528*67e74705SXin Li "'static' has no effect on zero-length arrays">, 4529*67e74705SXin Li InGroup<ArrayBounds>; 4530*67e74705SXin Lidef err_array_size_non_int : Error<"size of array has non-integer type %0">; 4531*67e74705SXin Lidef err_init_element_not_constant : Error< 4532*67e74705SXin Li "initializer element is not a compile-time constant">; 4533*67e74705SXin Lidef ext_aggregate_init_not_constant : Extension< 4534*67e74705SXin Li "initializer for aggregate is not a compile-time constant">, InGroup<C99>; 4535*67e74705SXin Lidef err_local_cant_init : Error< 4536*67e74705SXin Li "'__local' variable cannot have an initializer">; 4537*67e74705SXin Lidef err_block_extern_cant_init : Error< 4538*67e74705SXin Li "'extern' variable cannot have an initializer">; 4539*67e74705SXin Lidef warn_extern_init : Warning<"'extern' variable has an initializer">, 4540*67e74705SXin Li InGroup<DiagGroup<"extern-initializer">>; 4541*67e74705SXin Lidef err_variable_object_no_init : Error< 4542*67e74705SXin Li "variable-sized object may not be initialized">; 4543*67e74705SXin Lidef err_excess_initializers : Error< 4544*67e74705SXin Li "excess elements in %select{array|vector|scalar|union|struct}0 initializer">; 4545*67e74705SXin Lidef ext_excess_initializers : ExtWarn< 4546*67e74705SXin Li "excess elements in %select{array|vector|scalar|union|struct}0 initializer">; 4547*67e74705SXin Lidef err_excess_initializers_in_char_array_initializer : Error< 4548*67e74705SXin Li "excess elements in char array initializer">; 4549*67e74705SXin Lidef ext_excess_initializers_in_char_array_initializer : ExtWarn< 4550*67e74705SXin Li "excess elements in char array initializer">; 4551*67e74705SXin Lidef err_initializer_string_for_char_array_too_long : Error< 4552*67e74705SXin Li "initializer-string for char array is too long">; 4553*67e74705SXin Lidef ext_initializer_string_for_char_array_too_long : ExtWarn< 4554*67e74705SXin Li "initializer-string for char array is too long">; 4555*67e74705SXin Lidef warn_missing_field_initializers : Warning< 4556*67e74705SXin Li "missing field %0 initializer">, 4557*67e74705SXin Li InGroup<MissingFieldInitializers>, DefaultIgnore; 4558*67e74705SXin Lidef warn_braces_around_scalar_init : Warning< 4559*67e74705SXin Li "braces around scalar initializer">, InGroup<DiagGroup<"braced-scalar-init">>; 4560*67e74705SXin Lidef ext_many_braces_around_scalar_init : ExtWarn< 4561*67e74705SXin Li "too many braces around scalar initializer">, 4562*67e74705SXin Li InGroup<DiagGroup<"many-braces-around-scalar-init">>; 4563*67e74705SXin Lidef ext_complex_component_init : Extension< 4564*67e74705SXin Li "complex initialization specifying real and imaginary components " 4565*67e74705SXin Li "is an extension">, InGroup<DiagGroup<"complex-component-init">>; 4566*67e74705SXin Lidef err_empty_scalar_initializer : Error<"scalar initializer cannot be empty">; 4567*67e74705SXin Lidef warn_cxx98_compat_empty_scalar_initializer : Warning< 4568*67e74705SXin Li "scalar initialized from empty initializer list is incompatible with C++98">, 4569*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4570*67e74705SXin Lidef warn_cxx98_compat_reference_list_init : Warning< 4571*67e74705SXin Li "reference initialized from initializer list is incompatible with C++98">, 4572*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4573*67e74705SXin Lidef warn_cxx98_compat_initializer_list_init : Warning< 4574*67e74705SXin Li "initialization of initializer_list object is incompatible with C++98">, 4575*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4576*67e74705SXin Lidef warn_cxx98_compat_ctor_list_init : Warning< 4577*67e74705SXin Li "constructor call from initializer list is incompatible with C++98">, 4578*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4579*67e74705SXin Lidef err_illegal_initializer : Error< 4580*67e74705SXin Li "illegal initializer (only variables can be initialized)">; 4581*67e74705SXin Lidef err_illegal_initializer_type : Error<"illegal initializer type %0">; 4582*67e74705SXin Lidef ext_init_list_type_narrowing : ExtWarn< 4583*67e74705SXin Li "type %0 cannot be narrowed to %1 in initializer list">, 4584*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure; 4585*67e74705SXin Lidef ext_init_list_variable_narrowing : ExtWarn< 4586*67e74705SXin Li "non-constant-expression cannot be narrowed from type %0 to %1 in " 4587*67e74705SXin Li "initializer list">, InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure; 4588*67e74705SXin Lidef ext_init_list_constant_narrowing : ExtWarn< 4589*67e74705SXin Li "constant expression evaluates to %0 which cannot be narrowed to type %1">, 4590*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure; 4591*67e74705SXin Lidef warn_init_list_type_narrowing : Warning< 4592*67e74705SXin Li "type %0 cannot be narrowed to %1 in initializer list in C++11">, 4593*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultIgnore; 4594*67e74705SXin Lidef warn_init_list_variable_narrowing : Warning< 4595*67e74705SXin Li "non-constant-expression cannot be narrowed from type %0 to %1 in " 4596*67e74705SXin Li "initializer list in C++11">, 4597*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultIgnore; 4598*67e74705SXin Lidef warn_init_list_constant_narrowing : Warning< 4599*67e74705SXin Li "constant expression evaluates to %0 which cannot be narrowed to type %1 in " 4600*67e74705SXin Li "C++11">, 4601*67e74705SXin Li InGroup<CXX11Narrowing>, DefaultIgnore; 4602*67e74705SXin Lidef note_init_list_narrowing_silence : Note< 4603*67e74705SXin Li "insert an explicit cast to silence this issue">; 4604*67e74705SXin Lidef err_init_objc_class : Error< 4605*67e74705SXin Li "cannot initialize Objective-C class type %0">; 4606*67e74705SXin Lidef err_implicit_empty_initializer : Error< 4607*67e74705SXin Li "initializer for aggregate with no elements requires explicit braces">; 4608*67e74705SXin Lidef err_bitfield_has_negative_width : Error< 4609*67e74705SXin Li "bit-field %0 has negative width (%1)">; 4610*67e74705SXin Lidef err_anon_bitfield_has_negative_width : Error< 4611*67e74705SXin Li "anonymous bit-field has negative width (%0)">; 4612*67e74705SXin Lidef err_bitfield_has_zero_width : Error<"named bit-field %0 has zero width">; 4613*67e74705SXin Lidef err_bitfield_width_exceeds_type_width : Error< 4614*67e74705SXin Li "width of bit-field %0 (%1 bits) exceeds %select{width|size}2 " 4615*67e74705SXin Li "of its type (%3 bit%s3)">; 4616*67e74705SXin Lidef err_anon_bitfield_width_exceeds_type_width : Error< 4617*67e74705SXin Li "width of anonymous bit-field (%0 bits) exceeds %select{width|size}1 " 4618*67e74705SXin Li "of its type (%2 bit%s2)">; 4619*67e74705SXin Lidef err_incorrect_number_of_vector_initializers : Error< 4620*67e74705SXin Li "number of elements must be either one or match the size of the vector">; 4621*67e74705SXin Li 4622*67e74705SXin Li// Used by C++ which allows bit-fields that are wider than the type. 4623*67e74705SXin Lidef warn_bitfield_width_exceeds_type_width: Warning< 4624*67e74705SXin Li "width of bit-field %0 (%1 bits) exceeds the width of its type; value will " 4625*67e74705SXin Li "be truncated to %2 bit%s2">, InGroup<BitFieldWidth>; 4626*67e74705SXin Lidef warn_anon_bitfield_width_exceeds_type_width : Warning< 4627*67e74705SXin Li "width of anonymous bit-field (%0 bits) exceeds width of its type; value " 4628*67e74705SXin Li "will be truncated to %1 bit%s1">, InGroup<BitFieldWidth>; 4629*67e74705SXin Li 4630*67e74705SXin Lidef warn_missing_braces : Warning< 4631*67e74705SXin Li "suggest braces around initialization of subobject">, 4632*67e74705SXin Li InGroup<MissingBraces>, DefaultIgnore; 4633*67e74705SXin Li 4634*67e74705SXin Lidef err_redefinition_of_label : Error<"redefinition of label %0">; 4635*67e74705SXin Lidef err_undeclared_label_use : Error<"use of undeclared label %0">; 4636*67e74705SXin Lidef err_goto_ms_asm_label : Error< 4637*67e74705SXin Li "cannot jump from this goto statement to label %0 inside an inline assembly block">; 4638*67e74705SXin Lidef note_goto_ms_asm_label : Note< 4639*67e74705SXin Li "inline assembly label %0 declared here">; 4640*67e74705SXin Lidef warn_unused_label : Warning<"unused label %0">, 4641*67e74705SXin Li InGroup<UnusedLabel>, DefaultIgnore; 4642*67e74705SXin Li 4643*67e74705SXin Lidef err_goto_into_protected_scope : Error< 4644*67e74705SXin Li "cannot jump from this goto statement to its label">; 4645*67e74705SXin Lidef ext_goto_into_protected_scope : ExtWarn< 4646*67e74705SXin Li "jump from this goto statement to its label is a Microsoft extension">, 4647*67e74705SXin Li InGroup<MicrosoftGoto>; 4648*67e74705SXin Lidef warn_cxx98_compat_goto_into_protected_scope : Warning< 4649*67e74705SXin Li "jump from this goto statement to its label is incompatible with C++98">, 4650*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4651*67e74705SXin Lidef err_switch_into_protected_scope : Error< 4652*67e74705SXin Li "cannot jump from switch statement to this case label">; 4653*67e74705SXin Lidef warn_cxx98_compat_switch_into_protected_scope : Warning< 4654*67e74705SXin Li "jump from switch statement to this case label is incompatible with C++98">, 4655*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 4656*67e74705SXin Lidef err_indirect_goto_without_addrlabel : Error< 4657*67e74705SXin Li "indirect goto in function with no address-of-label expressions">; 4658*67e74705SXin Lidef err_indirect_goto_in_protected_scope : Error< 4659*67e74705SXin Li "cannot jump from this indirect goto statement to one of its possible targets">; 4660*67e74705SXin Lidef warn_cxx98_compat_indirect_goto_in_protected_scope : Warning< 4661*67e74705SXin Li "jump from this indirect goto statement to one of its possible targets " 4662*67e74705SXin Li "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 4663*67e74705SXin Lidef note_indirect_goto_target : Note< 4664*67e74705SXin Li "possible target of indirect goto statement">; 4665*67e74705SXin Lidef note_protected_by_variable_init : Note< 4666*67e74705SXin Li "jump bypasses variable initialization">; 4667*67e74705SXin Lidef note_protected_by_variable_nontriv_destructor : Note< 4668*67e74705SXin Li "jump bypasses variable with a non-trivial destructor">; 4669*67e74705SXin Lidef note_protected_by_variable_non_pod : Note< 4670*67e74705SXin Li "jump bypasses initialization of non-POD variable">; 4671*67e74705SXin Lidef note_protected_by_cleanup : Note< 4672*67e74705SXin Li "jump bypasses initialization of variable with __attribute__((cleanup))">; 4673*67e74705SXin Lidef note_protected_by_vla_typedef : Note< 4674*67e74705SXin Li "jump bypasses initialization of VLA typedef">; 4675*67e74705SXin Lidef note_protected_by_vla_type_alias : Note< 4676*67e74705SXin Li "jump bypasses initialization of VLA type alias">; 4677*67e74705SXin Lidef note_protected_by_constexpr_if : Note< 4678*67e74705SXin Li "jump enters controlled statement of constexpr if">; 4679*67e74705SXin Lidef note_protected_by_vla : Note< 4680*67e74705SXin Li "jump bypasses initialization of variable length array">; 4681*67e74705SXin Lidef note_protected_by_objc_try : Note< 4682*67e74705SXin Li "jump bypasses initialization of @try block">; 4683*67e74705SXin Lidef note_protected_by_objc_catch : Note< 4684*67e74705SXin Li "jump bypasses initialization of @catch block">; 4685*67e74705SXin Lidef note_protected_by_objc_finally : Note< 4686*67e74705SXin Li "jump bypasses initialization of @finally block">; 4687*67e74705SXin Lidef note_protected_by_objc_synchronized : Note< 4688*67e74705SXin Li "jump bypasses initialization of @synchronized block">; 4689*67e74705SXin Lidef note_protected_by_objc_autoreleasepool : Note< 4690*67e74705SXin Li "jump bypasses auto release push of @autoreleasepool block">; 4691*67e74705SXin Lidef note_protected_by_cxx_try : Note< 4692*67e74705SXin Li "jump bypasses initialization of try block">; 4693*67e74705SXin Lidef note_protected_by_cxx_catch : Note< 4694*67e74705SXin Li "jump bypasses initialization of catch block">; 4695*67e74705SXin Lidef note_protected_by_seh_try : Note< 4696*67e74705SXin Li "jump bypasses initialization of __try block">; 4697*67e74705SXin Lidef note_protected_by_seh_except : Note< 4698*67e74705SXin Li "jump bypasses initialization of __except block">; 4699*67e74705SXin Lidef note_protected_by_seh_finally : Note< 4700*67e74705SXin Li "jump bypasses initialization of __finally block">; 4701*67e74705SXin Lidef note_protected_by___block : Note< 4702*67e74705SXin Li "jump bypasses setup of __block variable">; 4703*67e74705SXin Lidef note_protected_by_objc_strong_init : Note< 4704*67e74705SXin Li "jump bypasses initialization of __strong variable">; 4705*67e74705SXin Lidef note_protected_by_objc_weak_init : Note< 4706*67e74705SXin Li "jump bypasses initialization of __weak variable">; 4707*67e74705SXin Lidef note_enters_block_captures_cxx_obj : Note< 4708*67e74705SXin Li "jump enters lifetime of block which captures a destructible C++ object">; 4709*67e74705SXin Lidef note_enters_block_captures_strong : Note< 4710*67e74705SXin Li "jump enters lifetime of block which strongly captures a variable">; 4711*67e74705SXin Lidef note_enters_block_captures_weak : Note< 4712*67e74705SXin Li "jump enters lifetime of block which weakly captures a variable">; 4713*67e74705SXin Li 4714*67e74705SXin Lidef note_exits_cleanup : Note< 4715*67e74705SXin Li "jump exits scope of variable with __attribute__((cleanup))">; 4716*67e74705SXin Lidef note_exits_dtor : Note< 4717*67e74705SXin Li "jump exits scope of variable with non-trivial destructor">; 4718*67e74705SXin Lidef note_exits_temporary_dtor : Note< 4719*67e74705SXin Li "jump exits scope of lifetime-extended temporary with non-trivial " 4720*67e74705SXin Li "destructor">; 4721*67e74705SXin Lidef note_exits___block : Note< 4722*67e74705SXin Li "jump exits scope of __block variable">; 4723*67e74705SXin Lidef note_exits_objc_try : Note< 4724*67e74705SXin Li "jump exits @try block">; 4725*67e74705SXin Lidef note_exits_objc_catch : Note< 4726*67e74705SXin Li "jump exits @catch block">; 4727*67e74705SXin Lidef note_exits_objc_finally : Note< 4728*67e74705SXin Li "jump exits @finally block">; 4729*67e74705SXin Lidef note_exits_objc_synchronized : Note< 4730*67e74705SXin Li "jump exits @synchronized block">; 4731*67e74705SXin Lidef note_exits_cxx_try : Note< 4732*67e74705SXin Li "jump exits try block">; 4733*67e74705SXin Lidef note_exits_cxx_catch : Note< 4734*67e74705SXin Li "jump exits catch block">; 4735*67e74705SXin Lidef note_exits_seh_try : Note< 4736*67e74705SXin Li "jump exits __try block">; 4737*67e74705SXin Lidef note_exits_seh_except : Note< 4738*67e74705SXin Li "jump exits __except block">; 4739*67e74705SXin Lidef note_exits_seh_finally : Note< 4740*67e74705SXin Li "jump exits __finally block">; 4741*67e74705SXin Lidef note_exits_objc_autoreleasepool : Note< 4742*67e74705SXin Li "jump exits autoreleasepool block">; 4743*67e74705SXin Lidef note_exits_objc_strong : Note< 4744*67e74705SXin Li "jump exits scope of __strong variable">; 4745*67e74705SXin Lidef note_exits_objc_weak : Note< 4746*67e74705SXin Li "jump exits scope of __weak variable">; 4747*67e74705SXin Lidef note_exits_block_captures_cxx_obj : Note< 4748*67e74705SXin Li "jump exits lifetime of block which captures a destructible C++ object">; 4749*67e74705SXin Lidef note_exits_block_captures_strong : Note< 4750*67e74705SXin Li "jump exits lifetime of block which strongly captures a variable">; 4751*67e74705SXin Lidef note_exits_block_captures_weak : Note< 4752*67e74705SXin Li "jump exits lifetime of block which weakly captures a variable">; 4753*67e74705SXin Li 4754*67e74705SXin Lidef err_func_returning_qualified_void : ExtWarn< 4755*67e74705SXin Li "function cannot return qualified void type %0">, 4756*67e74705SXin Li InGroup<DiagGroup<"qualified-void-return-type">>; 4757*67e74705SXin Lidef err_func_returning_array_function : Error< 4758*67e74705SXin Li "function cannot return %select{array|function}0 type %1">; 4759*67e74705SXin Lidef err_field_declared_as_function : Error<"field %0 declared as a function">; 4760*67e74705SXin Lidef err_field_incomplete : Error<"field has incomplete type %0">; 4761*67e74705SXin Lidef ext_variable_sized_type_in_struct : ExtWarn< 4762*67e74705SXin Li "field %0 with variable sized type %1 not at the end of a struct or class is" 4763*67e74705SXin Li " a GNU extension">, InGroup<GNUVariableSizedTypeNotAtEnd>; 4764*67e74705SXin Li 4765*67e74705SXin Lidef ext_c99_flexible_array_member : Extension< 4766*67e74705SXin Li "flexible array members are a C99 feature">, InGroup<C99>; 4767*67e74705SXin Lidef err_flexible_array_virtual_base : Error< 4768*67e74705SXin Li "flexible array member %0 not allowed in " 4769*67e74705SXin Li "%select{struct|interface|union|class|enum}1 which has a virtual base class">; 4770*67e74705SXin Lidef err_flexible_array_empty_aggregate : Error< 4771*67e74705SXin Li "flexible array member %0 not allowed in otherwise empty " 4772*67e74705SXin Li "%select{struct|interface|union|class|enum}1">; 4773*67e74705SXin Lidef err_flexible_array_has_nontrivial_dtor : Error< 4774*67e74705SXin Li "flexible array member %0 of type %1 with non-trivial destruction">; 4775*67e74705SXin Lidef ext_flexible_array_in_struct : Extension< 4776*67e74705SXin Li "%0 may not be nested in a struct due to flexible array member">, 4777*67e74705SXin Li InGroup<FlexibleArrayExtensions>; 4778*67e74705SXin Lidef ext_flexible_array_in_array : Extension< 4779*67e74705SXin Li "%0 may not be used as an array element due to flexible array member">, 4780*67e74705SXin Li InGroup<FlexibleArrayExtensions>; 4781*67e74705SXin Lidef err_flexible_array_init : Error< 4782*67e74705SXin Li "initialization of flexible array member is not allowed">; 4783*67e74705SXin Lidef ext_flexible_array_empty_aggregate_ms : Extension< 4784*67e74705SXin Li "flexible array member %0 in otherwise empty " 4785*67e74705SXin Li "%select{struct|interface|union|class|enum}1 is a Microsoft extension">, 4786*67e74705SXin Li InGroup<MicrosoftFlexibleArray>; 4787*67e74705SXin Lidef err_flexible_array_union : Error< 4788*67e74705SXin Li "flexible array member %0 in a union is not allowed">; 4789*67e74705SXin Lidef ext_flexible_array_union_ms : Extension< 4790*67e74705SXin Li "flexible array member %0 in a union is a Microsoft extension">, 4791*67e74705SXin Li InGroup<MicrosoftFlexibleArray>; 4792*67e74705SXin Lidef ext_flexible_array_empty_aggregate_gnu : Extension< 4793*67e74705SXin Li "flexible array member %0 in otherwise empty " 4794*67e74705SXin Li "%select{struct|interface|union|class|enum}1 is a GNU extension">, 4795*67e74705SXin Li InGroup<GNUEmptyStruct>; 4796*67e74705SXin Lidef ext_flexible_array_union_gnu : Extension< 4797*67e74705SXin Li "flexible array member %0 in a union is a GNU extension">, InGroup<GNUFlexibleArrayUnionMember>; 4798*67e74705SXin Li 4799*67e74705SXin Lilet CategoryName = "ARC Semantic Issue" in { 4800*67e74705SXin Li 4801*67e74705SXin Li// ARC-mode diagnostics. 4802*67e74705SXin Li 4803*67e74705SXin Lilet CategoryName = "ARC Weak References" in { 4804*67e74705SXin Li 4805*67e74705SXin Lidef err_arc_weak_no_runtime : Error< 4806*67e74705SXin Li "cannot create __weak reference because the current deployment target " 4807*67e74705SXin Li "does not support weak references">; 4808*67e74705SXin Lidef err_arc_weak_disabled : Error< 4809*67e74705SXin Li "cannot create __weak reference in file using manual reference counting">; 4810*67e74705SXin Lidef err_synthesizing_arc_weak_property_disabled : Error< 4811*67e74705SXin Li "cannot synthesize weak property in file using manual reference counting">; 4812*67e74705SXin Lidef err_synthesizing_arc_weak_property_no_runtime : Error< 4813*67e74705SXin Li "cannot synthesize weak property because the current deployment target " 4814*67e74705SXin Li "does not support weak references">; 4815*67e74705SXin Lidef err_arc_unsupported_weak_class : Error< 4816*67e74705SXin Li "class is incompatible with __weak references">; 4817*67e74705SXin Lidef err_arc_weak_unavailable_assign : Error< 4818*67e74705SXin Li "assignment of a weak-unavailable object to a __weak object">; 4819*67e74705SXin Lidef err_arc_weak_unavailable_property : Error< 4820*67e74705SXin Li "synthesizing __weak instance variable of type %0, which does not " 4821*67e74705SXin Li "support weak references">; 4822*67e74705SXin Lidef note_implemented_by_class : Note< 4823*67e74705SXin Li "when implemented by class %0">; 4824*67e74705SXin Lidef err_arc_convesion_of_weak_unavailable : Error< 4825*67e74705SXin Li "%select{implicit conversion|cast}0 of weak-unavailable object of type %1 to" 4826*67e74705SXin Li " a __weak object of type %2">; 4827*67e74705SXin Li 4828*67e74705SXin Li} // end "ARC Weak References" category 4829*67e74705SXin Li 4830*67e74705SXin Lilet CategoryName = "ARC Restrictions" in { 4831*67e74705SXin Li 4832*67e74705SXin Lidef err_unavailable_in_arc : Error< 4833*67e74705SXin Li "%0 is unavailable in ARC">; 4834*67e74705SXin Lidef note_arc_forbidden_type : Note< 4835*67e74705SXin Li "declaration uses type that is ill-formed in ARC">; 4836*67e74705SXin Lidef note_performs_forbidden_arc_conversion : Note< 4837*67e74705SXin Li "inline function performs a conversion which is forbidden in ARC">; 4838*67e74705SXin Lidef note_arc_init_returns_unrelated : Note< 4839*67e74705SXin Li "init method must return a type related to its receiver type">; 4840*67e74705SXin Lidef note_arc_weak_disabled : Note< 4841*67e74705SXin Li "declaration uses __weak, but ARC is disabled">; 4842*67e74705SXin Lidef note_arc_weak_no_runtime : Note<"declaration uses __weak, which " 4843*67e74705SXin Li "the current deployment target does not support">; 4844*67e74705SXin Lidef note_arc_field_with_ownership : Note< 4845*67e74705SXin Li "field has non-trivial ownership qualification">; 4846*67e74705SXin Li 4847*67e74705SXin Lidef err_arc_illegal_explicit_message : Error< 4848*67e74705SXin Li "ARC forbids explicit message send of %0">; 4849*67e74705SXin Lidef err_arc_unused_init_message : Error< 4850*67e74705SXin Li "the result of a delegate init call must be immediately returned " 4851*67e74705SXin Li "or assigned to 'self'">; 4852*67e74705SXin Lidef err_arc_mismatched_cast : Error< 4853*67e74705SXin Li "%select{implicit conversion|cast}0 of " 4854*67e74705SXin Li "%select{%2|a non-Objective-C pointer type %2|a block pointer|" 4855*67e74705SXin Li "an Objective-C pointer|an indirect pointer to an Objective-C pointer}1" 4856*67e74705SXin Li " to %3 is disallowed with ARC">; 4857*67e74705SXin Lidef err_arc_nolifetime_behavior : Error< 4858*67e74705SXin Li "explicit ownership qualifier on cast result has no effect">; 4859*67e74705SXin Lidef err_arc_objc_object_in_tag : Error< 4860*67e74705SXin Li "ARC forbids %select{Objective-C objects|blocks}0 in " 4861*67e74705SXin Li "%select{struct|interface|union|<<ERROR>>|enum}1">; 4862*67e74705SXin Lidef err_arc_objc_property_default_assign_on_object : Error< 4863*67e74705SXin Li "ARC forbids synthesizing a property of an Objective-C object " 4864*67e74705SXin Li "with unspecified ownership or storage attribute">; 4865*67e74705SXin Lidef err_arc_illegal_selector : Error< 4866*67e74705SXin Li "ARC forbids use of %0 in a @selector">; 4867*67e74705SXin Lidef err_arc_illegal_method_def : Error< 4868*67e74705SXin Li "ARC forbids %select{implementation|synthesis}0 of %1">; 4869*67e74705SXin Lidef warn_arc_strong_pointer_objc_pointer : Warning< 4870*67e74705SXin Li "method parameter of type %0 with no explicit ownership">, 4871*67e74705SXin Li InGroup<DiagGroup<"explicit-ownership-type">>, DefaultIgnore; 4872*67e74705SXin Li 4873*67e74705SXin Li} // end "ARC Restrictions" category 4874*67e74705SXin Li 4875*67e74705SXin Lidef err_arc_lost_method_convention : Error< 4876*67e74705SXin Li "method was declared as %select{an 'alloc'|a 'copy'|an 'init'|a 'new'}0 " 4877*67e74705SXin Li "method, but its implementation doesn't match because %select{" 4878*67e74705SXin Li "its result type is not an object pointer|" 4879*67e74705SXin Li "its result type is unrelated to its receiver type}1">; 4880*67e74705SXin Lidef note_arc_lost_method_convention : Note<"declaration in interface">; 4881*67e74705SXin Lidef err_arc_gained_method_convention : Error< 4882*67e74705SXin Li "method implementation does not match its declaration">; 4883*67e74705SXin Lidef note_arc_gained_method_convention : Note< 4884*67e74705SXin Li "declaration in interface is not in the '%select{alloc|copy|init|new}0' " 4885*67e74705SXin Li "family because %select{its result type is not an object pointer|" 4886*67e74705SXin Li "its result type is unrelated to its receiver type}1">; 4887*67e74705SXin Lidef err_typecheck_arc_assign_self : Error< 4888*67e74705SXin Li "cannot assign to 'self' outside of a method in the init family">; 4889*67e74705SXin Lidef err_typecheck_arc_assign_self_class_method : Error< 4890*67e74705SXin Li "cannot assign to 'self' in a class method">; 4891*67e74705SXin Lidef err_typecheck_arr_assign_enumeration : Error< 4892*67e74705SXin Li "fast enumeration variables cannot be modified in ARC by default; " 4893*67e74705SXin Li "declare the variable __strong to allow this">; 4894*67e74705SXin Lidef warn_arc_retained_assign : Warning< 4895*67e74705SXin Li "assigning retained object to %select{weak|unsafe_unretained}0 " 4896*67e74705SXin Li "%select{property|variable}1" 4897*67e74705SXin Li "; object will be released after assignment">, 4898*67e74705SXin Li InGroup<ARCUnsafeRetainedAssign>; 4899*67e74705SXin Lidef warn_arc_retained_property_assign : Warning< 4900*67e74705SXin Li "assigning retained object to unsafe property" 4901*67e74705SXin Li "; object will be released after assignment">, 4902*67e74705SXin Li InGroup<ARCUnsafeRetainedAssign>; 4903*67e74705SXin Lidef warn_arc_literal_assign : Warning< 4904*67e74705SXin Li "assigning %select{array literal|dictionary literal|numeric literal|boxed expression|<should not happen>|block literal}0" 4905*67e74705SXin Li " to a weak %select{property|variable}1" 4906*67e74705SXin Li "; object will be released after assignment">, 4907*67e74705SXin Li InGroup<ARCUnsafeRetainedAssign>; 4908*67e74705SXin Lidef err_arc_new_array_without_ownership : Error< 4909*67e74705SXin Li "'new' cannot allocate an array of %0 with no explicit ownership">; 4910*67e74705SXin Lidef err_arc_autoreleasing_var : Error< 4911*67e74705SXin Li "%select{__block variables|global variables|fields|instance variables}0 cannot have " 4912*67e74705SXin Li "__autoreleasing ownership">; 4913*67e74705SXin Lidef err_arc_autoreleasing_capture : Error< 4914*67e74705SXin Li "cannot capture __autoreleasing variable in a " 4915*67e74705SXin Li "%select{block|lambda by copy}0">; 4916*67e74705SXin Lidef err_arc_thread_ownership : Error< 4917*67e74705SXin Li "thread-local variable has non-trivial ownership: type is %0">; 4918*67e74705SXin Lidef err_arc_indirect_no_ownership : Error< 4919*67e74705SXin Li "%select{pointer|reference}1 to non-const type %0 with no explicit ownership">; 4920*67e74705SXin Lidef err_arc_array_param_no_ownership : Error< 4921*67e74705SXin Li "must explicitly describe intended ownership of an object array parameter">; 4922*67e74705SXin Lidef err_arc_pseudo_dtor_inconstant_quals : Error< 4923*67e74705SXin Li "pseudo-destructor destroys object of type %0 with inconsistently-qualified " 4924*67e74705SXin Li "type %1">; 4925*67e74705SXin Lidef err_arc_init_method_unrelated_result_type : Error< 4926*67e74705SXin Li "init methods must return a type related to the receiver type">; 4927*67e74705SXin Lidef err_arc_nonlocal_writeback : Error< 4928*67e74705SXin Li "passing address of %select{non-local|non-scalar}0 object to " 4929*67e74705SXin Li "__autoreleasing parameter for write-back">; 4930*67e74705SXin Lidef err_arc_method_not_found : Error< 4931*67e74705SXin Li "no known %select{instance|class}1 method for selector %0">; 4932*67e74705SXin Lidef err_arc_receiver_forward_class : Error< 4933*67e74705SXin Li "receiver %0 for class message is a forward declaration">; 4934*67e74705SXin Lidef err_arc_may_not_respond : Error< 4935*67e74705SXin Li "no visible @interface for %0 declares the selector %1">; 4936*67e74705SXin Lidef err_arc_receiver_forward_instance : Error< 4937*67e74705SXin Li "receiver type %0 for instance message is a forward declaration">; 4938*67e74705SXin Lidef warn_receiver_forward_instance : Warning< 4939*67e74705SXin Li "receiver type %0 for instance message is a forward declaration">, 4940*67e74705SXin Li InGroup<ForwardClassReceiver>, DefaultIgnore; 4941*67e74705SXin Lidef err_arc_collection_forward : Error< 4942*67e74705SXin Li "collection expression type %0 is a forward declaration">; 4943*67e74705SXin Lidef err_arc_multiple_method_decl : Error< 4944*67e74705SXin Li "multiple methods named %0 found with mismatched result, " 4945*67e74705SXin Li "parameter type or attributes">; 4946*67e74705SXin Lidef warn_arc_lifetime_result_type : Warning< 4947*67e74705SXin Li "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " 4948*67e74705SXin Li "lifetime qualifier on return type is ignored">, 4949*67e74705SXin Li InGroup<IgnoredQualifiers>; 4950*67e74705SXin Li 4951*67e74705SXin Lilet CategoryName = "ARC Retain Cycle" in { 4952*67e74705SXin Li 4953*67e74705SXin Lidef warn_arc_retain_cycle : Warning< 4954*67e74705SXin Li "capturing %0 strongly in this block is likely to lead to a retain cycle">, 4955*67e74705SXin Li InGroup<ARCRetainCycles>; 4956*67e74705SXin Lidef note_arc_retain_cycle_owner : Note< 4957*67e74705SXin Li "block will be retained by %select{the captured object|an object strongly " 4958*67e74705SXin Li "retained by the captured object}0">; 4959*67e74705SXin Li 4960*67e74705SXin Li} // end "ARC Retain Cycle" category 4961*67e74705SXin Li 4962*67e74705SXin Lidef warn_arc_object_memaccess : Warning< 4963*67e74705SXin Li "%select{destination for|source of}0 this %1 call is a pointer to " 4964*67e74705SXin Li "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>; 4965*67e74705SXin Li 4966*67e74705SXin Lilet CategoryName = "ARC and @properties" in { 4967*67e74705SXin Li 4968*67e74705SXin Lidef err_arc_strong_property_ownership : Error< 4969*67e74705SXin Li "existing instance variable %1 for strong property %0 may not be " 4970*67e74705SXin Li "%select{|__unsafe_unretained||__weak}2">; 4971*67e74705SXin Lidef err_arc_assign_property_ownership : Error< 4972*67e74705SXin Li "existing instance variable %1 for property %0 with %select{unsafe_unretained|assign}2 " 4973*67e74705SXin Li "attribute must be __unsafe_unretained">; 4974*67e74705SXin Lidef err_arc_inconsistent_property_ownership : Error< 4975*67e74705SXin Li "%select{|unsafe_unretained|strong|weak}1 property %0 may not also be " 4976*67e74705SXin Li "declared %select{|__unsafe_unretained|__strong|__weak|__autoreleasing}2">; 4977*67e74705SXin Li 4978*67e74705SXin Li} // end "ARC and @properties" category 4979*67e74705SXin Li 4980*67e74705SXin Lidef err_arc_atomic_ownership : Error< 4981*67e74705SXin Li "cannot perform atomic operation on a pointer to type %0: type has " 4982*67e74705SXin Li "non-trivial ownership">; 4983*67e74705SXin Li 4984*67e74705SXin Lilet CategoryName = "ARC Casting Rules" in { 4985*67e74705SXin Li 4986*67e74705SXin Lidef err_arc_bridge_cast_incompatible : Error< 4987*67e74705SXin Li "incompatible types casting %0 to %1 with a %select{__bridge|" 4988*67e74705SXin Li "__bridge_transfer|__bridge_retained}2 cast">; 4989*67e74705SXin Lidef err_arc_bridge_cast_wrong_kind : Error< 4990*67e74705SXin Li "cast of %select{Objective-C|block|C}0 pointer type %1 to " 4991*67e74705SXin Li "%select{Objective-C|block|C}2 pointer type %3 cannot use %select{__bridge|" 4992*67e74705SXin Li "__bridge_transfer|__bridge_retained}4">; 4993*67e74705SXin Lidef err_arc_cast_requires_bridge : Error< 4994*67e74705SXin Li "%select{cast|implicit conversion}0 of %select{Objective-C|block|C}1 " 4995*67e74705SXin Li "pointer type %2 to %select{Objective-C|block|C}3 pointer type %4 " 4996*67e74705SXin Li "requires a bridged cast">; 4997*67e74705SXin Lidef note_arc_bridge : Note< 4998*67e74705SXin Li "use __bridge to convert directly (no change in ownership)">; 4999*67e74705SXin Lidef note_arc_cstyle_bridge : Note< 5000*67e74705SXin Li "use __bridge with C-style cast to convert directly (no change in ownership)">; 5001*67e74705SXin Lidef note_arc_bridge_transfer : Note< 5002*67e74705SXin Li "use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer " 5003*67e74705SXin Li "ownership of a +1 %0 into ARC">; 5004*67e74705SXin Lidef note_arc_cstyle_bridge_transfer : Note< 5005*67e74705SXin Li "use __bridge_transfer with C-style cast to transfer " 5006*67e74705SXin Li "ownership of a +1 %0 into ARC">; 5007*67e74705SXin Lidef note_arc_bridge_retained : Note< 5008*67e74705SXin Li "use %select{__bridge_retained|CFBridgingRetain call}1 to make an " 5009*67e74705SXin Li "ARC object available as a +1 %0">; 5010*67e74705SXin Lidef note_arc_cstyle_bridge_retained : Note< 5011*67e74705SXin Li "use __bridge_retained with C-style cast to make an " 5012*67e74705SXin Li "ARC object available as a +1 %0">; 5013*67e74705SXin Li 5014*67e74705SXin Li} // ARC Casting category 5015*67e74705SXin Li 5016*67e74705SXin Li} // ARC category name 5017*67e74705SXin Li 5018*67e74705SXin Lidef err_flexible_array_init_needs_braces : Error< 5019*67e74705SXin Li "flexible array requires brace-enclosed initializer">; 5020*67e74705SXin Lidef err_illegal_decl_array_of_functions : Error< 5021*67e74705SXin Li "'%0' declared as array of functions of type %1">; 5022*67e74705SXin Lidef err_illegal_decl_array_incomplete_type : Error< 5023*67e74705SXin Li "array has incomplete element type %0">; 5024*67e74705SXin Lidef err_illegal_message_expr_incomplete_type : Error< 5025*67e74705SXin Li "Objective-C message has incomplete result type %0">; 5026*67e74705SXin Lidef err_illegal_decl_array_of_references : Error< 5027*67e74705SXin Li "'%0' declared as array of references of type %1">; 5028*67e74705SXin Lidef err_decl_negative_array_size : Error< 5029*67e74705SXin Li "'%0' declared as an array with a negative size">; 5030*67e74705SXin Lidef err_array_static_outside_prototype : Error< 5031*67e74705SXin Li "%0 used in array declarator outside of function prototype">; 5032*67e74705SXin Lidef err_array_static_not_outermost : Error< 5033*67e74705SXin Li "%0 used in non-outermost array type derivation">; 5034*67e74705SXin Lidef err_array_star_outside_prototype : Error< 5035*67e74705SXin Li "star modifier used outside of function prototype">; 5036*67e74705SXin Lidef err_illegal_decl_pointer_to_reference : Error< 5037*67e74705SXin Li "'%0' declared as a pointer to a reference of type %1">; 5038*67e74705SXin Lidef err_illegal_decl_mempointer_to_reference : Error< 5039*67e74705SXin Li "'%0' declared as a member pointer to a reference of type %1">; 5040*67e74705SXin Lidef err_illegal_decl_mempointer_to_void : Error< 5041*67e74705SXin Li "'%0' declared as a member pointer to void">; 5042*67e74705SXin Lidef err_illegal_decl_mempointer_in_nonclass : Error< 5043*67e74705SXin Li "'%0' does not point into a class">; 5044*67e74705SXin Lidef err_mempointer_in_nonclass_type : Error< 5045*67e74705SXin Li "member pointer refers into non-class type %0">; 5046*67e74705SXin Lidef err_reference_to_void : Error<"cannot form a reference to 'void'">; 5047*67e74705SXin Lidef err_nonfunction_block_type : Error< 5048*67e74705SXin Li "block pointer to non-function type is invalid">; 5049*67e74705SXin Lidef err_return_block_has_expr : Error<"void block should not return a value">; 5050*67e74705SXin Lidef err_block_return_missing_expr : Error< 5051*67e74705SXin Li "non-void block should return a value">; 5052*67e74705SXin Lidef err_func_def_incomplete_result : Error< 5053*67e74705SXin Li "incomplete result type %0 in function definition">; 5054*67e74705SXin Lidef err_atomic_specifier_bad_type : Error< 5055*67e74705SXin Li "_Atomic cannot be applied to " 5056*67e74705SXin Li "%select{incomplete |array |function |reference |atomic |qualified |}0type " 5057*67e74705SXin Li "%1 %select{||||||which is not trivially copyable}0">; 5058*67e74705SXin Li 5059*67e74705SXin Li// Expressions. 5060*67e74705SXin Lidef ext_sizeof_alignof_function_type : Extension< 5061*67e74705SXin Li "invalid application of '%select{sizeof|alignof|vec_step}0' to a " 5062*67e74705SXin Li "function type">, InGroup<PointerArith>; 5063*67e74705SXin Lidef ext_sizeof_alignof_void_type : Extension< 5064*67e74705SXin Li "invalid application of '%select{sizeof|alignof|vec_step}0' to a void " 5065*67e74705SXin Li "type">, InGroup<PointerArith>; 5066*67e74705SXin Lidef err_opencl_sizeof_alignof_type : Error< 5067*67e74705SXin Li "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to a void type">; 5068*67e74705SXin Lidef err_sizeof_alignof_incomplete_type : Error< 5069*67e74705SXin Li "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to an " 5070*67e74705SXin Li "incomplete type %1">; 5071*67e74705SXin Lidef err_sizeof_alignof_function_type : Error< 5072*67e74705SXin Li "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to a " 5073*67e74705SXin Li "function type">; 5074*67e74705SXin Lidef err_openmp_default_simd_align_expr : Error< 5075*67e74705SXin Li "invalid application of '__builtin_omp_required_simd_align' to an expression, only type is allowed">; 5076*67e74705SXin Lidef err_sizeof_alignof_typeof_bitfield : Error< 5077*67e74705SXin Li "invalid application of '%select{sizeof|alignof|typeof}0' to bit-field">; 5078*67e74705SXin Lidef err_alignof_member_of_incomplete_type : Error< 5079*67e74705SXin Li "invalid application of 'alignof' to a field of a class still being defined">; 5080*67e74705SXin Lidef err_vecstep_non_scalar_vector_type : Error< 5081*67e74705SXin Li "'vec_step' requires built-in scalar or vector type, %0 invalid">; 5082*67e74705SXin Lidef err_offsetof_incomplete_type : Error< 5083*67e74705SXin Li "offsetof of incomplete type %0">; 5084*67e74705SXin Lidef err_offsetof_record_type : Error< 5085*67e74705SXin Li "offsetof requires struct, union, or class type, %0 invalid">; 5086*67e74705SXin Lidef err_offsetof_array_type : Error<"offsetof requires array type, %0 invalid">; 5087*67e74705SXin Lidef ext_offsetof_extended_field_designator : Extension< 5088*67e74705SXin Li "using extended field designator is an extension">, 5089*67e74705SXin Li InGroup<DiagGroup<"extended-offsetof">>; 5090*67e74705SXin Lidef ext_offsetof_non_pod_type : ExtWarn<"offset of on non-POD type %0">, 5091*67e74705SXin Li InGroup<InvalidOffsetof>; 5092*67e74705SXin Lidef ext_offsetof_non_standardlayout_type : ExtWarn< 5093*67e74705SXin Li "offset of on non-standard-layout type %0">, InGroup<InvalidOffsetof>; 5094*67e74705SXin Lidef err_offsetof_bitfield : Error<"cannot compute offset of bit-field %0">; 5095*67e74705SXin Lidef err_offsetof_field_of_virtual_base : Error< 5096*67e74705SXin Li "invalid application of 'offsetof' to a field of a virtual base">; 5097*67e74705SXin Lidef warn_sub_ptr_zero_size_types : Warning< 5098*67e74705SXin Li "subtraction of pointers to type %0 of zero size has undefined behavior">, 5099*67e74705SXin Li InGroup<PointerArith>; 5100*67e74705SXin Li 5101*67e74705SXin Lidef warn_floatingpoint_eq : Warning< 5102*67e74705SXin Li "comparing floating point with == or != is unsafe">, 5103*67e74705SXin Li InGroup<DiagGroup<"float-equal">>, DefaultIgnore; 5104*67e74705SXin Li 5105*67e74705SXin Lidef warn_remainder_division_by_zero : Warning< 5106*67e74705SXin Li "%select{remainder|division}0 by zero is undefined">, 5107*67e74705SXin Li InGroup<DivZero>; 5108*67e74705SXin Lidef warn_shift_lhs_negative : Warning<"shifting a negative signed value is undefined">, 5109*67e74705SXin Li InGroup<DiagGroup<"shift-negative-value">>; 5110*67e74705SXin Lidef warn_shift_negative : Warning<"shift count is negative">, 5111*67e74705SXin Li InGroup<DiagGroup<"shift-count-negative">>; 5112*67e74705SXin Lidef warn_shift_gt_typewidth : Warning<"shift count >= width of type">, 5113*67e74705SXin Li InGroup<DiagGroup<"shift-count-overflow">>; 5114*67e74705SXin Lidef warn_shift_result_gt_typewidth : Warning< 5115*67e74705SXin Li "signed shift result (%0) requires %1 bits to represent, but %2 only has " 5116*67e74705SXin Li "%3 bits">, InGroup<DiagGroup<"shift-overflow">>; 5117*67e74705SXin Lidef warn_shift_result_sets_sign_bit : Warning< 5118*67e74705SXin Li "signed shift result (%0) sets the sign bit of the shift expression's " 5119*67e74705SXin Li "type (%1) and becomes negative">, 5120*67e74705SXin Li InGroup<DiagGroup<"shift-sign-overflow">>, DefaultIgnore; 5121*67e74705SXin Li 5122*67e74705SXin Lidef warn_precedence_bitwise_rel : Warning< 5123*67e74705SXin Li "%0 has lower precedence than %1; %1 will be evaluated first">, 5124*67e74705SXin Li InGroup<Parentheses>; 5125*67e74705SXin Lidef note_precedence_bitwise_first : Note< 5126*67e74705SXin Li "place parentheses around the %0 expression to evaluate it first">; 5127*67e74705SXin Lidef note_precedence_silence : Note< 5128*67e74705SXin Li "place parentheses around the '%0' expression to silence this warning">; 5129*67e74705SXin Li 5130*67e74705SXin Lidef warn_precedence_conditional : Warning< 5131*67e74705SXin Li "operator '?:' has lower precedence than '%0'; '%0' will be evaluated first">, 5132*67e74705SXin Li InGroup<Parentheses>; 5133*67e74705SXin Lidef note_precedence_conditional_first : Note< 5134*67e74705SXin Li "place parentheses around the '?:' expression to evaluate it first">; 5135*67e74705SXin Li 5136*67e74705SXin Lidef warn_logical_instead_of_bitwise : Warning< 5137*67e74705SXin Li "use of logical '%0' with constant operand">, 5138*67e74705SXin Li InGroup<DiagGroup<"constant-logical-operand">>; 5139*67e74705SXin Lidef note_logical_instead_of_bitwise_change_operator : Note< 5140*67e74705SXin Li "use '%0' for a bitwise operation">; 5141*67e74705SXin Lidef note_logical_instead_of_bitwise_remove_constant : Note< 5142*67e74705SXin Li "remove constant to silence this warning">; 5143*67e74705SXin Li 5144*67e74705SXin Lidef warn_bitwise_op_in_bitwise_op : Warning< 5145*67e74705SXin Li "'%0' within '%1'">, InGroup<BitwiseOpParentheses>; 5146*67e74705SXin Li 5147*67e74705SXin Lidef warn_logical_and_in_logical_or : Warning< 5148*67e74705SXin Li "'&&' within '||'">, InGroup<LogicalOpParentheses>; 5149*67e74705SXin Li 5150*67e74705SXin Lidef warn_overloaded_shift_in_comparison :Warning< 5151*67e74705SXin Li "overloaded operator %select{>>|<<}0 has higher precedence than " 5152*67e74705SXin Li "comparison operator">, 5153*67e74705SXin Li InGroup<OverloadedShiftOpParentheses>; 5154*67e74705SXin Lidef note_evaluate_comparison_first :Note< 5155*67e74705SXin Li "place parentheses around comparison expression to evaluate it first">; 5156*67e74705SXin Li 5157*67e74705SXin Lidef warn_addition_in_bitshift : Warning< 5158*67e74705SXin Li "operator '%0' has lower precedence than '%1'; " 5159*67e74705SXin Li "'%1' will be evaluated first">, InGroup<ShiftOpParentheses>; 5160*67e74705SXin Li 5161*67e74705SXin Lidef warn_self_assignment : Warning< 5162*67e74705SXin Li "explicitly assigning value of variable of type %0 to itself">, 5163*67e74705SXin Li InGroup<SelfAssignment>, DefaultIgnore; 5164*67e74705SXin Lidef warn_self_move : Warning< 5165*67e74705SXin Li "explicitly moving variable of type %0 to itself">, 5166*67e74705SXin Li InGroup<SelfMove>, DefaultIgnore; 5167*67e74705SXin Li 5168*67e74705SXin Lidef warn_redundant_move_on_return : Warning< 5169*67e74705SXin Li "redundant move in return statement">, 5170*67e74705SXin Li InGroup<RedundantMove>, DefaultIgnore; 5171*67e74705SXin Lidef warn_pessimizing_move_on_return : Warning< 5172*67e74705SXin Li "moving a local object in a return statement prevents copy elision">, 5173*67e74705SXin Li InGroup<PessimizingMove>, DefaultIgnore; 5174*67e74705SXin Lidef warn_pessimizing_move_on_initialization : Warning< 5175*67e74705SXin Li "moving a temporary object prevents copy elision">, 5176*67e74705SXin Li InGroup<PessimizingMove>, DefaultIgnore; 5177*67e74705SXin Lidef note_remove_move : Note<"remove std::move call here">; 5178*67e74705SXin Li 5179*67e74705SXin Lidef warn_string_plus_int : Warning< 5180*67e74705SXin Li "adding %0 to a string does not append to the string">, 5181*67e74705SXin Li InGroup<StringPlusInt>; 5182*67e74705SXin Lidef warn_string_plus_char : Warning< 5183*67e74705SXin Li "adding %0 to a string pointer does not append to the string">, 5184*67e74705SXin Li InGroup<StringPlusChar>; 5185*67e74705SXin Lidef note_string_plus_scalar_silence : Note< 5186*67e74705SXin Li "use array indexing to silence this warning">; 5187*67e74705SXin Li 5188*67e74705SXin Lidef warn_sizeof_array_param : Warning< 5189*67e74705SXin Li "sizeof on array function parameter will return size of %0 instead of %1">, 5190*67e74705SXin Li InGroup<SizeofArrayArgument>; 5191*67e74705SXin Li 5192*67e74705SXin Lidef warn_sizeof_array_decay : Warning< 5193*67e74705SXin Li "sizeof on pointer operation will return size of %0 instead of %1">, 5194*67e74705SXin Li InGroup<SizeofArrayDecay>; 5195*67e74705SXin Li 5196*67e74705SXin Lidef err_sizeof_nonfragile_interface : Error< 5197*67e74705SXin Li "application of '%select{alignof|sizeof}1' to interface %0 is " 5198*67e74705SXin Li "not supported on this architecture and platform">; 5199*67e74705SXin Lidef err_atdef_nonfragile_interface : Error< 5200*67e74705SXin Li "use of @defs is not supported on this architecture and platform">; 5201*67e74705SXin Lidef err_subscript_nonfragile_interface : Error< 5202*67e74705SXin Li "subscript requires size of interface %0, which is not constant for " 5203*67e74705SXin Li "this architecture and platform">; 5204*67e74705SXin Li 5205*67e74705SXin Lidef err_arithmetic_nonfragile_interface : Error< 5206*67e74705SXin Li "arithmetic on pointer to interface %0, which is not a constant size for " 5207*67e74705SXin Li "this architecture and platform">; 5208*67e74705SXin Li 5209*67e74705SXin Li 5210*67e74705SXin Lidef ext_subscript_non_lvalue : Extension< 5211*67e74705SXin Li "ISO C90 does not allow subscripting non-lvalue array">; 5212*67e74705SXin Lidef err_typecheck_subscript_value : Error< 5213*67e74705SXin Li "subscripted value is not an array, pointer, or vector">; 5214*67e74705SXin Lidef err_typecheck_subscript_not_integer : Error< 5215*67e74705SXin Li "array subscript is not an integer">; 5216*67e74705SXin Lidef err_subscript_function_type : Error< 5217*67e74705SXin Li "subscript of pointer to function type %0">; 5218*67e74705SXin Lidef err_subscript_incomplete_type : Error< 5219*67e74705SXin Li "subscript of pointer to incomplete type %0">; 5220*67e74705SXin Lidef err_dereference_incomplete_type : Error< 5221*67e74705SXin Li "dereference of pointer to incomplete type %0">; 5222*67e74705SXin Lidef ext_gnu_subscript_void_type : Extension< 5223*67e74705SXin Li "subscript of a pointer to void is a GNU extension">, InGroup<PointerArith>; 5224*67e74705SXin Lidef err_typecheck_member_reference_struct_union : Error< 5225*67e74705SXin Li "member reference base type %0 is not a structure or union">; 5226*67e74705SXin Lidef err_typecheck_member_reference_ivar : Error< 5227*67e74705SXin Li "%0 does not have a member named %1">; 5228*67e74705SXin Lidef error_arc_weak_ivar_access : Error< 5229*67e74705SXin Li "dereferencing a __weak pointer is not allowed due to possible " 5230*67e74705SXin Li "null value caused by race condition, assign it to strong variable first">; 5231*67e74705SXin Lidef err_typecheck_member_reference_arrow : Error< 5232*67e74705SXin Li "member reference type %0 is not a pointer">; 5233*67e74705SXin Lidef err_typecheck_member_reference_suggestion : Error< 5234*67e74705SXin Li "member reference type %0 is %select{a|not a}1 pointer; did you mean to use '%select{->|.}1'?">; 5235*67e74705SXin Lidef note_typecheck_member_reference_suggestion : Note< 5236*67e74705SXin Li "did you mean to use '.' instead?">; 5237*67e74705SXin Lidef note_member_reference_arrow_from_operator_arrow : Note< 5238*67e74705SXin Li "'->' applied to return value of the operator->() declared here">; 5239*67e74705SXin Lidef err_typecheck_member_reference_type : Error< 5240*67e74705SXin Li "cannot refer to type member %0 in %1 with '%select{.|->}2'">; 5241*67e74705SXin Lidef err_typecheck_member_reference_unknown : Error< 5242*67e74705SXin Li "cannot refer to member %0 in %1 with '%select{.|->}2'">; 5243*67e74705SXin Lidef err_member_reference_needs_call : Error< 5244*67e74705SXin Li "base of member reference is a function; perhaps you meant to call " 5245*67e74705SXin Li "it%select{| with no arguments}0?">; 5246*67e74705SXin Lidef warn_subscript_is_char : Warning<"array subscript is of type 'char'">, 5247*67e74705SXin Li InGroup<CharSubscript>, DefaultIgnore; 5248*67e74705SXin Li 5249*67e74705SXin Lidef err_typecheck_incomplete_tag : Error<"incomplete definition of type %0">; 5250*67e74705SXin Lidef err_no_member : Error<"no member named %0 in %1">; 5251*67e74705SXin Lidef err_no_member_overloaded_arrow : Error< 5252*67e74705SXin Li "no member named %0 in %1; did you mean to use '->' instead of '.'?">; 5253*67e74705SXin Li 5254*67e74705SXin Lidef err_member_not_yet_instantiated : Error< 5255*67e74705SXin Li "no member %0 in %1; it has not yet been instantiated">; 5256*67e74705SXin Lidef note_non_instantiated_member_here : Note< 5257*67e74705SXin Li "not-yet-instantiated member is declared here">; 5258*67e74705SXin Li 5259*67e74705SXin Lidef err_enumerator_does_not_exist : Error< 5260*67e74705SXin Li "enumerator %0 does not exist in instantiation of %1">; 5261*67e74705SXin Lidef note_enum_specialized_here : Note< 5262*67e74705SXin Li "enum %0 was explicitly specialized here">; 5263*67e74705SXin Li 5264*67e74705SXin Lidef err_member_redeclared : Error<"class member cannot be redeclared">; 5265*67e74705SXin Lidef ext_member_redeclared : ExtWarn<"class member cannot be redeclared">, 5266*67e74705SXin Li InGroup<RedeclaredClassMember>; 5267*67e74705SXin Lidef err_member_redeclared_in_instantiation : Error< 5268*67e74705SXin Li "multiple overloads of %0 instantiate to the same signature %1">; 5269*67e74705SXin Lidef err_member_name_of_class : Error<"member %0 has the same name as its class">; 5270*67e74705SXin Lidef err_member_def_undefined_record : Error< 5271*67e74705SXin Li "out-of-line definition of %0 from class %1 without definition">; 5272*67e74705SXin Lidef err_member_decl_does_not_match : Error< 5273*67e74705SXin Li "out-of-line %select{declaration|definition}2 of %0 " 5274*67e74705SXin Li "does not match any declaration in %1">; 5275*67e74705SXin Lidef err_friend_decl_with_def_arg_must_be_def : Error< 5276*67e74705SXin Li "friend declaration specifying a default argument must be a definition">; 5277*67e74705SXin Lidef err_friend_decl_with_def_arg_redeclared : Error< 5278*67e74705SXin Li "friend declaration specifying a default argument must be the only declaration">; 5279*67e74705SXin Lidef err_friend_decl_does_not_match : Error< 5280*67e74705SXin Li "friend declaration of %0 does not match any declaration in %1">; 5281*67e74705SXin Lidef err_member_decl_does_not_match_suggest : Error< 5282*67e74705SXin Li "out-of-line %select{declaration|definition}2 of %0 " 5283*67e74705SXin Li "does not match any declaration in %1; did you mean %3?">; 5284*67e74705SXin Lidef err_member_def_does_not_match_ret_type : Error< 5285*67e74705SXin Li "return type of out-of-line definition of %q0 differs from " 5286*67e74705SXin Li "that in the declaration">; 5287*67e74705SXin Lidef err_nonstatic_member_out_of_line : Error< 5288*67e74705SXin Li "non-static data member defined out-of-line">; 5289*67e74705SXin Lidef err_qualified_typedef_declarator : Error< 5290*67e74705SXin Li "typedef declarator cannot be qualified">; 5291*67e74705SXin Lidef err_qualified_param_declarator : Error< 5292*67e74705SXin Li "parameter declarator cannot be qualified">; 5293*67e74705SXin Lidef ext_out_of_line_declaration : ExtWarn< 5294*67e74705SXin Li "out-of-line declaration of a member must be a definition">, 5295*67e74705SXin Li InGroup<OutOfLineDeclaration>, DefaultError; 5296*67e74705SXin Lidef err_member_extra_qualification : Error< 5297*67e74705SXin Li "extra qualification on member %0">; 5298*67e74705SXin Lidef warn_member_extra_qualification : Warning< 5299*67e74705SXin Li err_member_extra_qualification.Text>, InGroup<MicrosoftExtraQualification>; 5300*67e74705SXin Lidef warn_namespace_member_extra_qualification : Warning< 5301*67e74705SXin Li "extra qualification on member %0">, 5302*67e74705SXin Li InGroup<DiagGroup<"extra-qualification">>; 5303*67e74705SXin Lidef err_member_qualification : Error< 5304*67e74705SXin Li "non-friend class member %0 cannot have a qualified name">; 5305*67e74705SXin Lidef note_member_def_close_match : Note<"member declaration nearly matches">; 5306*67e74705SXin Lidef note_member_def_close_const_match : Note< 5307*67e74705SXin Li "member declaration does not match because " 5308*67e74705SXin Li "it %select{is|is not}0 const qualified">; 5309*67e74705SXin Lidef note_member_def_close_param_match : Note< 5310*67e74705SXin Li "type of %ordinal0 parameter of member declaration does not match definition" 5311*67e74705SXin Li "%diff{ ($ vs $)|}1,2">; 5312*67e74705SXin Lidef note_local_decl_close_match : Note<"local declaration nearly matches">; 5313*67e74705SXin Lidef note_local_decl_close_param_match : Note< 5314*67e74705SXin Li "type of %ordinal0 parameter of local declaration does not match definition" 5315*67e74705SXin Li "%diff{ ($ vs $)|}1,2">; 5316*67e74705SXin Lidef err_typecheck_ivar_variable_size : Error< 5317*67e74705SXin Li "instance variables must have a constant size">; 5318*67e74705SXin Lidef err_ivar_reference_type : Error< 5319*67e74705SXin Li "instance variables cannot be of reference type">; 5320*67e74705SXin Lidef err_typecheck_illegal_increment_decrement : Error< 5321*67e74705SXin Li "cannot %select{decrement|increment}1 value of type %0">; 5322*67e74705SXin Lidef err_typecheck_expect_int : Error< 5323*67e74705SXin Li "used type %0 where integer is required">; 5324*67e74705SXin Lidef err_typecheck_arithmetic_incomplete_type : Error< 5325*67e74705SXin Li "arithmetic on a pointer to an incomplete type %0">; 5326*67e74705SXin Lidef err_typecheck_pointer_arith_function_type : Error< 5327*67e74705SXin Li "arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 " 5328*67e74705SXin Li "function type%select{|s}2 %1%select{| and %3}2">; 5329*67e74705SXin Lidef err_typecheck_pointer_arith_void_type : Error< 5330*67e74705SXin Li "arithmetic on%select{ a|}0 pointer%select{|s}0 to void">; 5331*67e74705SXin Lidef err_typecheck_decl_incomplete_type : Error< 5332*67e74705SXin Li "variable has incomplete type %0">; 5333*67e74705SXin Lidef ext_typecheck_decl_incomplete_type : ExtWarn< 5334*67e74705SXin Li "tentative definition of variable with internal linkage has incomplete non-array type %0">, 5335*67e74705SXin Li InGroup<DiagGroup<"tentative-definition-incomplete-type">>; 5336*67e74705SXin Lidef err_tentative_def_incomplete_type : Error< 5337*67e74705SXin Li "tentative definition has type %0 that is never completed">; 5338*67e74705SXin Lidef warn_tentative_incomplete_array : Warning< 5339*67e74705SXin Li "tentative array definition assumed to have one element">; 5340*67e74705SXin Lidef err_typecheck_incomplete_array_needs_initializer : Error< 5341*67e74705SXin Li "definition of variable with array type needs an explicit size " 5342*67e74705SXin Li "or an initializer">; 5343*67e74705SXin Lidef err_array_init_not_init_list : Error< 5344*67e74705SXin Li "array initializer must be an initializer " 5345*67e74705SXin Li "list%select{| or string literal| or wide string literal}0">; 5346*67e74705SXin Lidef err_array_init_narrow_string_into_wchar : Error< 5347*67e74705SXin Li "initializing wide char array with non-wide string literal">; 5348*67e74705SXin Lidef err_array_init_wide_string_into_char : Error< 5349*67e74705SXin Li "initializing char array with wide string literal">; 5350*67e74705SXin Lidef err_array_init_incompat_wide_string_into_wchar : Error< 5351*67e74705SXin Li "initializing wide char array with incompatible wide string literal">; 5352*67e74705SXin Lidef err_array_init_different_type : Error< 5353*67e74705SXin Li "cannot initialize array %diff{of type $ with array of type $|" 5354*67e74705SXin Li "with different type of array}0,1">; 5355*67e74705SXin Lidef err_array_init_non_constant_array : Error< 5356*67e74705SXin Li "cannot initialize array %diff{of type $ with non-constant array of type $|" 5357*67e74705SXin Li "with different type of array}0,1">; 5358*67e74705SXin Lidef ext_array_init_copy : Extension< 5359*67e74705SXin Li "initialization of an array " 5360*67e74705SXin Li "%diff{of type $ from a compound literal of type $|" 5361*67e74705SXin Li "from a compound literal}0,1 is a GNU extension">, InGroup<GNUCompoundLiteralInitializer>; 5362*67e74705SXin Li// This is intentionally not disabled by -Wno-gnu. 5363*67e74705SXin Lidef ext_array_init_parens : ExtWarn< 5364*67e74705SXin Li "parenthesized initialization of a member array is a GNU extension">, 5365*67e74705SXin Li InGroup<DiagGroup<"gnu-array-member-paren-init">>, DefaultError; 5366*67e74705SXin Lidef warn_deprecated_string_literal_conversion : Warning< 5367*67e74705SXin Li "conversion from string literal to %0 is deprecated">, 5368*67e74705SXin Li InGroup<CXX11CompatDeprecatedWritableStr>; 5369*67e74705SXin Lidef ext_deprecated_string_literal_conversion : ExtWarn< 5370*67e74705SXin Li "ISO C++11 does not allow conversion from string literal to %0">, 5371*67e74705SXin Li InGroup<WritableStrings>, SFINAEFailure; 5372*67e74705SXin Lidef err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">; 5373*67e74705SXin Lidef err_typecheck_sclass_fscope : Error< 5374*67e74705SXin Li "illegal storage class on file-scoped variable">; 5375*67e74705SXin Lidef warn_standalone_specifier : Warning<"'%0' ignored on this declaration">, 5376*67e74705SXin Li InGroup<MissingDeclarations>; 5377*67e74705SXin Lidef ext_standalone_specifier : ExtWarn<"'%0' is not permitted on a declaration " 5378*67e74705SXin Li "of a type">, InGroup<MissingDeclarations>; 5379*67e74705SXin Lidef err_standalone_class_nested_name_specifier : Error< 5380*67e74705SXin Li "forward declaration of %select{class|struct|interface|union|enum}0 cannot " 5381*67e74705SXin Li "have a nested name specifier">; 5382*67e74705SXin Lidef err_typecheck_sclass_func : Error<"illegal storage class on function">; 5383*67e74705SXin Lidef err_static_block_func : Error< 5384*67e74705SXin Li "function declared in block scope cannot have 'static' storage class">; 5385*67e74705SXin Lidef err_typecheck_address_of : Error<"address of %select{bit-field" 5386*67e74705SXin Li "|vector element|property expression|register variable}0 requested">; 5387*67e74705SXin Lidef ext_typecheck_addrof_void : Extension< 5388*67e74705SXin Li "ISO C forbids taking the address of an expression of type 'void'">; 5389*67e74705SXin Lidef err_unqualified_pointer_member_function : Error< 5390*67e74705SXin Li "must explicitly qualify name of member function when taking its address">; 5391*67e74705SXin Lidef err_invalid_form_pointer_member_function : Error< 5392*67e74705SXin Li "cannot create a non-constant pointer to member function">; 5393*67e74705SXin Lidef err_address_of_function_with_pass_object_size_params: Error< 5394*67e74705SXin Li "cannot take address of function %0 because parameter %1 has " 5395*67e74705SXin Li "pass_object_size attribute">; 5396*67e74705SXin Lidef err_parens_pointer_member_function : Error< 5397*67e74705SXin Li "cannot parenthesize the name of a method when forming a member pointer">; 5398*67e74705SXin Lidef err_typecheck_invalid_lvalue_addrof_addrof_function : Error< 5399*67e74705SXin Li "extra '&' taking address of overloaded function">; 5400*67e74705SXin Lidef err_typecheck_invalid_lvalue_addrof : Error< 5401*67e74705SXin Li "cannot take the address of an rvalue of type %0">; 5402*67e74705SXin Lidef ext_typecheck_addrof_temporary : ExtWarn< 5403*67e74705SXin Li "taking the address of a temporary object of type %0">, 5404*67e74705SXin Li InGroup<DiagGroup<"address-of-temporary">>, DefaultError; 5405*67e74705SXin Lidef err_typecheck_addrof_temporary : Error< 5406*67e74705SXin Li "taking the address of a temporary object of type %0">; 5407*67e74705SXin Lidef err_typecheck_addrof_dtor : Error< 5408*67e74705SXin Li "taking the address of a destructor">; 5409*67e74705SXin Lidef err_typecheck_unary_expr : Error< 5410*67e74705SXin Li "invalid argument type %0 to unary expression">; 5411*67e74705SXin Lidef err_typecheck_indirection_requires_pointer : Error< 5412*67e74705SXin Li "indirection requires pointer operand (%0 invalid)">; 5413*67e74705SXin Lidef ext_typecheck_indirection_through_void_pointer : ExtWarn< 5414*67e74705SXin Li "ISO C++ does not allow indirection on operand of type %0">, 5415*67e74705SXin Li InGroup<DiagGroup<"void-ptr-dereference">>; 5416*67e74705SXin Lidef warn_indirection_through_null : Warning< 5417*67e74705SXin Li "indirection of non-volatile null pointer will be deleted, not trap">, 5418*67e74705SXin Li InGroup<NullDereference>; 5419*67e74705SXin Lidef warn_binding_null_to_reference : Warning< 5420*67e74705SXin Li "binding dereferenced null pointer to reference has undefined behavior">, 5421*67e74705SXin Li InGroup<NullDereference>; 5422*67e74705SXin Lidef note_indirection_through_null : Note< 5423*67e74705SXin Li "consider using __builtin_trap() or qualifying pointer with 'volatile'">; 5424*67e74705SXin Lidef warn_pointer_indirection_from_incompatible_type : Warning< 5425*67e74705SXin Li "dereference of type %1 that was reinterpret_cast from type %0 has undefined " 5426*67e74705SXin Li "behavior">, 5427*67e74705SXin Li InGroup<UndefinedReinterpretCast>, DefaultIgnore; 5428*67e74705SXin Li 5429*67e74705SXin Lidef err_objc_object_assignment : Error< 5430*67e74705SXin Li "cannot assign to class object (%0 invalid)">; 5431*67e74705SXin Lidef err_typecheck_invalid_operands : Error< 5432*67e74705SXin Li "invalid operands to binary expression (%0 and %1)">; 5433*67e74705SXin Lidef err_typecheck_sub_ptr_compatible : Error< 5434*67e74705SXin Li "%diff{$ and $ are not pointers to compatible types|" 5435*67e74705SXin Li "pointers to incompatible types}0,1">; 5436*67e74705SXin Lidef ext_typecheck_ordered_comparison_of_pointer_integer : ExtWarn< 5437*67e74705SXin Li "ordered comparison between pointer and integer (%0 and %1)">; 5438*67e74705SXin Lidef ext_typecheck_ordered_comparison_of_pointer_and_zero : Extension< 5439*67e74705SXin Li "ordered comparison between pointer and zero (%0 and %1) is an extension">; 5440*67e74705SXin Lidef ext_typecheck_ordered_comparison_of_function_pointers : ExtWarn< 5441*67e74705SXin Li "ordered comparison of function pointers (%0 and %1)">; 5442*67e74705SXin Lidef ext_typecheck_comparison_of_fptr_to_void : Extension< 5443*67e74705SXin Li "equality comparison between function pointer and void pointer (%0 and %1)">; 5444*67e74705SXin Lidef err_typecheck_comparison_of_fptr_to_void : Error< 5445*67e74705SXin Li "equality comparison between function pointer and void pointer (%0 and %1)">; 5446*67e74705SXin Lidef ext_typecheck_comparison_of_pointer_integer : ExtWarn< 5447*67e74705SXin Li "comparison between pointer and integer (%0 and %1)">; 5448*67e74705SXin Lidef err_typecheck_comparison_of_pointer_integer : Error< 5449*67e74705SXin Li "comparison between pointer and integer (%0 and %1)">; 5450*67e74705SXin Lidef ext_typecheck_comparison_of_distinct_pointers : ExtWarn< 5451*67e74705SXin Li "comparison of distinct pointer types%diff{ ($ and $)|}0,1">, 5452*67e74705SXin Li InGroup<CompareDistinctPointerType>; 5453*67e74705SXin Lidef ext_typecheck_cond_incompatible_operands : ExtWarn< 5454*67e74705SXin Li "incompatible operand types (%0 and %1)">; 5455*67e74705SXin Lidef err_cond_voidptr_arc : Error < 5456*67e74705SXin Li "operands to conditional of types%diff{ $ and $|}0,1 are incompatible " 5457*67e74705SXin Li "in ARC mode">; 5458*67e74705SXin Lidef err_typecheck_comparison_of_distinct_pointers : Error< 5459*67e74705SXin Li "comparison of distinct pointer types%diff{ ($ and $)|}0,1">; 5460*67e74705SXin Lidef ext_typecheck_comparison_of_distinct_pointers_nonstandard : ExtWarn< 5461*67e74705SXin Li "comparison of distinct pointer types (%0 and %1) uses non-standard " 5462*67e74705SXin Li "composite pointer type %2">, InGroup<CompareDistinctPointerType>; 5463*67e74705SXin Lidef err_typecheck_op_on_nonoverlapping_address_space_pointers : Error< 5464*67e74705SXin Li "%select{comparison between %diff{ ($ and $)|}0,1" 5465*67e74705SXin Li "|arithmetic operation with operands of type %diff{ ($ and $)|}0,1" 5466*67e74705SXin Li "|conditional operator with the second and third operands of type " 5467*67e74705SXin Li "%diff{ ($ and $)|}0,1}2" 5468*67e74705SXin Li " which are pointers to non-overlapping address spaces">; 5469*67e74705SXin Li 5470*67e74705SXin Lidef err_typecheck_assign_const : Error< 5471*67e74705SXin Li "%select{" 5472*67e74705SXin Li "cannot assign to return value because function %1 returns a const value|" 5473*67e74705SXin Li "cannot assign to variable %1 with const-qualified type %2|" 5474*67e74705SXin Li "cannot assign to %select{non-|}1static data member %2 " 5475*67e74705SXin Li "with const-qualified type %3|" 5476*67e74705SXin Li "cannot assign to non-static data member within const member function %1|" 5477*67e74705SXin Li "read-only variable is not assignable}0">; 5478*67e74705SXin Li 5479*67e74705SXin Lidef note_typecheck_assign_const : Note< 5480*67e74705SXin Li "%select{" 5481*67e74705SXin Li "function %1 which returns const-qualified type %2 declared here|" 5482*67e74705SXin Li "variable %1 declared const here|" 5483*67e74705SXin Li "%select{non-|}1static data member %2 declared const here|" 5484*67e74705SXin Li "member function %q1 is declared const here}0">; 5485*67e74705SXin Li 5486*67e74705SXin Lidef warn_mixed_sign_comparison : Warning< 5487*67e74705SXin Li "comparison of integers of different signs: %0 and %1">, 5488*67e74705SXin Li InGroup<SignCompare>, DefaultIgnore; 5489*67e74705SXin Lidef warn_lunsigned_always_true_comparison : Warning< 5490*67e74705SXin Li "comparison of unsigned%select{| enum}2 expression %0 is always %1">, 5491*67e74705SXin Li InGroup<TautologicalCompare>; 5492*67e74705SXin Lidef warn_out_of_range_compare : Warning< 5493*67e74705SXin Li "comparison of %select{constant %0|true|false}1 with " 5494*67e74705SXin Li "%select{expression of type %2|boolean expression}3 is always " 5495*67e74705SXin Li "%select{false|true}4">, InGroup<TautologicalOutOfRangeCompare>; 5496*67e74705SXin Lidef warn_runsigned_always_true_comparison : Warning< 5497*67e74705SXin Li "comparison of %0 unsigned%select{| enum}2 expression is always %1">, 5498*67e74705SXin Li InGroup<TautologicalCompare>; 5499*67e74705SXin Lidef warn_comparison_of_mixed_enum_types : Warning< 5500*67e74705SXin Li "comparison of two values with different enumeration types" 5501*67e74705SXin Li "%diff{ ($ and $)|}0,1">, 5502*67e74705SXin Li InGroup<DiagGroup<"enum-compare">>; 5503*67e74705SXin Lidef warn_null_in_arithmetic_operation : Warning< 5504*67e74705SXin Li "use of NULL in arithmetic operation">, 5505*67e74705SXin Li InGroup<NullArithmetic>; 5506*67e74705SXin Lidef warn_null_in_comparison_operation : Warning< 5507*67e74705SXin Li "comparison between NULL and non-pointer " 5508*67e74705SXin Li "%select{(%1 and NULL)|(NULL and %1)}0">, 5509*67e74705SXin Li InGroup<NullArithmetic>; 5510*67e74705SXin Lidef err_shift_rhs_only_vector : Error< 5511*67e74705SXin Li "requested shift is a vector of type %0 but the first operand is not a " 5512*67e74705SXin Li "vector (%1)">; 5513*67e74705SXin Li 5514*67e74705SXin Lidef warn_logical_not_on_lhs_of_comparison : Warning< 5515*67e74705SXin Li "logical not is only applied to the left hand side of this comparison">, 5516*67e74705SXin Li InGroup<LogicalNotParentheses>; 5517*67e74705SXin Lidef note_logical_not_fix : Note< 5518*67e74705SXin Li "add parentheses after the '!' to evaluate the comparison first">; 5519*67e74705SXin Lidef note_logical_not_silence_with_parens : Note< 5520*67e74705SXin Li "add parentheses around left hand side expression to silence this warning">; 5521*67e74705SXin Li 5522*67e74705SXin Lidef err_invalid_this_use : Error< 5523*67e74705SXin Li "invalid use of 'this' outside of a non-static member function">; 5524*67e74705SXin Lidef err_this_static_member_func : Error< 5525*67e74705SXin Li "'this' cannot be%select{| implicitly}0 used in a static member function " 5526*67e74705SXin Li "declaration">; 5527*67e74705SXin Lidef err_invalid_member_use_in_static_method : Error< 5528*67e74705SXin Li "invalid use of member %0 in static member function">; 5529*67e74705SXin Lidef err_invalid_qualified_function_type : Error< 5530*67e74705SXin Li "%select{static |non-}0member function %select{of type %2 |}1" 5531*67e74705SXin Li "cannot have '%3' qualifier">; 5532*67e74705SXin Lidef err_compound_qualified_function_type : Error< 5533*67e74705SXin Li "%select{block pointer|pointer|reference}0 to function type %select{%2 |}1" 5534*67e74705SXin Li "cannot have '%3' qualifier">; 5535*67e74705SXin Li 5536*67e74705SXin Lidef err_ref_qualifier_overload : Error< 5537*67e74705SXin Li "cannot overload a member function %select{without a ref-qualifier|with " 5538*67e74705SXin Li "ref-qualifier '&'|with ref-qualifier '&&'}0 with a member function %select{" 5539*67e74705SXin Li "without a ref-qualifier|with ref-qualifier '&'|with ref-qualifier '&&'}1">; 5540*67e74705SXin Li 5541*67e74705SXin Lidef err_invalid_non_static_member_use : Error< 5542*67e74705SXin Li "invalid use of non-static data member %0">; 5543*67e74705SXin Lidef err_nested_non_static_member_use : Error< 5544*67e74705SXin Li "%select{call to non-static member function|use of non-static data member}0 " 5545*67e74705SXin Li "%2 of %1 from nested type %3">; 5546*67e74705SXin Lidef warn_cxx98_compat_non_static_member_use : Warning< 5547*67e74705SXin Li "use of non-static data member %0 in an unevaluated context is " 5548*67e74705SXin Li "incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; 5549*67e74705SXin Lidef err_invalid_incomplete_type_use : Error< 5550*67e74705SXin Li "invalid use of incomplete type %0">; 5551*67e74705SXin Lidef err_builtin_func_cast_more_than_one_arg : Error< 5552*67e74705SXin Li "function-style cast to a builtin type can only take one argument">; 5553*67e74705SXin Lidef err_value_init_for_array_type : Error< 5554*67e74705SXin Li "array types cannot be value-initialized">; 5555*67e74705SXin Lidef err_value_init_for_function_type : Error< 5556*67e74705SXin Li "function types cannot be value-initialized">; 5557*67e74705SXin Lidef warn_format_nonliteral_noargs : Warning< 5558*67e74705SXin Li "format string is not a string literal (potentially insecure)">, 5559*67e74705SXin Li InGroup<FormatSecurity>; 5560*67e74705SXin Lidef warn_format_nonliteral : Warning< 5561*67e74705SXin Li "format string is not a string literal">, 5562*67e74705SXin Li InGroup<FormatNonLiteral>, DefaultIgnore; 5563*67e74705SXin Li 5564*67e74705SXin Lidef err_unexpected_interface : Error< 5565*67e74705SXin Li "unexpected interface name %0: expected expression">; 5566*67e74705SXin Lidef err_ref_non_value : Error<"%0 does not refer to a value">; 5567*67e74705SXin Lidef err_ref_vm_type : Error< 5568*67e74705SXin Li "cannot refer to declaration with a variably modified type inside block">; 5569*67e74705SXin Lidef err_ref_flexarray_type : Error< 5570*67e74705SXin Li "cannot refer to declaration of structure variable with flexible array member " 5571*67e74705SXin Li "inside block">; 5572*67e74705SXin Lidef err_ref_array_type : Error< 5573*67e74705SXin Li "cannot refer to declaration with an array type inside block">; 5574*67e74705SXin Lidef err_property_not_found : Error< 5575*67e74705SXin Li "property %0 not found on object of type %1">; 5576*67e74705SXin Lidef err_invalid_property_name : Error< 5577*67e74705SXin Li "%0 is not a valid property name (accessing an object of type %1)">; 5578*67e74705SXin Lidef err_getter_not_found : Error< 5579*67e74705SXin Li "no getter method for read from property">; 5580*67e74705SXin Lidef err_objc_subscript_method_not_found : Error< 5581*67e74705SXin Li "expected method to %select{read|write}1 %select{dictionary|array}2 element not " 5582*67e74705SXin Li "found on object of type %0">; 5583*67e74705SXin Lidef err_objc_subscript_index_type : Error< 5584*67e74705SXin Li "method index parameter type %0 is not integral type">; 5585*67e74705SXin Lidef err_objc_subscript_key_type : Error< 5586*67e74705SXin Li "method key parameter type %0 is not object type">; 5587*67e74705SXin Lidef err_objc_subscript_dic_object_type : Error< 5588*67e74705SXin Li "method object parameter type %0 is not object type">; 5589*67e74705SXin Lidef err_objc_subscript_object_type : Error< 5590*67e74705SXin Li "cannot assign to this %select{dictionary|array}1 because assigning method's " 5591*67e74705SXin Li "2nd parameter of type %0 is not an Objective-C pointer type">; 5592*67e74705SXin Lidef err_objc_subscript_base_type : Error< 5593*67e74705SXin Li "%select{dictionary|array}1 subscript base type %0 is not an Objective-C object">; 5594*67e74705SXin Lidef err_objc_multiple_subscript_type_conversion : Error< 5595*67e74705SXin Li "indexing expression is invalid because subscript type %0 has " 5596*67e74705SXin Li "multiple type conversion functions">; 5597*67e74705SXin Lidef err_objc_subscript_type_conversion : Error< 5598*67e74705SXin Li "indexing expression is invalid because subscript type %0 is not an integral" 5599*67e74705SXin Li " or Objective-C pointer type">; 5600*67e74705SXin Lidef err_objc_subscript_pointer : Error< 5601*67e74705SXin Li "indexing expression is invalid because subscript type %0 is not an" 5602*67e74705SXin Li " Objective-C pointer">; 5603*67e74705SXin Lidef err_objc_indexing_method_result_type : Error< 5604*67e74705SXin Li "method for accessing %select{dictionary|array}1 element must have Objective-C" 5605*67e74705SXin Li " object return type instead of %0">; 5606*67e74705SXin Lidef err_objc_index_incomplete_class_type : Error< 5607*67e74705SXin Li "Objective-C index expression has incomplete class type %0">; 5608*67e74705SXin Lidef err_illegal_container_subscripting_op : Error< 5609*67e74705SXin Li "illegal operation on Objective-C container subscripting">; 5610*67e74705SXin Lidef err_property_not_found_forward_class : Error< 5611*67e74705SXin Li "property %0 cannot be found in forward class object %1">; 5612*67e74705SXin Lidef err_property_not_as_forward_class : Error< 5613*67e74705SXin Li "property %0 refers to an incomplete Objective-C class %1 " 5614*67e74705SXin Li "(with no @interface available)">; 5615*67e74705SXin Lidef note_forward_class : Note< 5616*67e74705SXin Li "forward declaration of class here">; 5617*67e74705SXin Lidef err_duplicate_property : Error< 5618*67e74705SXin Li "property has a previous declaration">; 5619*67e74705SXin Lidef ext_gnu_void_ptr : Extension< 5620*67e74705SXin Li "arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension">, 5621*67e74705SXin Li InGroup<PointerArith>; 5622*67e74705SXin Lidef ext_gnu_ptr_func_arith : Extension< 5623*67e74705SXin Li "arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 function " 5624*67e74705SXin Li "type%select{|s}2 %1%select{| and %3}2 is a GNU extension">, 5625*67e74705SXin Li InGroup<PointerArith>; 5626*67e74705SXin Lidef error_readonly_message_assignment : Error< 5627*67e74705SXin Li "assigning to 'readonly' return result of an Objective-C message not allowed">; 5628*67e74705SXin Lidef ext_integer_increment_complex : Extension< 5629*67e74705SXin Li "ISO C does not support '++'/'--' on complex integer type %0">; 5630*67e74705SXin Lidef ext_integer_complement_complex : Extension< 5631*67e74705SXin Li "ISO C does not support '~' for complex conjugation of %0">; 5632*67e74705SXin Lidef err_nosetter_property_assignment : Error< 5633*67e74705SXin Li "%select{assignment to readonly property|" 5634*67e74705SXin Li "no setter method %1 for assignment to property}0">; 5635*67e74705SXin Lidef err_nosetter_property_incdec : Error< 5636*67e74705SXin Li "%select{%select{increment|decrement}1 of readonly property|" 5637*67e74705SXin Li "no setter method %2 for %select{increment|decrement}1 of property}0">; 5638*67e74705SXin Lidef err_nogetter_property_compound_assignment : Error< 5639*67e74705SXin Li "a getter method is needed to perform a compound assignment on a property">; 5640*67e74705SXin Lidef err_nogetter_property_incdec : Error< 5641*67e74705SXin Li "no getter method %1 for %select{increment|decrement}0 of property">; 5642*67e74705SXin Lidef error_no_subobject_property_setting : Error< 5643*67e74705SXin Li "expression is not assignable">; 5644*67e74705SXin Lidef err_qualified_objc_access : Error< 5645*67e74705SXin Li "%select{property|instance variable}0 access cannot be qualified with '%1'">; 5646*67e74705SXin Li 5647*67e74705SXin Lidef ext_freestanding_complex : Extension< 5648*67e74705SXin Li "complex numbers are an extension in a freestanding C99 implementation">; 5649*67e74705SXin Li 5650*67e74705SXin Li// FIXME: Remove when we support imaginary. 5651*67e74705SXin Lidef err_imaginary_not_supported : Error<"imaginary types are not supported">; 5652*67e74705SXin Li 5653*67e74705SXin Li// Obj-c expressions 5654*67e74705SXin Lidef warn_root_inst_method_not_found : Warning< 5655*67e74705SXin Li "instance method %0 is being used on 'Class' which is not in the root class">, 5656*67e74705SXin Li InGroup<MethodAccess>; 5657*67e74705SXin Lidef warn_class_method_not_found : Warning< 5658*67e74705SXin Li "class method %objcclass0 not found (return type defaults to 'id')">, 5659*67e74705SXin Li InGroup<MethodAccess>; 5660*67e74705SXin Lidef warn_instance_method_on_class_found : Warning< 5661*67e74705SXin Li "instance method %0 found instead of class method %1">, 5662*67e74705SXin Li InGroup<MethodAccess>; 5663*67e74705SXin Lidef warn_inst_method_not_found : Warning< 5664*67e74705SXin Li "instance method %objcinstance0 not found (return type defaults to 'id')">, 5665*67e74705SXin Li InGroup<MethodAccess>; 5666*67e74705SXin Lidef warn_instance_method_not_found_with_typo : Warning< 5667*67e74705SXin Li "instance method %objcinstance0 not found (return type defaults to 'id')" 5668*67e74705SXin Li "; did you mean %objcinstance2?">, InGroup<MethodAccess>; 5669*67e74705SXin Lidef warn_class_method_not_found_with_typo : Warning< 5670*67e74705SXin Li "class method %objcclass0 not found (return type defaults to 'id')" 5671*67e74705SXin Li "; did you mean %objcclass2?">, InGroup<MethodAccess>; 5672*67e74705SXin Lidef error_method_not_found_with_typo : Error< 5673*67e74705SXin Li "%select{instance|class}1 method %0 not found " 5674*67e74705SXin Li "; did you mean %2?">; 5675*67e74705SXin Lidef error_no_super_class_message : Error< 5676*67e74705SXin Li "no @interface declaration found in class messaging of %0">; 5677*67e74705SXin Lidef error_root_class_cannot_use_super : Error< 5678*67e74705SXin Li "%0 cannot use 'super' because it is a root class">; 5679*67e74705SXin Lidef err_invalid_receiver_to_message_super : Error< 5680*67e74705SXin Li "'super' is only valid in a method body">; 5681*67e74705SXin Lidef err_invalid_receiver_class_message : Error< 5682*67e74705SXin Li "receiver type %0 is not an Objective-C class">; 5683*67e74705SXin Lidef err_missing_open_square_message_send : Error< 5684*67e74705SXin Li "missing '[' at start of message send expression">; 5685*67e74705SXin Lidef warn_bad_receiver_type : Warning< 5686*67e74705SXin Li "receiver type %0 is not 'id' or interface pointer, consider " 5687*67e74705SXin Li "casting it to 'id'">,InGroup<ObjCReceiver>; 5688*67e74705SXin Lidef err_bad_receiver_type : Error<"bad receiver type %0">; 5689*67e74705SXin Lidef err_incomplete_receiver_type : Error<"incomplete receiver type %0">; 5690*67e74705SXin Lidef err_unknown_receiver_suggest : Error< 5691*67e74705SXin Li "unknown receiver %0; did you mean %1?">; 5692*67e74705SXin Lidef error_objc_throw_expects_object : Error< 5693*67e74705SXin Li "@throw requires an Objective-C object type (%0 invalid)">; 5694*67e74705SXin Lidef error_objc_synchronized_expects_object : Error< 5695*67e74705SXin Li "@synchronized requires an Objective-C object type (%0 invalid)">; 5696*67e74705SXin Lidef error_rethrow_used_outside_catch : Error< 5697*67e74705SXin Li "@throw (rethrow) used outside of a @catch block">; 5698*67e74705SXin Lidef err_attribute_multiple_objc_gc : Error< 5699*67e74705SXin Li "multiple garbage collection attributes specified for type">; 5700*67e74705SXin Lidef err_catch_param_not_objc_type : Error< 5701*67e74705SXin Li "@catch parameter is not a pointer to an interface type">; 5702*67e74705SXin Lidef err_illegal_qualifiers_on_catch_parm : Error< 5703*67e74705SXin Li "illegal qualifiers on @catch parameter">; 5704*67e74705SXin Lidef err_storage_spec_on_catch_parm : Error< 5705*67e74705SXin Li "@catch parameter cannot have storage specifier '%0'">; 5706*67e74705SXin Lidef warn_register_objc_catch_parm : Warning< 5707*67e74705SXin Li "'register' storage specifier on @catch parameter will be ignored">; 5708*67e74705SXin Lidef err_qualified_objc_catch_parm : Error< 5709*67e74705SXin Li "@catch parameter declarator cannot be qualified">; 5710*67e74705SXin Lidef warn_objc_pointer_cxx_catch_fragile : Warning< 5711*67e74705SXin Li "cannot catch an exception thrown with @throw in C++ in the non-unified " 5712*67e74705SXin Li "exception model">, InGroup<ObjCNonUnifiedException>; 5713*67e74705SXin Lidef err_objc_object_catch : Error< 5714*67e74705SXin Li "cannot catch an Objective-C object by value">; 5715*67e74705SXin Lidef err_incomplete_type_objc_at_encode : Error< 5716*67e74705SXin Li "'@encode' of incomplete type %0">; 5717*67e74705SXin Lidef warn_objc_circular_container : Warning< 5718*67e74705SXin Li "adding '%0' to '%1' might cause circular dependency in container">, 5719*67e74705SXin Li InGroup<DiagGroup<"objc-circular-container">>; 5720*67e74705SXin Lidef note_objc_circular_container_declared_here : Note<"'%0' declared here">; 5721*67e74705SXin Li 5722*67e74705SXin Lidef warn_setter_getter_impl_required : Warning< 5723*67e74705SXin Li "property %0 requires method %1 to be defined - " 5724*67e74705SXin Li "use @synthesize, @dynamic or provide a method implementation " 5725*67e74705SXin Li "in this class implementation">, 5726*67e74705SXin Li InGroup<ObjCPropertyImpl>; 5727*67e74705SXin Lidef warn_setter_getter_impl_required_in_category : Warning< 5728*67e74705SXin Li "property %0 requires method %1 to be defined - " 5729*67e74705SXin Li "use @dynamic or provide a method implementation in this category">, 5730*67e74705SXin Li InGroup<ObjCPropertyImpl>; 5731*67e74705SXin Lidef note_parameter_named_here : Note< 5732*67e74705SXin Li "passing argument to parameter %0 here">; 5733*67e74705SXin Lidef note_parameter_here : Note< 5734*67e74705SXin Li "passing argument to parameter here">; 5735*67e74705SXin Lidef note_method_return_type_change : Note< 5736*67e74705SXin Li "compiler has implicitly changed method %0 return type">; 5737*67e74705SXin Li 5738*67e74705SXin Lidef warn_impl_required_for_class_property : Warning< 5739*67e74705SXin Li "class property %0 requires method %1 to be defined - " 5740*67e74705SXin Li "use @dynamic or provide a method implementation " 5741*67e74705SXin Li "in this class implementation">, 5742*67e74705SXin Li InGroup<ObjCPropertyImpl>; 5743*67e74705SXin Lidef warn_impl_required_in_category_for_class_property : Warning< 5744*67e74705SXin Li "class property %0 requires method %1 to be defined - " 5745*67e74705SXin Li "use @dynamic or provide a method implementation in this category">, 5746*67e74705SXin Li InGroup<ObjCPropertyImpl>; 5747*67e74705SXin Li 5748*67e74705SXin Li// C++ casts 5749*67e74705SXin Li// These messages adhere to the TryCast pattern: %0 is an int specifying the 5750*67e74705SXin Li// cast type, %1 is the source type, %2 is the destination type. 5751*67e74705SXin Lidef err_bad_reinterpret_cast_overload : Error< 5752*67e74705SXin Li "reinterpret_cast cannot resolve overloaded function %0 to type %1">; 5753*67e74705SXin Li 5754*67e74705SXin Lidef warn_reinterpret_different_from_static : Warning< 5755*67e74705SXin Li "'reinterpret_cast' %select{from|to}3 class %0 %select{to|from}3 its " 5756*67e74705SXin Li "%select{virtual base|base at non-zero offset}2 %1 behaves differently from " 5757*67e74705SXin Li "'static_cast'">, InGroup<ReinterpretBaseClass>; 5758*67e74705SXin Lidef note_reinterpret_updowncast_use_static: Note< 5759*67e74705SXin Li "use 'static_cast' to adjust the pointer correctly while " 5760*67e74705SXin Li "%select{upcasting|downcasting}0">; 5761*67e74705SXin Li 5762*67e74705SXin Lidef err_bad_static_cast_overload : Error< 5763*67e74705SXin Li "address of overloaded function %0 cannot be static_cast to type %1">; 5764*67e74705SXin Li 5765*67e74705SXin Lidef err_bad_cstyle_cast_overload : Error< 5766*67e74705SXin Li "address of overloaded function %0 cannot be cast to type %1">; 5767*67e74705SXin Li 5768*67e74705SXin Li 5769*67e74705SXin Lidef err_bad_cxx_cast_generic : Error< 5770*67e74705SXin Li "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 5771*67e74705SXin Li "functional-style cast}0 from %1 to %2 is not allowed">; 5772*67e74705SXin Lidef err_bad_cxx_cast_unrelated_class : Error< 5773*67e74705SXin Li "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 5774*67e74705SXin Li "functional-style cast}0 from %1 to %2, which are not related by " 5775*67e74705SXin Li "inheritance, is not allowed">; 5776*67e74705SXin Lidef note_type_incomplete : Note<"%0 is incomplete">; 5777*67e74705SXin Lidef err_bad_cxx_cast_rvalue : Error< 5778*67e74705SXin Li "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 5779*67e74705SXin Li "functional-style cast}0 from rvalue to reference type %2">; 5780*67e74705SXin Lidef err_bad_cxx_cast_bitfield : Error< 5781*67e74705SXin Li "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 5782*67e74705SXin Li "functional-style cast}0 from bit-field lvalue to reference type %2">; 5783*67e74705SXin Lidef err_bad_cxx_cast_qualifiers_away : Error< 5784*67e74705SXin Li "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|" 5785*67e74705SXin Li "functional-style cast}0 from %1 to %2 casts away qualifiers">; 5786*67e74705SXin Lidef err_bad_const_cast_dest : Error< 5787*67e74705SXin Li "%select{const_cast||||C-style cast|functional-style cast}0 to %2, " 5788*67e74705SXin Li "which is not a reference, pointer-to-object, or pointer-to-data-member">; 5789*67e74705SXin Lidef ext_cast_fn_obj : Extension< 5790*67e74705SXin Li "cast between pointer-to-function and pointer-to-object is an extension">; 5791*67e74705SXin Lidef ext_ms_cast_fn_obj : ExtWarn< 5792*67e74705SXin Li "static_cast between pointer-to-function and pointer-to-object is a " 5793*67e74705SXin Li "Microsoft extension">, InGroup<MicrosoftCast>; 5794*67e74705SXin Lidef warn_cxx98_compat_cast_fn_obj : Warning< 5795*67e74705SXin Li "cast between pointer-to-function and pointer-to-object is incompatible with C++98">, 5796*67e74705SXin Li InGroup<CXX98CompatPedantic>, DefaultIgnore; 5797*67e74705SXin Lidef err_bad_reinterpret_cast_small_int : Error< 5798*67e74705SXin Li "cast from pointer to smaller type %2 loses information">; 5799*67e74705SXin Lidef err_bad_cxx_cast_vector_to_scalar_different_size : Error< 5800*67e74705SXin Li "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " 5801*67e74705SXin Li "to scalar %2 of different size">; 5802*67e74705SXin Lidef err_bad_cxx_cast_scalar_to_vector_different_size : Error< 5803*67e74705SXin Li "%select{||reinterpret_cast||C-style cast|}0 from scalar %1 " 5804*67e74705SXin Li "to vector %2 of different size">; 5805*67e74705SXin Lidef err_bad_cxx_cast_vector_to_vector_different_size : Error< 5806*67e74705SXin Li "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " 5807*67e74705SXin Li "to vector %2 of different size">; 5808*67e74705SXin Lidef err_bad_lvalue_to_rvalue_cast : Error< 5809*67e74705SXin Li "cannot cast from lvalue of type %1 to rvalue reference type %2; types are " 5810*67e74705SXin Li "not compatible">; 5811*67e74705SXin Lidef err_bad_static_cast_pointer_nonpointer : Error< 5812*67e74705SXin Li "cannot cast from type %1 to pointer type %2">; 5813*67e74705SXin Lidef err_bad_static_cast_member_pointer_nonmp : Error< 5814*67e74705SXin Li "cannot cast from type %1 to member pointer type %2">; 5815*67e74705SXin Lidef err_bad_cxx_cast_member_pointer_size : Error< 5816*67e74705SXin Li "cannot %select{||reinterpret_cast||C-style cast|}0 from member pointer " 5817*67e74705SXin Li "type %1 to member pointer type %2 of different size">; 5818*67e74705SXin Lidef err_bad_reinterpret_cast_reference : Error< 5819*67e74705SXin Li "reinterpret_cast of a %0 to %1 needs its address, which is not allowed">; 5820*67e74705SXin Lidef warn_undefined_reinterpret_cast : Warning< 5821*67e74705SXin Li "reinterpret_cast from %0 to %1 has undefined behavior">, 5822*67e74705SXin Li InGroup<UndefinedReinterpretCast>, DefaultIgnore; 5823*67e74705SXin Li 5824*67e74705SXin Li// These messages don't adhere to the pattern. 5825*67e74705SXin Li// FIXME: Display the path somehow better. 5826*67e74705SXin Lidef err_ambiguous_base_to_derived_cast : Error< 5827*67e74705SXin Li "ambiguous cast from base %0 to derived %1:%2">; 5828*67e74705SXin Lidef err_static_downcast_via_virtual : Error< 5829*67e74705SXin Li "cannot cast %0 to %1 via virtual base %2">; 5830*67e74705SXin Lidef err_downcast_from_inaccessible_base : Error< 5831*67e74705SXin Li "cannot cast %select{private|protected}2 base class %1 to %0">; 5832*67e74705SXin Lidef err_upcast_to_inaccessible_base : Error< 5833*67e74705SXin Li "cannot cast %0 to its %select{private|protected}2 base class %1">; 5834*67e74705SXin Lidef err_bad_dynamic_cast_not_ref_or_ptr : Error< 5835*67e74705SXin Li "%0 is not a reference or pointer">; 5836*67e74705SXin Lidef err_bad_dynamic_cast_not_class : Error<"%0 is not a class">; 5837*67e74705SXin Lidef err_bad_dynamic_cast_incomplete : Error<"%0 is an incomplete type">; 5838*67e74705SXin Lidef err_bad_dynamic_cast_not_ptr : Error<"%0 is not a pointer">; 5839*67e74705SXin Lidef err_bad_dynamic_cast_not_polymorphic : Error<"%0 is not polymorphic">; 5840*67e74705SXin Li 5841*67e74705SXin Li// Other C++ expressions 5842*67e74705SXin Lidef err_need_header_before_typeid : Error< 5843*67e74705SXin Li "you need to include <typeinfo> before using the 'typeid' operator">; 5844*67e74705SXin Lidef err_need_header_before_ms_uuidof : Error< 5845*67e74705SXin Li "you need to include <guiddef.h> before using the '__uuidof' operator">; 5846*67e74705SXin Lidef err_ms___leave_not_in___try : Error< 5847*67e74705SXin Li "'__leave' statement not in __try block">; 5848*67e74705SXin Lidef err_uuidof_without_guid : Error< 5849*67e74705SXin Li "cannot call operator __uuidof on a type with no GUID">; 5850*67e74705SXin Lidef err_uuidof_with_multiple_guids : Error< 5851*67e74705SXin Li "cannot call operator __uuidof on a type with multiple GUIDs">; 5852*67e74705SXin Lidef err_incomplete_typeid : Error<"'typeid' of incomplete type %0">; 5853*67e74705SXin Lidef err_variably_modified_typeid : Error<"'typeid' of variably modified type %0">; 5854*67e74705SXin Lidef err_static_illegal_in_new : Error< 5855*67e74705SXin Li "the 'static' modifier for the array size is not legal in new expressions">; 5856*67e74705SXin Lidef err_array_new_needs_size : Error< 5857*67e74705SXin Li "array size must be specified in new expressions">; 5858*67e74705SXin Lidef err_bad_new_type : Error< 5859*67e74705SXin Li "cannot allocate %select{function|reference}1 type %0 with new">; 5860*67e74705SXin Lidef err_new_incomplete_type : Error< 5861*67e74705SXin Li "allocation of incomplete type %0">; 5862*67e74705SXin Lidef err_new_array_nonconst : Error< 5863*67e74705SXin Li "only the first dimension of an allocated array may have dynamic size">; 5864*67e74705SXin Lidef err_new_array_init_args : Error< 5865*67e74705SXin Li "array 'new' cannot have initialization arguments">; 5866*67e74705SXin Lidef ext_new_paren_array_nonconst : ExtWarn< 5867*67e74705SXin Li "when type is in parentheses, array cannot have dynamic size">; 5868*67e74705SXin Lidef err_placement_new_non_placement_delete : Error< 5869*67e74705SXin Li "'new' expression with placement arguments refers to non-placement " 5870*67e74705SXin Li "'operator delete'">; 5871*67e74705SXin Lidef err_array_size_not_integral : Error< 5872*67e74705SXin Li "array size expression must have integral or %select{|unscoped }0" 5873*67e74705SXin Li "enumeration type, not %1">; 5874*67e74705SXin Lidef err_array_size_incomplete_type : Error< 5875*67e74705SXin Li "array size expression has incomplete class type %0">; 5876*67e74705SXin Lidef err_array_size_explicit_conversion : Error< 5877*67e74705SXin Li "array size expression of type %0 requires explicit conversion to type %1">; 5878*67e74705SXin Lidef note_array_size_conversion : Note< 5879*67e74705SXin Li "conversion to %select{integral|enumeration}0 type %1 declared here">; 5880*67e74705SXin Lidef err_array_size_ambiguous_conversion : Error< 5881*67e74705SXin Li "ambiguous conversion of array size expression of type %0 to an integral or " 5882*67e74705SXin Li "enumeration type">; 5883*67e74705SXin Lidef ext_array_size_conversion : Extension< 5884*67e74705SXin Li "implicit conversion from array size expression of type %0 to " 5885*67e74705SXin Li "%select{integral|enumeration}1 type %2 is a C++11 extension">, 5886*67e74705SXin Li InGroup<CXX11>; 5887*67e74705SXin Lidef warn_cxx98_compat_array_size_conversion : Warning< 5888*67e74705SXin Li "implicit conversion from array size expression of type %0 to " 5889*67e74705SXin Li "%select{integral|enumeration}1 type %2 is incompatible with C++98">, 5890*67e74705SXin Li InGroup<CXX98CompatPedantic>, DefaultIgnore; 5891*67e74705SXin Lidef err_address_space_qualified_new : Error< 5892*67e74705SXin Li "'new' cannot allocate objects of type %0 in address space '%1'">; 5893*67e74705SXin Lidef err_address_space_qualified_delete : Error< 5894*67e74705SXin Li "'delete' cannot delete objects of type %0 in address space '%1'">; 5895*67e74705SXin Li 5896*67e74705SXin Lidef err_default_init_const : Error< 5897*67e74705SXin Li "default initialization of an object of const type %0" 5898*67e74705SXin Li "%select{| without a user-provided default constructor}1">; 5899*67e74705SXin Lidef ext_default_init_const : ExtWarn< 5900*67e74705SXin Li "default initialization of an object of const type %0" 5901*67e74705SXin Li "%select{| without a user-provided default constructor}1 " 5902*67e74705SXin Li "is a Microsoft extension">, 5903*67e74705SXin Li InGroup<MicrosoftConstInit>; 5904*67e74705SXin Lidef err_delete_operand : Error<"cannot delete expression of type %0">; 5905*67e74705SXin Lidef ext_delete_void_ptr_operand : ExtWarn< 5906*67e74705SXin Li "cannot delete expression with pointer-to-'void' type %0">, 5907*67e74705SXin Li InGroup<DeleteIncomplete>; 5908*67e74705SXin Lidef err_ambiguous_delete_operand : Error< 5909*67e74705SXin Li "ambiguous conversion of delete expression of type %0 to a pointer">; 5910*67e74705SXin Lidef warn_delete_incomplete : Warning< 5911*67e74705SXin Li "deleting pointer to incomplete type %0 may cause undefined behavior">, 5912*67e74705SXin Li InGroup<DeleteIncomplete>; 5913*67e74705SXin Lidef err_delete_incomplete_class_type : Error< 5914*67e74705SXin Li "deleting incomplete class type %0; no conversions to pointer type">; 5915*67e74705SXin Lidef err_delete_explicit_conversion : Error< 5916*67e74705SXin Li "converting delete expression from type %0 to type %1 invokes an explicit " 5917*67e74705SXin Li "conversion function">; 5918*67e74705SXin Lidef note_delete_conversion : Note<"conversion to pointer type %0">; 5919*67e74705SXin Lidef warn_delete_array_type : Warning< 5920*67e74705SXin Li "'delete' applied to a pointer-to-array type %0 treated as 'delete[]'">; 5921*67e74705SXin Lidef warn_mismatched_delete_new : Warning< 5922*67e74705SXin Li "'delete%select{|[]}0' applied to a pointer that was allocated with " 5923*67e74705SXin Li "'new%select{[]|}0'; did you mean 'delete%select{[]|}0'?">, 5924*67e74705SXin Li InGroup<DiagGroup<"mismatched-new-delete">>; 5925*67e74705SXin Lidef note_allocated_here : Note<"allocated with 'new%select{[]|}0' here">; 5926*67e74705SXin Lidef err_no_suitable_delete_member_function_found : Error< 5927*67e74705SXin Li "no suitable member %0 in %1">; 5928*67e74705SXin Lidef err_ambiguous_suitable_delete_member_function_found : Error< 5929*67e74705SXin Li "multiple suitable %0 functions in %1">; 5930*67e74705SXin Lidef note_member_declared_here : Note< 5931*67e74705SXin Li "member %0 declared here">; 5932*67e74705SXin Lidef err_decrement_bool : Error<"cannot decrement expression of type bool">; 5933*67e74705SXin Lidef warn_increment_bool : Warning< 5934*67e74705SXin Li "incrementing expression of type bool is deprecated and " 5935*67e74705SXin Li "incompatible with C++1z">, InGroup<DeprecatedIncrementBool>; 5936*67e74705SXin Lidef ext_increment_bool : ExtWarn< 5937*67e74705SXin Li "ISO C++1z does not allow incrementing expression of type bool">, 5938*67e74705SXin Li DefaultError, InGroup<IncrementBool>; 5939*67e74705SXin Lidef err_increment_decrement_enum : Error< 5940*67e74705SXin Li "cannot %select{decrement|increment}0 expression of enum type %1">; 5941*67e74705SXin Lidef err_catch_incomplete_ptr : Error< 5942*67e74705SXin Li "cannot catch pointer to incomplete type %0">; 5943*67e74705SXin Lidef err_catch_incomplete_ref : Error< 5944*67e74705SXin Li "cannot catch reference to incomplete type %0">; 5945*67e74705SXin Lidef err_catch_incomplete : Error<"cannot catch incomplete type %0">; 5946*67e74705SXin Lidef err_catch_rvalue_ref : Error<"cannot catch exceptions by rvalue reference">; 5947*67e74705SXin Lidef err_catch_variably_modified : Error< 5948*67e74705SXin Li "cannot catch variably modified type %0">; 5949*67e74705SXin Lidef err_qualified_catch_declarator : Error< 5950*67e74705SXin Li "exception declarator cannot be qualified">; 5951*67e74705SXin Lidef err_early_catch_all : Error<"catch-all handler must come last">; 5952*67e74705SXin Lidef err_bad_memptr_rhs : Error< 5953*67e74705SXin Li "right hand operand to %0 has non-pointer-to-member type %1">; 5954*67e74705SXin Lidef err_bad_memptr_lhs : Error< 5955*67e74705SXin Li "left hand operand to %0 must be a %select{|pointer to }1class " 5956*67e74705SXin Li "compatible with the right hand operand, but is %2">; 5957*67e74705SXin Lidef warn_exception_caught_by_earlier_handler : Warning< 5958*67e74705SXin Li "exception of type %0 will be caught by earlier handler">, 5959*67e74705SXin Li InGroup<Exceptions>; 5960*67e74705SXin Lidef note_previous_exception_handler : Note<"for type %0">; 5961*67e74705SXin Lidef err_exceptions_disabled : Error< 5962*67e74705SXin Li "cannot use '%0' with exceptions disabled">; 5963*67e74705SXin Lidef err_objc_exceptions_disabled : Error< 5964*67e74705SXin Li "cannot use '%0' with Objective-C exceptions disabled">; 5965*67e74705SXin Lidef err_seh_try_outside_functions : Error< 5966*67e74705SXin Li "cannot use SEH '__try' in blocks, captured regions, or Obj-C method decls">; 5967*67e74705SXin Lidef err_mixing_cxx_try_seh_try : Error< 5968*67e74705SXin Li "cannot use C++ 'try' in the same function as SEH '__try'">; 5969*67e74705SXin Lidef err_seh_try_unsupported : Error< 5970*67e74705SXin Li "SEH '__try' is not supported on this target">; 5971*67e74705SXin Lidef note_conflicting_try_here : Note< 5972*67e74705SXin Li "conflicting %0 here">; 5973*67e74705SXin Lidef warn_jump_out_of_seh_finally : Warning< 5974*67e74705SXin Li "jump out of __finally block has undefined behavior">, 5975*67e74705SXin Li InGroup<DiagGroup<"jump-seh-finally">>; 5976*67e74705SXin Lidef warn_non_virtual_dtor : Warning< 5977*67e74705SXin Li "%0 has virtual functions but non-virtual destructor">, 5978*67e74705SXin Li InGroup<NonVirtualDtor>, DefaultIgnore; 5979*67e74705SXin Lidef warn_delete_non_virtual_dtor : Warning< 5980*67e74705SXin Li "%select{delete|destructor}0 called on non-final %1 that has " 5981*67e74705SXin Li "virtual functions but non-virtual destructor">, 5982*67e74705SXin Li InGroup<DeleteNonVirtualDtor>, DefaultIgnore; 5983*67e74705SXin Lidef note_delete_non_virtual : Note< 5984*67e74705SXin Li "qualify call to silence this warning">; 5985*67e74705SXin Lidef warn_delete_abstract_non_virtual_dtor : Warning< 5986*67e74705SXin Li "%select{delete|destructor}0 called on %1 that is abstract but has " 5987*67e74705SXin Li "non-virtual destructor">, InGroup<DeleteNonVirtualDtor>; 5988*67e74705SXin Lidef warn_overloaded_virtual : Warning< 5989*67e74705SXin Li "%q0 hides overloaded virtual %select{function|functions}1">, 5990*67e74705SXin Li InGroup<OverloadedVirtual>, DefaultIgnore; 5991*67e74705SXin Lidef note_hidden_overloaded_virtual_declared_here : Note< 5992*67e74705SXin Li "hidden overloaded virtual function %q0 declared here" 5993*67e74705SXin Li "%select{|: different classes%diff{ ($ vs $)|}2,3" 5994*67e74705SXin Li "|: different number of parameters (%2 vs %3)" 5995*67e74705SXin Li "|: type mismatch at %ordinal2 parameter%diff{ ($ vs $)|}3,4" 5996*67e74705SXin Li "|: different return type%diff{ ($ vs $)|}2,3" 5997*67e74705SXin Li "|: different qualifiers (" 5998*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 5999*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}2 vs " 6000*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 6001*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}3)}1">; 6002*67e74705SXin Lidef warn_using_directive_in_header : Warning< 6003*67e74705SXin Li "using namespace directive in global context in header">, 6004*67e74705SXin Li InGroup<HeaderHygiene>, DefaultIgnore; 6005*67e74705SXin Lidef warn_overaligned_type : Warning< 6006*67e74705SXin Li "type %0 requires %1 bytes of alignment and the default allocator only " 6007*67e74705SXin Li "guarantees %2 bytes">, 6008*67e74705SXin Li InGroup<OveralignedType>, DefaultIgnore; 6009*67e74705SXin Li 6010*67e74705SXin Lidef err_conditional_void_nonvoid : Error< 6011*67e74705SXin Li "%select{left|right}1 operand to ? is void, but %select{right|left}1 operand " 6012*67e74705SXin Li "is of type %0">; 6013*67e74705SXin Lidef err_conditional_ambiguous : Error< 6014*67e74705SXin Li "conditional expression is ambiguous; " 6015*67e74705SXin Li "%diff{$ can be converted to $ and vice versa|" 6016*67e74705SXin Li "types can be convert to each other}0,1">; 6017*67e74705SXin Lidef err_conditional_ambiguous_ovl : Error< 6018*67e74705SXin Li "conditional expression is ambiguous; %diff{$ and $|types}0,1 " 6019*67e74705SXin Li "can be converted to several common types">; 6020*67e74705SXin Lidef err_conditional_vector_size : Error< 6021*67e74705SXin Li "vector condition type %0 and result type %1 do not have the same number " 6022*67e74705SXin Li "of elements">; 6023*67e74705SXin Lidef err_conditional_vector_element_size : Error< 6024*67e74705SXin Li "vector condition type %0 and result type %1 do not have elements of the " 6025*67e74705SXin Li "same size">; 6026*67e74705SXin Li 6027*67e74705SXin Lidef err_throw_incomplete : Error< 6028*67e74705SXin Li "cannot throw object of incomplete type %0">; 6029*67e74705SXin Lidef err_throw_incomplete_ptr : Error< 6030*67e74705SXin Li "cannot throw pointer to object of incomplete type %0">; 6031*67e74705SXin Lidef err_return_in_constructor_handler : Error< 6032*67e74705SXin Li "return in the catch of a function try block of a constructor is illegal">; 6033*67e74705SXin Lidef warn_cdtor_function_try_handler_mem_expr : Warning< 6034*67e74705SXin Li "cannot refer to a non-static member from the handler of a " 6035*67e74705SXin Li "%select{constructor|destructor}0 function try block">, InGroup<Exceptions>; 6036*67e74705SXin Li 6037*67e74705SXin Lilet CategoryName = "Lambda Issue" in { 6038*67e74705SXin Li def err_capture_more_than_once : Error< 6039*67e74705SXin Li "%0 can appear only once in a capture list">; 6040*67e74705SXin Li def err_reference_capture_with_reference_default : Error< 6041*67e74705SXin Li "'&' cannot precede a capture when the capture default is '&'">; 6042*67e74705SXin Li def err_this_capture_with_copy_default : Error< 6043*67e74705SXin Li "'this' cannot be explicitly captured when the capture default is '='">; 6044*67e74705SXin Li def err_copy_capture_with_copy_default : Error< 6045*67e74705SXin Li "'&' must precede a capture when the capture default is '='">; 6046*67e74705SXin Li def err_capture_does_not_name_variable : Error< 6047*67e74705SXin Li "%0 in capture list does not name a variable">; 6048*67e74705SXin Li def err_capture_non_automatic_variable : Error< 6049*67e74705SXin Li "%0 cannot be captured because it does not have automatic storage " 6050*67e74705SXin Li "duration">; 6051*67e74705SXin Li def err_this_capture : Error< 6052*67e74705SXin Li "'this' cannot be %select{implicitly |}0captured in this context">; 6053*67e74705SXin Li def err_lambda_capture_anonymous_var : Error< 6054*67e74705SXin Li "unnamed variable cannot be implicitly captured in a lambda expression">; 6055*67e74705SXin Li def err_lambda_capture_flexarray_type : Error< 6056*67e74705SXin Li "variable %0 with flexible array member cannot be captured in " 6057*67e74705SXin Li "a lambda expression">; 6058*67e74705SXin Li def err_lambda_impcap : Error< 6059*67e74705SXin Li "variable %0 cannot be implicitly captured in a lambda with no " 6060*67e74705SXin Li "capture-default specified">; 6061*67e74705SXin Li def note_lambda_decl : Note<"lambda expression begins here">; 6062*67e74705SXin Li def err_lambda_unevaluated_operand : Error< 6063*67e74705SXin Li "lambda expression in an unevaluated operand">; 6064*67e74705SXin Li def err_lambda_in_constant_expression : Error< 6065*67e74705SXin Li "a lambda expression may not appear inside of a constant expression">; 6066*67e74705SXin Li def err_lambda_return_init_list : Error< 6067*67e74705SXin Li "cannot deduce lambda return type from initializer list">; 6068*67e74705SXin Li def err_lambda_capture_default_arg : Error< 6069*67e74705SXin Li "lambda expression in default argument cannot capture any entity">; 6070*67e74705SXin Li def err_lambda_incomplete_result : Error< 6071*67e74705SXin Li "incomplete result type %0 in lambda expression">; 6072*67e74705SXin Li def err_noreturn_lambda_has_return_expr : Error< 6073*67e74705SXin Li "lambda declared 'noreturn' should not return">; 6074*67e74705SXin Li def warn_maybe_falloff_nonvoid_lambda : Warning< 6075*67e74705SXin Li "control may reach end of non-void lambda">, 6076*67e74705SXin Li InGroup<ReturnType>; 6077*67e74705SXin Li def warn_falloff_nonvoid_lambda : Warning< 6078*67e74705SXin Li "control reaches end of non-void lambda">, 6079*67e74705SXin Li InGroup<ReturnType>; 6080*67e74705SXin Li def err_access_lambda_capture : Error< 6081*67e74705SXin Li // The ERRORs represent other special members that aren't constructors, in 6082*67e74705SXin Li // hopes that someone will bother noticing and reporting if they appear 6083*67e74705SXin Li "capture of variable '%0' as type %1 calls %select{private|protected}3 " 6084*67e74705SXin Li "%select{default |copy |move |*ERROR* |*ERROR* |*ERROR* |}2constructor">, 6085*67e74705SXin Li AccessControl; 6086*67e74705SXin Li def note_lambda_to_block_conv : Note< 6087*67e74705SXin Li "implicit capture of lambda object due to conversion to block pointer " 6088*67e74705SXin Li "here">; 6089*67e74705SXin Li 6090*67e74705SXin Li // C++14 lambda init-captures. 6091*67e74705SXin Li def warn_cxx11_compat_init_capture : Warning< 6092*67e74705SXin Li "initialized lambda captures are incompatible with C++ standards " 6093*67e74705SXin Li "before C++14">, InGroup<CXXPre14Compat>, DefaultIgnore; 6094*67e74705SXin Li def ext_init_capture : ExtWarn< 6095*67e74705SXin Li "initialized lambda captures are a C++14 extension">, InGroup<CXX14>; 6096*67e74705SXin Li def err_init_capture_no_expression : Error< 6097*67e74705SXin Li "initializer missing for lambda capture %0">; 6098*67e74705SXin Li def err_init_capture_multiple_expressions : Error< 6099*67e74705SXin Li "initializer for lambda capture %0 contains multiple expressions">; 6100*67e74705SXin Li def err_init_capture_paren_braces : Error< 6101*67e74705SXin Li "cannot deduce type for lambda capture %1 from " 6102*67e74705SXin Li "%select{parenthesized|nested}0 initializer list">; 6103*67e74705SXin Li def err_init_capture_deduction_failure : Error< 6104*67e74705SXin Li "cannot deduce type for lambda capture %0 from initializer of type %2">; 6105*67e74705SXin Li def err_init_capture_deduction_failure_from_init_list : Error< 6106*67e74705SXin Li "cannot deduce type for lambda capture %0 from initializer list">; 6107*67e74705SXin Li 6108*67e74705SXin Li // C++1z '*this' captures. 6109*67e74705SXin Li def warn_cxx14_compat_star_this_lambda_capture : Warning< 6110*67e74705SXin Li "by value capture of '*this' is incompatible with C++ standards before C++1z">, 6111*67e74705SXin Li InGroup<CXXPre1zCompat>, DefaultIgnore; 6112*67e74705SXin Li def ext_star_this_lambda_capture_cxx1z : ExtWarn< 6113*67e74705SXin Li "capture of '*this' by copy is a C++1z extension">, InGroup<CXX1z>; 6114*67e74705SXin Li} 6115*67e74705SXin Li 6116*67e74705SXin Lidef err_return_in_captured_stmt : Error< 6117*67e74705SXin Li "cannot return from %0">; 6118*67e74705SXin Lidef err_capture_block_variable : Error< 6119*67e74705SXin Li "__block variable %0 cannot be captured in a " 6120*67e74705SXin Li "%select{lambda expression|captured statement}1">; 6121*67e74705SXin Li 6122*67e74705SXin Lidef err_operator_arrow_circular : Error< 6123*67e74705SXin Li "circular pointer delegation detected">; 6124*67e74705SXin Lidef err_operator_arrow_depth_exceeded : Error< 6125*67e74705SXin Li "use of 'operator->' on type %0 would invoke a sequence of more than %1 " 6126*67e74705SXin Li "'operator->' calls">; 6127*67e74705SXin Lidef note_operator_arrow_here : Note< 6128*67e74705SXin Li "'operator->' declared here produces an object of type %0">; 6129*67e74705SXin Lidef note_operator_arrows_suppressed : Note< 6130*67e74705SXin Li "(skipping %0 'operator->'%s0 in backtrace)">; 6131*67e74705SXin Lidef note_operator_arrow_depth : Note< 6132*67e74705SXin Li "use -foperator-arrow-depth=N to increase 'operator->' limit">; 6133*67e74705SXin Li 6134*67e74705SXin Lidef err_pseudo_dtor_base_not_scalar : Error< 6135*67e74705SXin Li "object expression of non-scalar type %0 cannot be used in a " 6136*67e74705SXin Li "pseudo-destructor expression">; 6137*67e74705SXin Lidef ext_pseudo_dtor_on_void : ExtWarn< 6138*67e74705SXin Li "pseudo-destructors on type void are a Microsoft extension">, 6139*67e74705SXin Li InGroup<MicrosoftVoidPseudoDtor>; 6140*67e74705SXin Lidef err_pseudo_dtor_type_mismatch : Error< 6141*67e74705SXin Li "the type of object expression " 6142*67e74705SXin Li "%diff{($) does not match the type being destroyed ($)|" 6143*67e74705SXin Li "does not match the type being destroyed}0,1 " 6144*67e74705SXin Li "in pseudo-destructor expression">; 6145*67e74705SXin Lidef err_pseudo_dtor_call_with_args : Error< 6146*67e74705SXin Li "call to pseudo-destructor cannot have any arguments">; 6147*67e74705SXin Lidef err_dtor_expr_without_call : Error< 6148*67e74705SXin Li "reference to %select{destructor|pseudo-destructor}0 must be called" 6149*67e74705SXin Li "%select{|; did you mean to call it with no arguments?}1">; 6150*67e74705SXin Lidef err_pseudo_dtor_destructor_non_type : Error< 6151*67e74705SXin Li "%0 does not refer to a type name in pseudo-destructor expression; expected " 6152*67e74705SXin Li "the name of type %1">; 6153*67e74705SXin Lidef err_invalid_use_of_function_type : Error< 6154*67e74705SXin Li "a function type is not allowed here">; 6155*67e74705SXin Lidef err_invalid_use_of_array_type : Error<"an array type is not allowed here">; 6156*67e74705SXin Lidef err_typecheck_bool_condition : Error< 6157*67e74705SXin Li "value of type %0 is not contextually convertible to 'bool'">; 6158*67e74705SXin Lidef err_typecheck_ambiguous_condition : Error< 6159*67e74705SXin Li "conversion %diff{from $ to $|between types}0,1 is ambiguous">; 6160*67e74705SXin Lidef err_typecheck_nonviable_condition : Error< 6161*67e74705SXin Li "no viable conversion%select{%diff{ from $ to $|}1,2|" 6162*67e74705SXin Li "%diff{ from returned value of type $ to function return type $|}1,2}0">; 6163*67e74705SXin Lidef err_typecheck_nonviable_condition_incomplete : Error< 6164*67e74705SXin Li "no viable conversion%diff{ from $ to incomplete type $|}0,1">; 6165*67e74705SXin Lidef err_typecheck_deleted_function : Error< 6166*67e74705SXin Li "conversion function %diff{from $ to $|between types}0,1 " 6167*67e74705SXin Li "invokes a deleted function">; 6168*67e74705SXin Li 6169*67e74705SXin Lidef err_expected_class_or_namespace : Error<"%0 is not a class" 6170*67e74705SXin Li "%select{ or namespace|, namespace, or enumeration}1">; 6171*67e74705SXin Lidef err_invalid_declarator_scope : Error<"cannot define or redeclare %0 here " 6172*67e74705SXin Li "because namespace %1 does not enclose namespace %2">; 6173*67e74705SXin Lidef err_invalid_declarator_global_scope : Error< 6174*67e74705SXin Li "definition or redeclaration of %0 cannot name the global scope">; 6175*67e74705SXin Lidef err_invalid_declarator_in_function : Error< 6176*67e74705SXin Li "definition or redeclaration of %0 not allowed inside a function">; 6177*67e74705SXin Lidef err_invalid_declarator_in_block : Error< 6178*67e74705SXin Li "definition or redeclaration of %0 not allowed inside a block">; 6179*67e74705SXin Lidef err_not_tag_in_scope : Error< 6180*67e74705SXin Li "no %select{struct|interface|union|class|enum}0 named %1 in %2">; 6181*67e74705SXin Li 6182*67e74705SXin Lidef err_no_typeid_with_fno_rtti : Error< 6183*67e74705SXin Li "cannot use typeid with -fno-rtti">; 6184*67e74705SXin Lidef err_no_dynamic_cast_with_fno_rtti : Error< 6185*67e74705SXin Li "cannot use dynamic_cast with -fno-rtti">; 6186*67e74705SXin Li 6187*67e74705SXin Lidef err_cannot_form_pointer_to_member_of_reference_type : Error< 6188*67e74705SXin Li "cannot form a pointer-to-member to member %0 of reference type %1">; 6189*67e74705SXin Lidef err_incomplete_object_call : Error< 6190*67e74705SXin Li "incomplete type in call to object of type %0">; 6191*67e74705SXin Li 6192*67e74705SXin Lidef warn_condition_is_assignment : Warning<"using the result of an " 6193*67e74705SXin Li "assignment as a condition without parentheses">, 6194*67e74705SXin Li InGroup<Parentheses>; 6195*67e74705SXin Li// Completely identical except off by default. 6196*67e74705SXin Lidef warn_condition_is_idiomatic_assignment : Warning<"using the result " 6197*67e74705SXin Li "of an assignment as a condition without parentheses">, 6198*67e74705SXin Li InGroup<DiagGroup<"idiomatic-parentheses">>, DefaultIgnore; 6199*67e74705SXin Lidef note_condition_assign_to_comparison : Note< 6200*67e74705SXin Li "use '==' to turn this assignment into an equality comparison">; 6201*67e74705SXin Lidef note_condition_or_assign_to_comparison : Note< 6202*67e74705SXin Li "use '!=' to turn this compound assignment into an inequality comparison">; 6203*67e74705SXin Lidef note_condition_assign_silence : Note< 6204*67e74705SXin Li "place parentheses around the assignment to silence this warning">; 6205*67e74705SXin Li 6206*67e74705SXin Lidef warn_equality_with_extra_parens : Warning<"equality comparison with " 6207*67e74705SXin Li "extraneous parentheses">, InGroup<ParenthesesOnEquality>; 6208*67e74705SXin Lidef note_equality_comparison_to_assign : Note< 6209*67e74705SXin Li "use '=' to turn this equality comparison into an assignment">; 6210*67e74705SXin Lidef note_equality_comparison_silence : Note< 6211*67e74705SXin Li "remove extraneous parentheses around the comparison to silence this warning">; 6212*67e74705SXin Li 6213*67e74705SXin Li// assignment related diagnostics (also for argument passing, returning, etc). 6214*67e74705SXin Li// In most of these diagnostics the %2 is a value from the 6215*67e74705SXin Li// Sema::AssignmentAction enumeration 6216*67e74705SXin Lidef err_typecheck_convert_incompatible : Error< 6217*67e74705SXin Li "%select{%diff{assigning to $ from incompatible type $|" 6218*67e74705SXin Li "assigning to type from incompatible type}0,1" 6219*67e74705SXin Li "|%diff{passing $ to parameter of incompatible type $|" 6220*67e74705SXin Li "passing type to parameter of incompatible type}0,1" 6221*67e74705SXin Li "|%diff{returning $ from a function with incompatible result type $|" 6222*67e74705SXin Li "returning type from a function with incompatible result type}0,1" 6223*67e74705SXin Li "|%diff{converting $ to incompatible type $|" 6224*67e74705SXin Li "converting type to incompatible type}0,1" 6225*67e74705SXin Li "|%diff{initializing $ with an expression of incompatible type $|" 6226*67e74705SXin Li "initializing type with an expression of incompatible type}0,1" 6227*67e74705SXin Li "|%diff{sending $ to parameter of incompatible type $|" 6228*67e74705SXin Li "sending type to parameter of incompatible type}0,1" 6229*67e74705SXin Li "|%diff{casting $ to incompatible type $|" 6230*67e74705SXin Li "casting type to incompatible type}0,1}2" 6231*67e74705SXin Li "%select{|; dereference with *|" 6232*67e74705SXin Li "; take the address with &|" 6233*67e74705SXin Li "; remove *|" 6234*67e74705SXin Li "; remove &}3" 6235*67e74705SXin Li "%select{|: different classes%diff{ ($ vs $)|}5,6" 6236*67e74705SXin Li "|: different number of parameters (%5 vs %6)" 6237*67e74705SXin Li "|: type mismatch at %ordinal5 parameter%diff{ ($ vs $)|}6,7" 6238*67e74705SXin Li "|: different return type%diff{ ($ vs $)|}5,6" 6239*67e74705SXin Li "|: different qualifiers (" 6240*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 6241*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}5 vs " 6242*67e74705SXin Li "%select{none|const|restrict|const and restrict|volatile|const and volatile|" 6243*67e74705SXin Li "volatile and restrict|const, volatile, and restrict}6)}4">; 6244*67e74705SXin Lidef err_typecheck_missing_return_type_incompatible : Error< 6245*67e74705SXin Li "%diff{return type $ must match previous return type $|" 6246*67e74705SXin Li "return type must match previous return type}0,1 when %select{block " 6247*67e74705SXin Li "literal|lambda expression}2 has unspecified explicit return type">; 6248*67e74705SXin Li 6249*67e74705SXin Lidef not_incomplete_class_and_qualified_id : Note< 6250*67e74705SXin Li "conformance of forward class %0 to protocol %1 can not be confirmed">; 6251*67e74705SXin Lidef warn_incompatible_qualified_id : Warning< 6252*67e74705SXin Li "%select{%diff{assigning to $ from incompatible type $|" 6253*67e74705SXin Li "assigning to type from incompatible type}0,1" 6254*67e74705SXin Li "|%diff{passing $ to parameter of incompatible type $|" 6255*67e74705SXin Li "passing type to parameter of incompatible type}0,1" 6256*67e74705SXin Li "|%diff{returning $ from a function with incompatible result type $|" 6257*67e74705SXin Li "returning type from a function with incompatible result type}0,1" 6258*67e74705SXin Li "|%diff{converting $ to incompatible type $|" 6259*67e74705SXin Li "converting type to incompatible type}0,1" 6260*67e74705SXin Li "|%diff{initializing $ with an expression of incompatible type $|" 6261*67e74705SXin Li "initializing type with an expression of incompatible type}0,1" 6262*67e74705SXin Li "|%diff{sending $ to parameter of incompatible type $|" 6263*67e74705SXin Li "sending type to parameter of incompatible type}0,1" 6264*67e74705SXin Li "|%diff{casting $ to incompatible type $|" 6265*67e74705SXin Li "casting type to incompatible type}0,1}2">; 6266*67e74705SXin Lidef ext_typecheck_convert_pointer_int : ExtWarn< 6267*67e74705SXin Li "incompatible pointer to integer conversion " 6268*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6269*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6270*67e74705SXin Li "passing to parameter of different type}0,1" 6271*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6272*67e74705SXin Li "returning from function with different return type}0,1" 6273*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6274*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6275*67e74705SXin Li "initializing with expression of different type}0,1" 6276*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6277*67e74705SXin Li "sending to parameter of different type}0,1" 6278*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6279*67e74705SXin Li "%select{|; dereference with *|" 6280*67e74705SXin Li "; take the address with &|" 6281*67e74705SXin Li "; remove *|" 6282*67e74705SXin Li "; remove &}3">, 6283*67e74705SXin Li InGroup<IntConversion>; 6284*67e74705SXin Lidef ext_typecheck_convert_int_pointer : ExtWarn< 6285*67e74705SXin Li "incompatible integer to pointer conversion " 6286*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6287*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6288*67e74705SXin Li "passing to parameter of different type}0,1" 6289*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6290*67e74705SXin Li "returning from function with different return type}0,1" 6291*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6292*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6293*67e74705SXin Li "initializing with expression of different type}0,1" 6294*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6295*67e74705SXin Li "sending to parameter of different type}0,1" 6296*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6297*67e74705SXin Li "%select{|; dereference with *|" 6298*67e74705SXin Li "; take the address with &|" 6299*67e74705SXin Li "; remove *|" 6300*67e74705SXin Li "; remove &}3">, 6301*67e74705SXin Li InGroup<IntConversion>; 6302*67e74705SXin Lidef ext_typecheck_convert_pointer_void_func : Extension< 6303*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6304*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6305*67e74705SXin Li "passing to parameter of different type}0,1" 6306*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6307*67e74705SXin Li "returning from function with different return type}0,1" 6308*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6309*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6310*67e74705SXin Li "initializing with expression of different type}0,1" 6311*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6312*67e74705SXin Li "sending to parameter of different type}0,1" 6313*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6314*67e74705SXin Li " converts between void pointer and function pointer">; 6315*67e74705SXin Lidef ext_typecheck_convert_incompatible_pointer_sign : ExtWarn< 6316*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6317*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6318*67e74705SXin Li "passing to parameter of different type}0,1" 6319*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6320*67e74705SXin Li "returning from function with different return type}0,1" 6321*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6322*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6323*67e74705SXin Li "initializing with expression of different type}0,1" 6324*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6325*67e74705SXin Li "sending to parameter of different type}0,1" 6326*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6327*67e74705SXin Li " converts between pointers to integer types with different sign">, 6328*67e74705SXin Li InGroup<DiagGroup<"pointer-sign">>; 6329*67e74705SXin Lidef ext_typecheck_convert_incompatible_pointer : ExtWarn< 6330*67e74705SXin Li "incompatible pointer types " 6331*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6332*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6333*67e74705SXin Li "passing to parameter of different type}0,1" 6334*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6335*67e74705SXin Li "returning from function with different return type}0,1" 6336*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6337*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6338*67e74705SXin Li "initializing with expression of different type}0,1" 6339*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6340*67e74705SXin Li "sending to parameter of different type}0,1" 6341*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6342*67e74705SXin Li "%select{|; dereference with *|" 6343*67e74705SXin Li "; take the address with &|" 6344*67e74705SXin Li "; remove *|" 6345*67e74705SXin Li "; remove &}3">, 6346*67e74705SXin Li InGroup<IncompatiblePointerTypes>; 6347*67e74705SXin Lidef ext_typecheck_convert_discards_qualifiers : ExtWarn< 6348*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6349*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6350*67e74705SXin Li "passing to parameter of different type}0,1" 6351*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6352*67e74705SXin Li "returning from function with different return type}0,1" 6353*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6354*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6355*67e74705SXin Li "initializing with expression of different type}0,1" 6356*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6357*67e74705SXin Li "sending to parameter of different type}0,1" 6358*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6359*67e74705SXin Li " discards qualifiers">, 6360*67e74705SXin Li InGroup<IncompatiblePointerTypesDiscardsQualifiers>; 6361*67e74705SXin Lidef ext_nested_pointer_qualifier_mismatch : ExtWarn< 6362*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6363*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6364*67e74705SXin Li "passing to parameter of different type}0,1" 6365*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6366*67e74705SXin Li "returning from function with different return type}0,1" 6367*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6368*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6369*67e74705SXin Li "initializing with expression of different type}0,1" 6370*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6371*67e74705SXin Li "sending to parameter of different type}0,1" 6372*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6373*67e74705SXin Li " discards qualifiers in nested pointer types">, 6374*67e74705SXin Li InGroup<IncompatiblePointerTypesDiscardsQualifiers>; 6375*67e74705SXin Lidef warn_incompatible_vectors : Warning< 6376*67e74705SXin Li "incompatible vector types " 6377*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6378*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6379*67e74705SXin Li "passing to parameter of different type}0,1" 6380*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6381*67e74705SXin Li "returning from function with different return type}0,1" 6382*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6383*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6384*67e74705SXin Li "initializing with expression of different type}0,1" 6385*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6386*67e74705SXin Li "sending to parameter of different type}0,1" 6387*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2">, 6388*67e74705SXin Li InGroup<VectorConversion>, DefaultIgnore; 6389*67e74705SXin Lidef err_int_to_block_pointer : Error< 6390*67e74705SXin Li "invalid block pointer conversion " 6391*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6392*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6393*67e74705SXin Li "passing to parameter of different type}0,1" 6394*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6395*67e74705SXin Li "returning from function with different return type}0,1" 6396*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6397*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6398*67e74705SXin Li "initializing with expression of different type}0,1" 6399*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6400*67e74705SXin Li "sending to parameter of different type}0,1" 6401*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2">; 6402*67e74705SXin Lidef err_typecheck_convert_incompatible_block_pointer : Error< 6403*67e74705SXin Li "incompatible block pointer types " 6404*67e74705SXin Li "%select{%diff{assigning to $ from $|assigning to different types}0,1" 6405*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6406*67e74705SXin Li "passing to parameter of different type}0,1" 6407*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6408*67e74705SXin Li "returning from function with different return type}0,1" 6409*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6410*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6411*67e74705SXin Li "initializing with expression of different type}0,1" 6412*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6413*67e74705SXin Li "sending to parameter of different type}0,1" 6414*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2">; 6415*67e74705SXin Lidef err_typecheck_incompatible_address_space : Error< 6416*67e74705SXin Li "%select{%diff{assigning $ to $|assigning to different types}1,0" 6417*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6418*67e74705SXin Li "passing to parameter of different type}0,1" 6419*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6420*67e74705SXin Li "returning from function with different return type}0,1" 6421*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6422*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6423*67e74705SXin Li "initializing with expression of different type}0,1" 6424*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6425*67e74705SXin Li "sending to parameter of different type}0,1" 6426*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6427*67e74705SXin Li " changes address space of pointer">; 6428*67e74705SXin Lidef err_typecheck_incompatible_ownership : Error< 6429*67e74705SXin Li "%select{%diff{assigning $ to $|assigning to different types}1,0" 6430*67e74705SXin Li "|%diff{passing $ to parameter of type $|" 6431*67e74705SXin Li "passing to parameter of different type}0,1" 6432*67e74705SXin Li "|%diff{returning $ from a function with result type $|" 6433*67e74705SXin Li "returning from function with different return type}0,1" 6434*67e74705SXin Li "|%diff{converting $ to type $|converting between types}0,1" 6435*67e74705SXin Li "|%diff{initializing $ with an expression of type $|" 6436*67e74705SXin Li "initializing with expression of different type}0,1" 6437*67e74705SXin Li "|%diff{sending $ to parameter of type $|" 6438*67e74705SXin Li "sending to parameter of different type}0,1" 6439*67e74705SXin Li "|%diff{casting $ to type $|casting between types}0,1}2" 6440*67e74705SXin Li " changes retain/release properties of pointer">; 6441*67e74705SXin Lidef err_typecheck_comparison_of_distinct_blocks : Error< 6442*67e74705SXin Li "comparison of distinct block types%diff{ ($ and $)|}0,1">; 6443*67e74705SXin Li 6444*67e74705SXin Lidef err_typecheck_array_not_modifiable_lvalue : Error< 6445*67e74705SXin Li "array type %0 is not assignable">; 6446*67e74705SXin Lidef err_typecheck_non_object_not_modifiable_lvalue : Error< 6447*67e74705SXin Li "non-object type %0 is not assignable">; 6448*67e74705SXin Lidef err_typecheck_expression_not_modifiable_lvalue : Error< 6449*67e74705SXin Li "expression is not assignable">; 6450*67e74705SXin Lidef err_typecheck_incomplete_type_not_modifiable_lvalue : Error< 6451*67e74705SXin Li "incomplete type %0 is not assignable">; 6452*67e74705SXin Lidef err_typecheck_lvalue_casts_not_supported : Error< 6453*67e74705SXin Li "assignment to cast is illegal, lvalue casts are not supported">; 6454*67e74705SXin Li 6455*67e74705SXin Lidef err_typecheck_duplicate_vector_components_not_mlvalue : Error< 6456*67e74705SXin Li "vector is not assignable (contains duplicate components)">; 6457*67e74705SXin Lidef err_block_decl_ref_not_modifiable_lvalue : Error< 6458*67e74705SXin Li "variable is not assignable (missing __block type specifier)">; 6459*67e74705SXin Lidef err_lambda_decl_ref_not_modifiable_lvalue : Error< 6460*67e74705SXin Li "cannot assign to a variable captured by copy in a non-mutable lambda">; 6461*67e74705SXin Lidef err_typecheck_call_not_function : Error< 6462*67e74705SXin Li "called object type %0 is not a function or function pointer">; 6463*67e74705SXin Lidef err_call_incomplete_return : Error< 6464*67e74705SXin Li "calling function with incomplete return type %0">; 6465*67e74705SXin Lidef err_call_function_incomplete_return : Error< 6466*67e74705SXin Li "calling %0 with incomplete return type %1">; 6467*67e74705SXin Lidef err_call_incomplete_argument : Error< 6468*67e74705SXin Li "argument type %0 is incomplete">; 6469*67e74705SXin Lidef err_typecheck_call_too_few_args : Error< 6470*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6471*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6472*67e74705SXin Li "expected %1, have %2">; 6473*67e74705SXin Lidef err_typecheck_call_too_few_args_one : Error< 6474*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6475*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6476*67e74705SXin Li "single argument %1 was not specified">; 6477*67e74705SXin Lidef err_typecheck_call_too_few_args_at_least : Error< 6478*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6479*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6480*67e74705SXin Li "expected at least %1, have %2">; 6481*67e74705SXin Lidef err_typecheck_call_too_few_args_at_least_one : Error< 6482*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6483*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6484*67e74705SXin Li "at least argument %1 must be specified">; 6485*67e74705SXin Lidef err_typecheck_call_too_few_args_suggest : Error< 6486*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6487*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6488*67e74705SXin Li "expected %1, have %2; did you mean %3?">; 6489*67e74705SXin Lidef err_typecheck_call_too_few_args_at_least_suggest : Error< 6490*67e74705SXin Li "too few %select{|||execution configuration }0arguments to " 6491*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6492*67e74705SXin Li "expected at least %1, have %2; did you mean %3?">; 6493*67e74705SXin Lidef err_typecheck_call_too_many_args : Error< 6494*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6495*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6496*67e74705SXin Li "expected %1, have %2">; 6497*67e74705SXin Lidef err_typecheck_call_too_many_args_one : Error< 6498*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6499*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6500*67e74705SXin Li "expected single argument %1, have %2 arguments">; 6501*67e74705SXin Lidef err_typecheck_call_too_many_args_at_most : Error< 6502*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6503*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6504*67e74705SXin Li "expected at most %1, have %2">; 6505*67e74705SXin Lidef err_typecheck_call_too_many_args_at_most_one : Error< 6506*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6507*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6508*67e74705SXin Li "expected at most single argument %1, have %2 arguments">; 6509*67e74705SXin Lidef err_typecheck_call_too_many_args_suggest : Error< 6510*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6511*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6512*67e74705SXin Li "expected %1, have %2; did you mean %3?">; 6513*67e74705SXin Lidef err_typecheck_call_too_many_args_at_most_suggest : Error< 6514*67e74705SXin Li "too many %select{|||execution configuration }0arguments to " 6515*67e74705SXin Li "%select{function|block|method|kernel function}0 call, " 6516*67e74705SXin Li "expected at most %1, have %2; did you mean %3?">; 6517*67e74705SXin Li 6518*67e74705SXin Lidef err_arc_typecheck_convert_incompatible_pointer : Error< 6519*67e74705SXin Li "incompatible pointer types passing retainable parameter of type %0" 6520*67e74705SXin Li "to a CF function expecting %1 type">; 6521*67e74705SXin Li 6522*67e74705SXin Lidef err_builtin_fn_use : Error<"builtin functions must be directly called">; 6523*67e74705SXin Li 6524*67e74705SXin Lidef warn_call_wrong_number_of_arguments : Warning< 6525*67e74705SXin Li "too %select{few|many}0 arguments in call to %1">; 6526*67e74705SXin Lidef err_atomic_builtin_must_be_pointer : Error< 6527*67e74705SXin Li "address argument to atomic builtin must be a pointer (%0 invalid)">; 6528*67e74705SXin Lidef err_atomic_builtin_must_be_pointer_intptr : Error< 6529*67e74705SXin Li "address argument to atomic builtin must be a pointer to integer or pointer" 6530*67e74705SXin Li " (%0 invalid)">; 6531*67e74705SXin Lidef err_atomic_builtin_must_be_pointer_intfltptr : Error< 6532*67e74705SXin Li "address argument to atomic builtin must be a pointer to integer," 6533*67e74705SXin Li " floating-point or pointer (%0 invalid)">; 6534*67e74705SXin Lidef err_atomic_builtin_pointer_size : Error< 6535*67e74705SXin Li "address argument to atomic builtin must be a pointer to 1,2,4,8 or 16 byte " 6536*67e74705SXin Li "type (%0 invalid)">; 6537*67e74705SXin Lidef err_atomic_exclusive_builtin_pointer_size : Error< 6538*67e74705SXin Li "address argument to load or store exclusive builtin must be a pointer to" 6539*67e74705SXin Li " 1,2,4 or 8 byte type (%0 invalid)">; 6540*67e74705SXin Lidef err_atomic_op_needs_atomic : Error< 6541*67e74705SXin Li "address argument to atomic operation must be a pointer to _Atomic " 6542*67e74705SXin Li "type (%0 invalid)">; 6543*67e74705SXin Lidef err_atomic_op_needs_non_const_atomic : Error< 6544*67e74705SXin Li "address argument to atomic operation must be a pointer to non-const _Atomic " 6545*67e74705SXin Li "type (%0 invalid)">; 6546*67e74705SXin Lidef err_atomic_op_needs_non_const_pointer : Error< 6547*67e74705SXin Li "address argument to atomic operation must be a pointer to non-const " 6548*67e74705SXin Li "type (%0 invalid)">; 6549*67e74705SXin Lidef err_atomic_op_needs_trivial_copy : Error< 6550*67e74705SXin Li "address argument to atomic operation must be a pointer to a " 6551*67e74705SXin Li "trivially-copyable type (%0 invalid)">; 6552*67e74705SXin Lidef err_atomic_op_needs_atomic_int_or_ptr : Error< 6553*67e74705SXin Li "address argument to atomic operation must be a pointer to %select{|atomic }0" 6554*67e74705SXin Li "integer or pointer (%1 invalid)">; 6555*67e74705SXin Lidef err_atomic_op_bitwise_needs_atomic_int : Error< 6556*67e74705SXin Li "address argument to bitwise atomic operation must be a pointer to " 6557*67e74705SXin Li "%select{|atomic }0integer (%1 invalid)">; 6558*67e74705SXin Lidef warn_atomic_op_has_invalid_memory_order : Warning< 6559*67e74705SXin Li "memory order argument to atomic operation is invalid">, 6560*67e74705SXin Li InGroup<DiagGroup<"atomic-memory-ordering">>; 6561*67e74705SXin Li 6562*67e74705SXin Lidef err_overflow_builtin_must_be_int : Error< 6563*67e74705SXin Li "operand argument to overflow builtin must be an integer (%0 invalid)">; 6564*67e74705SXin Lidef err_overflow_builtin_must_be_ptr_int : Error< 6565*67e74705SXin Li "result argument to overflow builtin must be a pointer " 6566*67e74705SXin Li "to a non-const integer (%0 invalid)">; 6567*67e74705SXin Li 6568*67e74705SXin Lidef err_atomic_load_store_uses_lib : Error< 6569*67e74705SXin Li "atomic %select{load|store}0 requires runtime support that is not " 6570*67e74705SXin Li "available for this target">; 6571*67e74705SXin Li 6572*67e74705SXin Lidef err_nontemporal_builtin_must_be_pointer : Error< 6573*67e74705SXin Li "address argument to nontemporal builtin must be a pointer (%0 invalid)">; 6574*67e74705SXin Lidef err_nontemporal_builtin_must_be_pointer_intfltptr_or_vector : Error< 6575*67e74705SXin Li "address argument to nontemporal builtin must be a pointer to integer, float, " 6576*67e74705SXin Li "pointer, or a vector of such types (%0 invalid)">; 6577*67e74705SXin Li 6578*67e74705SXin Lidef err_deleted_function_use : Error<"attempt to use a deleted function">; 6579*67e74705SXin Lidef err_deleted_inherited_ctor_use : Error< 6580*67e74705SXin Li "constructor inherited by %0 from base class %1 is implicitly deleted">; 6581*67e74705SXin Li 6582*67e74705SXin Lidef err_kern_type_not_void_return : Error< 6583*67e74705SXin Li "kernel function type %0 must have void return type">; 6584*67e74705SXin Lidef err_kern_is_nonstatic_method : Error< 6585*67e74705SXin Li "kernel function %0 must be a free function or static member function">; 6586*67e74705SXin Lidef err_config_scalar_return : Error< 6587*67e74705SXin Li "CUDA special function 'cudaConfigureCall' must have scalar return type">; 6588*67e74705SXin Lidef err_kern_call_not_global_function : Error< 6589*67e74705SXin Li "kernel call to non-global function %0">; 6590*67e74705SXin Lidef err_global_call_not_config : Error< 6591*67e74705SXin Li "call to global function %0 not configured">; 6592*67e74705SXin Lidef err_ref_bad_target : Error< 6593*67e74705SXin Li "reference to %select{__device__|__global__|__host__|__host__ __device__}0 " 6594*67e74705SXin Li "function %1 in %select{__device__|__global__|__host__|__host__ __device__}2 function">; 6595*67e74705SXin Lidef warn_kern_is_method : Extension< 6596*67e74705SXin Li "kernel function %0 is a member function; this may not be accepted by nvcc">, 6597*67e74705SXin Li InGroup<CudaCompat>; 6598*67e74705SXin Lidef warn_kern_is_inline : Warning< 6599*67e74705SXin Li "ignored 'inline' attribute on kernel function %0">, 6600*67e74705SXin Li InGroup<CudaCompat>; 6601*67e74705SXin Lidef err_variadic_device_fn : Error< 6602*67e74705SXin Li "CUDA device code does not support variadic functions">; 6603*67e74705SXin Lidef err_va_arg_in_device : Error< 6604*67e74705SXin Li "CUDA device code does not support va_arg">; 6605*67e74705SXin Lidef err_alias_not_supported_on_nvptx : Error<"CUDA does not support aliases">; 6606*67e74705SXin Lidef err_cuda_unattributed_constexpr_cannot_overload_device : Error< 6607*67e74705SXin Li "constexpr function '%0' without __host__ or __device__ attributes cannot " 6608*67e74705SXin Li "overload __device__ function with same signature. Add a __host__ " 6609*67e74705SXin Li "attribute, or build with -fno-cuda-host-device-constexpr.">; 6610*67e74705SXin Lidef note_cuda_conflicting_device_function_declared_here : Note< 6611*67e74705SXin Li "conflicting __device__ function declared here">; 6612*67e74705SXin Lidef err_dynamic_var_init : Error< 6613*67e74705SXin Li "dynamic initialization is not supported for " 6614*67e74705SXin Li "__device__, __constant__, and __shared__ variables.">; 6615*67e74705SXin Lidef err_shared_var_init : Error< 6616*67e74705SXin Li "initialization is not supported for __shared__ variables.">; 6617*67e74705SXin Lidef err_device_static_local_var : Error< 6618*67e74705SXin Li "Within a __device__/__global__ function, " 6619*67e74705SXin Li "only __shared__ variables may be marked \"static\"">; 6620*67e74705SXin Lidef warn_non_pod_vararg_with_format_string : Warning< 6621*67e74705SXin Li "cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic " 6622*67e74705SXin Li "%select{function|block|method|constructor}2; expected type from format " 6623*67e74705SXin Li "string was %3">, InGroup<NonPODVarargs>, DefaultError; 6624*67e74705SXin Li// The arguments to this diagnostic should match the warning above. 6625*67e74705SXin Lidef err_cannot_pass_objc_interface_to_vararg_format : Error< 6626*67e74705SXin Li "cannot pass object with interface type %1 by value to variadic " 6627*67e74705SXin Li "%select{function|block|method|constructor}2; expected type from format " 6628*67e74705SXin Li "string was %3">; 6629*67e74705SXin Li 6630*67e74705SXin Lidef err_cannot_pass_objc_interface_to_vararg : Error< 6631*67e74705SXin Li "cannot pass object with interface type %0 by value through variadic " 6632*67e74705SXin Li "%select{function|block|method|constructor}1">; 6633*67e74705SXin Lidef warn_cannot_pass_non_pod_arg_to_vararg : Warning< 6634*67e74705SXin Li "cannot pass object of %select{non-POD|non-trivial}0 type %1 through variadic" 6635*67e74705SXin Li " %select{function|block|method|constructor}2; call will abort at runtime">, 6636*67e74705SXin Li InGroup<NonPODVarargs>, DefaultError; 6637*67e74705SXin Lidef warn_cxx98_compat_pass_non_pod_arg_to_vararg : Warning< 6638*67e74705SXin Li "passing object of trivial but non-POD type %0 through variadic" 6639*67e74705SXin Li " %select{function|block|method|constructor}1 is incompatible with C++98">, 6640*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 6641*67e74705SXin Lidef warn_pass_class_arg_to_vararg : Warning< 6642*67e74705SXin Li "passing object of class type %0 through variadic " 6643*67e74705SXin Li "%select{function|block|method|constructor}1" 6644*67e74705SXin Li "%select{|; did you mean to call '%3'?}2">, 6645*67e74705SXin Li InGroup<ClassVarargs>, DefaultIgnore; 6646*67e74705SXin Lidef err_cannot_pass_to_vararg : Error< 6647*67e74705SXin Li "cannot pass %select{expression of type %1|initializer list}0 to variadic " 6648*67e74705SXin Li "%select{function|block|method|constructor}2">; 6649*67e74705SXin Lidef err_cannot_pass_to_vararg_format : Error< 6650*67e74705SXin Li "cannot pass %select{expression of type %1|initializer list}0 to variadic " 6651*67e74705SXin Li "%select{function|block|method|constructor}2; expected type from format " 6652*67e74705SXin Li "string was %3">; 6653*67e74705SXin Li 6654*67e74705SXin Lidef err_typecheck_call_invalid_ordered_compare : Error< 6655*67e74705SXin Li "ordered compare requires two args of floating point type" 6656*67e74705SXin Li "%diff{ ($ and $)|}0,1">; 6657*67e74705SXin Lidef err_typecheck_call_invalid_unary_fp : Error< 6658*67e74705SXin Li "floating point classification requires argument of floating point type " 6659*67e74705SXin Li "(passed in %0)">; 6660*67e74705SXin Lidef err_typecheck_cond_expect_int_float : Error< 6661*67e74705SXin Li "used type %0 where integer or floating point type is required">; 6662*67e74705SXin Lidef err_typecheck_cond_expect_scalar : Error< 6663*67e74705SXin Li "used type %0 where arithmetic or pointer type is required">; 6664*67e74705SXin Lidef err_typecheck_cond_expect_nonfloat : Error< 6665*67e74705SXin Li "used type %0 where floating point type is not allowed">; 6666*67e74705SXin Lidef ext_typecheck_cond_one_void : Extension< 6667*67e74705SXin Li "C99 forbids conditional expressions with only one void side">; 6668*67e74705SXin Lidef err_typecheck_cast_to_incomplete : Error< 6669*67e74705SXin Li "cast to incomplete type %0">; 6670*67e74705SXin Lidef ext_typecheck_cast_nonscalar : Extension< 6671*67e74705SXin Li "C99 forbids casting nonscalar type %0 to the same type">; 6672*67e74705SXin Lidef ext_typecheck_cast_to_union : Extension< 6673*67e74705SXin Li "cast to union type is a GNU extension">, 6674*67e74705SXin Li InGroup<GNUUnionCast>; 6675*67e74705SXin Lidef err_typecheck_cast_to_union_no_type : Error< 6676*67e74705SXin Li "cast to union type from type %0 not present in union">; 6677*67e74705SXin Lidef err_cast_pointer_from_non_pointer_int : Error< 6678*67e74705SXin Li "operand of type %0 cannot be cast to a pointer type">; 6679*67e74705SXin Lidef warn_cast_pointer_from_sel : Warning< 6680*67e74705SXin Li "cast of type %0 to %1 is deprecated; use sel_getName instead">, 6681*67e74705SXin Li InGroup<SelTypeCast>; 6682*67e74705SXin Lidef warn_function_def_in_objc_container : Warning< 6683*67e74705SXin Li "function definition inside an Objective-C container is deprecated">, 6684*67e74705SXin Li InGroup<FunctionDefInObjCContainer>; 6685*67e74705SXin Li 6686*67e74705SXin Lidef warn_cast_calling_conv : Warning< 6687*67e74705SXin Li "cast between incompatible calling conventions '%0' and '%1'; " 6688*67e74705SXin Li "calls through this pointer may abort at runtime">, 6689*67e74705SXin Li InGroup<DiagGroup<"cast-calling-convention">>; 6690*67e74705SXin Lidef note_change_calling_conv_fixit : Note< 6691*67e74705SXin Li "consider defining %0 with the '%1' calling convention">; 6692*67e74705SXin Lidef warn_bad_function_cast : Warning< 6693*67e74705SXin Li "cast from function call of type %0 to non-matching type %1">, 6694*67e74705SXin Li InGroup<BadFunctionCast>, DefaultIgnore; 6695*67e74705SXin Lidef err_cast_pointer_to_non_pointer_int : Error< 6696*67e74705SXin Li "pointer cannot be cast to type %0">; 6697*67e74705SXin Lidef err_typecheck_expect_scalar_operand : Error< 6698*67e74705SXin Li "operand of type %0 where arithmetic or pointer type is required">; 6699*67e74705SXin Lidef err_typecheck_cond_incompatible_operands : Error< 6700*67e74705SXin Li "incompatible operand types%diff{ ($ and $)|}0,1">; 6701*67e74705SXin Lidef ext_typecheck_cond_incompatible_operands_nonstandard : ExtWarn< 6702*67e74705SXin Li "incompatible operand types%diff{ ($ and $)|}0,1 use non-standard composite " 6703*67e74705SXin Li "pointer type %2">; 6704*67e74705SXin Lidef err_cast_selector_expr : Error< 6705*67e74705SXin Li "cannot type cast @selector expression">; 6706*67e74705SXin Lidef ext_typecheck_cond_incompatible_pointers : ExtWarn< 6707*67e74705SXin Li "pointer type mismatch%diff{ ($ and $)|}0,1">, 6708*67e74705SXin Li InGroup<DiagGroup<"pointer-type-mismatch">>; 6709*67e74705SXin Lidef ext_typecheck_cond_pointer_integer_mismatch : ExtWarn< 6710*67e74705SXin Li "pointer/integer type mismatch in conditional expression" 6711*67e74705SXin Li "%diff{ ($ and $)|}0,1">, 6712*67e74705SXin Li InGroup<DiagGroup<"conditional-type-mismatch">>; 6713*67e74705SXin Lidef err_typecheck_choose_expr_requires_constant : Error< 6714*67e74705SXin Li "'__builtin_choose_expr' requires a constant expression">; 6715*67e74705SXin Lidef warn_unused_expr : Warning<"expression result unused">, 6716*67e74705SXin Li InGroup<UnusedValue>; 6717*67e74705SXin Lidef warn_unused_voidptr : Warning< 6718*67e74705SXin Li "expression result unused; should this cast be to 'void'?">, 6719*67e74705SXin Li InGroup<UnusedValue>; 6720*67e74705SXin Lidef warn_unused_property_expr : Warning< 6721*67e74705SXin Li "property access result unused - getters should not be used for side effects">, 6722*67e74705SXin Li InGroup<UnusedGetterReturnValue>; 6723*67e74705SXin Lidef warn_unused_container_subscript_expr : Warning< 6724*67e74705SXin Li "container access result unused - container access should not be used for side effects">, 6725*67e74705SXin Li InGroup<UnusedValue>; 6726*67e74705SXin Lidef warn_unused_call : Warning< 6727*67e74705SXin Li "ignoring return value of function declared with %0 attribute">, 6728*67e74705SXin Li InGroup<UnusedValue>; 6729*67e74705SXin Lidef warn_side_effects_unevaluated_context : Warning< 6730*67e74705SXin Li "expression with side effects has no effect in an unevaluated context">, 6731*67e74705SXin Li InGroup<UnevaluatedExpression>; 6732*67e74705SXin Lidef warn_side_effects_typeid : Warning< 6733*67e74705SXin Li "expression with side effects will be evaluated despite being used as an " 6734*67e74705SXin Li "operand to 'typeid'">, InGroup<PotentiallyEvaluatedExpression>; 6735*67e74705SXin Lidef warn_unused_result : Warning< 6736*67e74705SXin Li "ignoring return value of function declared with %0 attribute">, 6737*67e74705SXin Li InGroup<DiagGroup<"unused-result">>; 6738*67e74705SXin Lidef warn_unused_volatile : Warning< 6739*67e74705SXin Li "expression result unused; assign into a variable to force a volatile load">, 6740*67e74705SXin Li InGroup<DiagGroup<"unused-volatile-lvalue">>; 6741*67e74705SXin Li 6742*67e74705SXin Lidef ext_cxx14_attr : Extension< 6743*67e74705SXin Li "use of the %0 attribute is a C++14 extension">, InGroup<CXX14>; 6744*67e74705SXin Lidef ext_cxx1z_attr : Extension< 6745*67e74705SXin Li "use of the %0 attribute is a C++1z extension">, InGroup<CXX1z>; 6746*67e74705SXin Li 6747*67e74705SXin Lidef warn_unused_comparison : Warning< 6748*67e74705SXin Li "%select{%select{|in}1equality|relational}0 comparison result unused">, 6749*67e74705SXin Li InGroup<UnusedComparison>; 6750*67e74705SXin Lidef note_inequality_comparison_to_or_assign : Note< 6751*67e74705SXin Li "use '|=' to turn this inequality comparison into an or-assignment">; 6752*67e74705SXin Li 6753*67e74705SXin Lidef err_incomplete_type_used_in_type_trait_expr : Error< 6754*67e74705SXin Li "incomplete type %0 used in type trait expression">; 6755*67e74705SXin Li 6756*67e74705SXin Lidef err_dimension_expr_not_constant_integer : Error< 6757*67e74705SXin Li "dimension expression does not evaluate to a constant unsigned int">; 6758*67e74705SXin Li 6759*67e74705SXin Lidef err_typecheck_cond_incompatible_operands_null : Error< 6760*67e74705SXin Li "non-pointer operand type %0 incompatible with %select{NULL|nullptr}1">; 6761*67e74705SXin Lidef ext_empty_struct_union : Extension< 6762*67e74705SXin Li "empty %select{struct|union}0 is a GNU extension">, InGroup<GNUEmptyStruct>; 6763*67e74705SXin Lidef ext_no_named_members_in_struct_union : Extension< 6764*67e74705SXin Li "%select{struct|union}0 without named members is a GNU extension">, InGroup<GNUEmptyStruct>; 6765*67e74705SXin Lidef warn_zero_size_struct_union_compat : Warning<"%select{|empty }0" 6766*67e74705SXin Li "%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++">, 6767*67e74705SXin Li InGroup<CXXCompat>, DefaultIgnore; 6768*67e74705SXin Lidef warn_zero_size_struct_union_in_extern_c : Warning<"%select{|empty }0" 6769*67e74705SXin Li "%select{struct|union}1 has size 0 in C, %select{size 1|non-zero size}2 in C++">, 6770*67e74705SXin Li InGroup<ExternCCompat>; 6771*67e74705SXin Lidef warn_cast_qual : Warning<"cast from %0 to %1 drops %select{const and " 6772*67e74705SXin Li "volatile qualifiers|const qualifier|volatile qualifier}2">, 6773*67e74705SXin Li InGroup<CastQual>, DefaultIgnore; 6774*67e74705SXin Lidef warn_cast_qual2 : Warning<"cast from %0 to %1 must have all intermediate " 6775*67e74705SXin Li "pointers const qualified to be safe">, InGroup<CastQual>, DefaultIgnore; 6776*67e74705SXin Lidef warn_redefine_extname_not_applied : Warning< 6777*67e74705SXin Li "#pragma redefine_extname is applicable to external C declarations only; " 6778*67e74705SXin Li "not applied to %select{function|variable}0 %1">, 6779*67e74705SXin Li InGroup<Pragmas>; 6780*67e74705SXin Li} // End of general sema category. 6781*67e74705SXin Li 6782*67e74705SXin Li// inline asm. 6783*67e74705SXin Lilet CategoryName = "Inline Assembly Issue" in { 6784*67e74705SXin Li def err_asm_invalid_lvalue_in_output : Error<"invalid lvalue in asm output">; 6785*67e74705SXin Li def err_asm_invalid_output_constraint : Error< 6786*67e74705SXin Li "invalid output constraint '%0' in asm">; 6787*67e74705SXin Li def err_asm_invalid_lvalue_in_input : Error< 6788*67e74705SXin Li "invalid lvalue in asm input for constraint '%0'">; 6789*67e74705SXin Li def err_asm_invalid_input_constraint : Error< 6790*67e74705SXin Li "invalid input constraint '%0' in asm">; 6791*67e74705SXin Li def err_asm_immediate_expected : Error<"constraint '%0' expects " 6792*67e74705SXin Li "an integer constant expression">; 6793*67e74705SXin Li def err_asm_invalid_type_in_input : Error< 6794*67e74705SXin Li "invalid type %0 in asm input for constraint '%1'">; 6795*67e74705SXin Li def err_asm_tying_incompatible_types : Error< 6796*67e74705SXin Li "unsupported inline asm: input with type " 6797*67e74705SXin Li "%diff{$ matching output with type $|}0,1">; 6798*67e74705SXin Li def err_asm_unexpected_constraint_alternatives : Error< 6799*67e74705SXin Li "asm constraint has an unexpected number of alternatives: %0 vs %1">; 6800*67e74705SXin Li def err_asm_incomplete_type : Error<"asm operand has incomplete type %0">; 6801*67e74705SXin Li def err_asm_unknown_register_name : Error<"unknown register name '%0' in asm">; 6802*67e74705SXin Li def err_asm_invalid_global_var_reg : Error<"register '%0' unsuitable for " 6803*67e74705SXin Li "global register variables on this target">; 6804*67e74705SXin Li def err_asm_register_size_mismatch : Error<"size of register '%0' does not " 6805*67e74705SXin Li "match variable size">; 6806*67e74705SXin Li def err_asm_bad_register_type : Error<"bad type for named register variable">; 6807*67e74705SXin Li def err_asm_invalid_input_size : Error< 6808*67e74705SXin Li "invalid input size for constraint '%0'">; 6809*67e74705SXin Li def err_asm_invalid_output_size : Error< 6810*67e74705SXin Li "invalid output size for constraint '%0'">; 6811*67e74705SXin Li def err_invalid_asm_cast_lvalue : Error< 6812*67e74705SXin Li "invalid use of a cast in a inline asm context requiring an l-value: " 6813*67e74705SXin Li "remove the cast or build with -fheinous-gnu-extensions">; 6814*67e74705SXin Li def err_invalid_asm_value_for_constraint 6815*67e74705SXin Li : Error <"value '%0' out of range for constraint '%1'">; 6816*67e74705SXin Li def err_asm_non_addr_value_in_memory_constraint : Error < 6817*67e74705SXin Li "reference to a %select{bit-field|vector element|global register variable}0" 6818*67e74705SXin Li " in asm %select{input|output}1 with a memory constraint '%2'">; 6819*67e74705SXin Li def err_asm_input_duplicate_match : Error< 6820*67e74705SXin Li "more than one input constraint matches the same output '%0'">; 6821*67e74705SXin Li 6822*67e74705SXin Li def warn_asm_label_on_auto_decl : Warning< 6823*67e74705SXin Li "ignored asm label '%0' on automatic variable">; 6824*67e74705SXin Li def warn_invalid_asm_cast_lvalue : Warning< 6825*67e74705SXin Li "invalid use of a cast in an inline asm context requiring an l-value: " 6826*67e74705SXin Li "accepted due to -fheinous-gnu-extensions, but clang may remove support " 6827*67e74705SXin Li "for this in the future">; 6828*67e74705SXin Li def warn_asm_mismatched_size_modifier : Warning< 6829*67e74705SXin Li "value size does not match register size specified by the constraint " 6830*67e74705SXin Li "and modifier">, 6831*67e74705SXin Li InGroup<ASMOperandWidths>; 6832*67e74705SXin Li 6833*67e74705SXin Li def note_asm_missing_constraint_modifier : Note< 6834*67e74705SXin Li "use constraint modifier \"%0\"">; 6835*67e74705SXin Li def note_asm_input_duplicate_first : Note< 6836*67e74705SXin Li "constraint '%0' is already present here">; 6837*67e74705SXin Li} 6838*67e74705SXin Li 6839*67e74705SXin Lilet CategoryName = "Semantic Issue" in { 6840*67e74705SXin Li 6841*67e74705SXin Lidef err_invalid_conversion_between_vectors : Error< 6842*67e74705SXin Li "invalid conversion between vector type%diff{ $ and $|}0,1 of different " 6843*67e74705SXin Li "size">; 6844*67e74705SXin Lidef err_invalid_conversion_between_vector_and_integer : Error< 6845*67e74705SXin Li "invalid conversion between vector type %0 and integer type %1 " 6846*67e74705SXin Li "of different size">; 6847*67e74705SXin Li 6848*67e74705SXin Lidef err_opencl_function_pointer_variable : Error< 6849*67e74705SXin Li "pointers to functions are not allowed">; 6850*67e74705SXin Li 6851*67e74705SXin Lidef err_opencl_taking_function_address : Error< 6852*67e74705SXin Li "taking address of function is not allowed">; 6853*67e74705SXin Li 6854*67e74705SXin Lidef err_invalid_conversion_between_vector_and_scalar : Error< 6855*67e74705SXin Li "invalid conversion between vector type %0 and scalar type %1">; 6856*67e74705SXin Li 6857*67e74705SXin Li// C++ member initializers. 6858*67e74705SXin Lidef err_only_constructors_take_base_inits : Error< 6859*67e74705SXin Li "only constructors take base initializers">; 6860*67e74705SXin Li 6861*67e74705SXin Lidef err_multiple_mem_initialization : Error < 6862*67e74705SXin Li "multiple initializations given for non-static member %0">; 6863*67e74705SXin Lidef err_multiple_mem_union_initialization : Error < 6864*67e74705SXin Li "initializing multiple members of union">; 6865*67e74705SXin Lidef err_multiple_base_initialization : Error < 6866*67e74705SXin Li "multiple initializations given for base %0">; 6867*67e74705SXin Li 6868*67e74705SXin Lidef err_mem_init_not_member_or_class : Error< 6869*67e74705SXin Li "member initializer %0 does not name a non-static data member or base " 6870*67e74705SXin Li "class">; 6871*67e74705SXin Li 6872*67e74705SXin Lidef warn_initializer_out_of_order : Warning< 6873*67e74705SXin Li "%select{field|base class}0 %1 will be initialized after " 6874*67e74705SXin Li "%select{field|base}2 %3">, 6875*67e74705SXin Li InGroup<Reorder>, DefaultIgnore; 6876*67e74705SXin Lidef warn_abstract_vbase_init_ignored : Warning< 6877*67e74705SXin Li "initializer for virtual base class %0 of abstract class %1 " 6878*67e74705SXin Li "will never be used">, 6879*67e74705SXin Li InGroup<DiagGroup<"abstract-vbase-init">>, DefaultIgnore; 6880*67e74705SXin Li 6881*67e74705SXin Lidef err_base_init_does_not_name_class : Error< 6882*67e74705SXin Li "constructor initializer %0 does not name a class">; 6883*67e74705SXin Lidef err_base_init_direct_and_virtual : Error< 6884*67e74705SXin Li "base class initializer %0 names both a direct base class and an " 6885*67e74705SXin Li "inherited virtual base class">; 6886*67e74705SXin Lidef err_not_direct_base_or_virtual : Error< 6887*67e74705SXin Li "type %0 is not a direct or virtual base of %1">; 6888*67e74705SXin Li 6889*67e74705SXin Lidef err_in_class_initializer_non_const : Error< 6890*67e74705SXin Li "non-const static data member must be initialized out of line">; 6891*67e74705SXin Lidef err_in_class_initializer_volatile : Error< 6892*67e74705SXin Li "static const volatile data member must be initialized out of line">; 6893*67e74705SXin Lidef err_in_class_initializer_bad_type : Error< 6894*67e74705SXin Li "static data member of type %0 must be initialized out of line">; 6895*67e74705SXin Lidef ext_in_class_initializer_float_type : ExtWarn< 6896*67e74705SXin Li "in-class initializer for static data member of type %0 is a GNU extension">, 6897*67e74705SXin Li InGroup<GNUStaticFloatInit>; 6898*67e74705SXin Lidef ext_in_class_initializer_float_type_cxx11 : ExtWarn< 6899*67e74705SXin Li "in-class initializer for static data member of type %0 requires " 6900*67e74705SXin Li "'constexpr' specifier">, InGroup<StaticFloatInit>, DefaultError; 6901*67e74705SXin Lidef note_in_class_initializer_float_type_cxx11 : Note<"add 'constexpr'">; 6902*67e74705SXin Lidef err_in_class_initializer_literal_type : Error< 6903*67e74705SXin Li "in-class initializer for static data member of type %0 requires " 6904*67e74705SXin Li "'constexpr' specifier">; 6905*67e74705SXin Lidef err_in_class_initializer_non_constant : Error< 6906*67e74705SXin Li "in-class initializer for static data member is not a constant expression">; 6907*67e74705SXin Lidef err_in_class_initializer_not_yet_parsed 6908*67e74705SXin Li : Error<"cannot use defaulted default constructor of %0 within the class " 6909*67e74705SXin Li "outside of member functions because %1 has an initializer">; 6910*67e74705SXin Lidef err_in_class_initializer_not_yet_parsed_outer_class 6911*67e74705SXin Li : Error<"cannot use defaulted default constructor of %0 within " 6912*67e74705SXin Li "%1 outside of member functions because %2 has an initializer">; 6913*67e74705SXin Li 6914*67e74705SXin Lidef ext_in_class_initializer_non_constant : Extension< 6915*67e74705SXin Li "in-class initializer for static data member is not a constant expression; " 6916*67e74705SXin Li "folding it to a constant is a GNU extension">, InGroup<GNUFoldingConstant>; 6917*67e74705SXin Li 6918*67e74705SXin Lidef err_thread_dynamic_init : Error< 6919*67e74705SXin Li "initializer for thread-local variable must be a constant expression">; 6920*67e74705SXin Lidef err_thread_nontrivial_dtor : Error< 6921*67e74705SXin Li "type of thread-local variable has non-trivial destruction">; 6922*67e74705SXin Lidef note_use_thread_local : Note< 6923*67e74705SXin Li "use 'thread_local' to allow this">; 6924*67e74705SXin Li 6925*67e74705SXin Li// C++ anonymous unions and GNU anonymous structs/unions 6926*67e74705SXin Lidef ext_anonymous_union : Extension< 6927*67e74705SXin Li "anonymous unions are a C11 extension">, InGroup<C11>; 6928*67e74705SXin Lidef ext_gnu_anonymous_struct : Extension< 6929*67e74705SXin Li "anonymous structs are a GNU extension">, InGroup<GNUAnonymousStruct>; 6930*67e74705SXin Lidef ext_c11_anonymous_struct : Extension< 6931*67e74705SXin Li "anonymous structs are a C11 extension">, InGroup<C11>; 6932*67e74705SXin Lidef err_anonymous_union_not_static : Error< 6933*67e74705SXin Li "anonymous unions at namespace or global scope must be declared 'static'">; 6934*67e74705SXin Lidef err_anonymous_union_with_storage_spec : Error< 6935*67e74705SXin Li "anonymous union at class scope must not have a storage specifier">; 6936*67e74705SXin Lidef err_anonymous_struct_not_member : Error< 6937*67e74705SXin Li "anonymous %select{structs|structs and classes}0 must be " 6938*67e74705SXin Li "%select{struct or union|class}0 members">; 6939*67e74705SXin Lidef err_anonymous_record_member_redecl : Error< 6940*67e74705SXin Li "member of anonymous %select{struct|union}0 redeclares %1">; 6941*67e74705SXin Lidef err_anonymous_record_with_type : Error< 6942*67e74705SXin Li "types cannot be declared in an anonymous %select{struct|union}0">; 6943*67e74705SXin Lidef ext_anonymous_record_with_type : Extension< 6944*67e74705SXin Li "types declared in an anonymous %select{struct|union}0 are a Microsoft " 6945*67e74705SXin Li "extension">, InGroup<MicrosoftAnonTag>; 6946*67e74705SXin Lidef ext_anonymous_record_with_anonymous_type : Extension< 6947*67e74705SXin Li "anonymous types declared in an anonymous %select{struct|union}0 " 6948*67e74705SXin Li "are an extension">, InGroup<DiagGroup<"nested-anon-types">>; 6949*67e74705SXin Lidef err_anonymous_record_with_function : Error< 6950*67e74705SXin Li "functions cannot be declared in an anonymous %select{struct|union}0">; 6951*67e74705SXin Lidef err_anonymous_record_with_static : Error< 6952*67e74705SXin Li "static members cannot be declared in an anonymous %select{struct|union}0">; 6953*67e74705SXin Lidef err_anonymous_record_bad_member : Error< 6954*67e74705SXin Li "anonymous %select{struct|union}0 can only contain non-static data members">; 6955*67e74705SXin Lidef err_anonymous_record_nonpublic_member : Error< 6956*67e74705SXin Li "anonymous %select{struct|union}0 cannot contain a " 6957*67e74705SXin Li "%select{private|protected}1 data member">; 6958*67e74705SXin Lidef ext_ms_anonymous_record : ExtWarn< 6959*67e74705SXin Li "anonymous %select{structs|unions}0 are a Microsoft extension">, 6960*67e74705SXin Li InGroup<MicrosoftAnonTag>; 6961*67e74705SXin Li 6962*67e74705SXin Li// C++ local classes 6963*67e74705SXin Lidef err_reference_to_local_var_in_enclosing_function : Error< 6964*67e74705SXin Li "reference to local variable %0 declared in enclosing function %1">; 6965*67e74705SXin Lidef err_reference_to_local_var_in_enclosing_block : Error< 6966*67e74705SXin Li "reference to local variable %0 declared in enclosing block literal">; 6967*67e74705SXin Lidef err_reference_to_local_var_in_enclosing_lambda : Error< 6968*67e74705SXin Li "reference to local variable %0 declared in enclosing lambda expression">; 6969*67e74705SXin Lidef err_reference_to_local_var_in_enclosing_context : Error< 6970*67e74705SXin Li "reference to local variable %0 declared in enclosing context">; 6971*67e74705SXin Li 6972*67e74705SXin Lidef err_static_data_member_not_allowed_in_local_class : Error< 6973*67e74705SXin Li "static data member %0 not allowed in local class %1">; 6974*67e74705SXin Li 6975*67e74705SXin Li// C++ derived classes 6976*67e74705SXin Lidef err_base_clause_on_union : Error<"unions cannot have base classes">; 6977*67e74705SXin Lidef err_base_must_be_class : Error<"base specifier must name a class">; 6978*67e74705SXin Lidef err_union_as_base_class : Error<"unions cannot be base classes">; 6979*67e74705SXin Lidef err_circular_inheritance : Error< 6980*67e74705SXin Li "circular inheritance between %0 and %1">; 6981*67e74705SXin Lidef err_base_class_has_flexible_array_member : Error< 6982*67e74705SXin Li "base class %0 has a flexible array member">; 6983*67e74705SXin Lidef err_incomplete_base_class : Error<"base class has incomplete type">; 6984*67e74705SXin Lidef err_duplicate_base_class : Error< 6985*67e74705SXin Li "base class %0 specified more than once as a direct base class">; 6986*67e74705SXin Lidef warn_inaccessible_base_class : Warning< 6987*67e74705SXin Li "direct base %0 is inaccessible due to ambiguity:%1">, 6988*67e74705SXin Li InGroup<DiagGroup<"inaccessible-base">>; 6989*67e74705SXin Li// FIXME: better way to display derivation? Pass entire thing into diagclient? 6990*67e74705SXin Lidef err_ambiguous_derived_to_base_conv : Error< 6991*67e74705SXin Li "ambiguous conversion from derived class %0 to base class %1:%2">; 6992*67e74705SXin Lidef err_ambiguous_memptr_conv : Error< 6993*67e74705SXin Li "ambiguous conversion from pointer to member of %select{base|derived}0 " 6994*67e74705SXin Li "class %1 to pointer to member of %select{derived|base}0 class %2:%3">; 6995*67e74705SXin Li 6996*67e74705SXin Lidef err_memptr_conv_via_virtual : Error< 6997*67e74705SXin Li "conversion from pointer to member of class %0 to pointer to member " 6998*67e74705SXin Li "of class %1 via virtual base %2 is not allowed">; 6999*67e74705SXin Li 7000*67e74705SXin Li// C++ member name lookup 7001*67e74705SXin Lidef err_ambiguous_member_multiple_subobjects : Error< 7002*67e74705SXin Li "non-static member %0 found in multiple base-class subobjects of type %1:%2">; 7003*67e74705SXin Lidef err_ambiguous_member_multiple_subobject_types : Error< 7004*67e74705SXin Li "member %0 found in multiple base classes of different types">; 7005*67e74705SXin Lidef note_ambiguous_member_found : Note<"member found by ambiguous name lookup">; 7006*67e74705SXin Lidef err_ambiguous_reference : Error<"reference to %0 is ambiguous">; 7007*67e74705SXin Lidef note_ambiguous_candidate : Note<"candidate found by name lookup is %q0">; 7008*67e74705SXin Lidef err_ambiguous_tag_hiding : Error<"a type named %0 is hidden by a " 7009*67e74705SXin Li "declaration in a different namespace">; 7010*67e74705SXin Lidef note_hidden_tag : Note<"type declaration hidden">; 7011*67e74705SXin Lidef note_hiding_object : Note<"declaration hides type">; 7012*67e74705SXin Li 7013*67e74705SXin Li// C++ operator overloading 7014*67e74705SXin Lidef err_operator_overload_needs_class_or_enum : Error< 7015*67e74705SXin Li "overloaded %0 must have at least one parameter of class " 7016*67e74705SXin Li "or enumeration type">; 7017*67e74705SXin Li 7018*67e74705SXin Lidef err_operator_overload_variadic : Error<"overloaded %0 cannot be variadic">; 7019*67e74705SXin Lidef err_operator_overload_static : Error< 7020*67e74705SXin Li "overloaded %0 cannot be a static member function">; 7021*67e74705SXin Lidef err_operator_overload_default_arg : Error< 7022*67e74705SXin Li "parameter of overloaded %0 cannot have a default argument">; 7023*67e74705SXin Lidef err_operator_overload_must_be : Error< 7024*67e74705SXin Li "overloaded %0 must be a %select{unary|binary|unary or binary}2 operator " 7025*67e74705SXin Li "(has %1 parameter%s1)">; 7026*67e74705SXin Li 7027*67e74705SXin Lidef err_operator_overload_must_be_member : Error< 7028*67e74705SXin Li "overloaded %0 must be a non-static member function">; 7029*67e74705SXin Lidef err_operator_overload_post_incdec_must_be_int : Error< 7030*67e74705SXin Li "parameter of overloaded post-%select{increment|decrement}1 operator must " 7031*67e74705SXin Li "have type 'int' (not %0)">; 7032*67e74705SXin Li 7033*67e74705SXin Li// C++ allocation and deallocation functions. 7034*67e74705SXin Lidef err_operator_new_delete_declared_in_namespace : Error< 7035*67e74705SXin Li "%0 cannot be declared inside a namespace">; 7036*67e74705SXin Lidef err_operator_new_delete_declared_static : Error< 7037*67e74705SXin Li "%0 cannot be declared static in global scope">; 7038*67e74705SXin Lidef ext_operator_new_delete_declared_inline : ExtWarn< 7039*67e74705SXin Li "replacement function %0 cannot be declared 'inline'">, 7040*67e74705SXin Li InGroup<DiagGroup<"inline-new-delete">>; 7041*67e74705SXin Lidef err_operator_new_delete_invalid_result_type : Error< 7042*67e74705SXin Li "%0 must return type %1">; 7043*67e74705SXin Lidef err_operator_new_delete_dependent_result_type : Error< 7044*67e74705SXin Li "%0 cannot have a dependent return type; use %1 instead">; 7045*67e74705SXin Lidef err_operator_new_delete_too_few_parameters : Error< 7046*67e74705SXin Li "%0 must have at least one parameter">; 7047*67e74705SXin Lidef err_operator_new_delete_template_too_few_parameters : Error< 7048*67e74705SXin Li "%0 template must have at least two parameters">; 7049*67e74705SXin Lidef warn_operator_new_returns_null : Warning< 7050*67e74705SXin Li "%0 should not return a null pointer unless it is declared 'throw()'" 7051*67e74705SXin Li "%select{| or 'noexcept'}1">, InGroup<OperatorNewReturnsNull>; 7052*67e74705SXin Li 7053*67e74705SXin Lidef err_operator_new_dependent_param_type : Error< 7054*67e74705SXin Li "%0 cannot take a dependent type as first parameter; " 7055*67e74705SXin Li "use size_t (%1) instead">; 7056*67e74705SXin Lidef err_operator_new_param_type : Error< 7057*67e74705SXin Li "%0 takes type size_t (%1) as first parameter">; 7058*67e74705SXin Lidef err_operator_new_default_arg: Error< 7059*67e74705SXin Li "parameter of %0 cannot have a default argument">; 7060*67e74705SXin Lidef err_operator_delete_dependent_param_type : Error< 7061*67e74705SXin Li "%0 cannot take a dependent type as first parameter; use %1 instead">; 7062*67e74705SXin Lidef err_operator_delete_param_type : Error< 7063*67e74705SXin Li "first parameter of %0 must have type %1">; 7064*67e74705SXin Li 7065*67e74705SXin Li// C++ literal operators 7066*67e74705SXin Lidef err_literal_operator_outside_namespace : Error< 7067*67e74705SXin Li "literal operator %0 must be in a namespace or global scope">; 7068*67e74705SXin Lidef err_literal_operator_id_outside_namespace : Error< 7069*67e74705SXin Li "non-namespace scope '%0' cannot have a literal operator member">; 7070*67e74705SXin Lidef err_literal_operator_default_argument : Error< 7071*67e74705SXin Li "literal operator cannot have a default argument">; 7072*67e74705SXin Lidef err_literal_operator_bad_param_count : Error< 7073*67e74705SXin Li "non-template literal operator must have one or two parameters">; 7074*67e74705SXin Lidef err_literal_operator_invalid_param : Error< 7075*67e74705SXin Li "parameter of literal operator must have type 'unsigned long long', 'long double', 'char', 'wchar_t', 'char16_t', 'char32_t', or 'const char *'">; 7076*67e74705SXin Lidef err_literal_operator_param : Error< 7077*67e74705SXin Li "invalid literal operator parameter type %0, did you mean %1?">; 7078*67e74705SXin Lidef err_literal_operator_template_with_params : Error< 7079*67e74705SXin Li "literal operator template cannot have any parameters">; 7080*67e74705SXin Lidef err_literal_operator_template : Error< 7081*67e74705SXin Li "template parameter list for literal operator must be either 'char...' or 'typename T, T...'">; 7082*67e74705SXin Lidef err_literal_operator_extern_c : Error< 7083*67e74705SXin Li "literal operator must have C++ linkage">; 7084*67e74705SXin Lidef ext_string_literal_operator_template : ExtWarn< 7085*67e74705SXin Li "string literal operator templates are a GNU extension">, 7086*67e74705SXin Li InGroup<GNUStringLiteralOperatorTemplate>; 7087*67e74705SXin Lidef warn_user_literal_reserved : Warning< 7088*67e74705SXin Li "user-defined literal suffixes not starting with '_' are reserved" 7089*67e74705SXin Li "%select{; no literal will invoke this operator|}0">, 7090*67e74705SXin Li InGroup<UserDefinedLiterals>; 7091*67e74705SXin Li 7092*67e74705SXin Li// C++ conversion functions 7093*67e74705SXin Lidef err_conv_function_not_member : Error< 7094*67e74705SXin Li "conversion function must be a non-static member function">; 7095*67e74705SXin Lidef err_conv_function_return_type : Error< 7096*67e74705SXin Li "conversion function cannot have a return type">; 7097*67e74705SXin Lidef err_conv_function_with_params : Error< 7098*67e74705SXin Li "conversion function cannot have any parameters">; 7099*67e74705SXin Lidef err_conv_function_variadic : Error< 7100*67e74705SXin Li "conversion function cannot be variadic">; 7101*67e74705SXin Lidef err_conv_function_to_array : Error< 7102*67e74705SXin Li "conversion function cannot convert to an array type">; 7103*67e74705SXin Lidef err_conv_function_to_function : Error< 7104*67e74705SXin Li "conversion function cannot convert to a function type">; 7105*67e74705SXin Lidef err_conv_function_with_complex_decl : Error< 7106*67e74705SXin Li "cannot specify any part of a return type in the " 7107*67e74705SXin Li "declaration of a conversion function" 7108*67e74705SXin Li "%select{" 7109*67e74705SXin Li "; put the complete type after 'operator'|" 7110*67e74705SXin Li "; use a typedef to declare a conversion to %1|" 7111*67e74705SXin Li "; use an alias template to declare a conversion to %1|" 7112*67e74705SXin Li "}0">; 7113*67e74705SXin Lidef err_conv_function_redeclared : Error< 7114*67e74705SXin Li "conversion function cannot be redeclared">; 7115*67e74705SXin Lidef warn_conv_to_self_not_used : Warning< 7116*67e74705SXin Li "conversion function converting %0 to itself will never be used">; 7117*67e74705SXin Lidef warn_conv_to_base_not_used : Warning< 7118*67e74705SXin Li "conversion function converting %0 to its base class %1 will never be used">; 7119*67e74705SXin Lidef warn_conv_to_void_not_used : Warning< 7120*67e74705SXin Li "conversion function converting %0 to %1 will never be used">; 7121*67e74705SXin Li 7122*67e74705SXin Lidef warn_not_compound_assign : Warning< 7123*67e74705SXin Li "use of unary operator that may be intended as compound assignment (%0=)">; 7124*67e74705SXin Li 7125*67e74705SXin Li// C++11 explicit conversion operators 7126*67e74705SXin Lidef ext_explicit_conversion_functions : ExtWarn< 7127*67e74705SXin Li "explicit conversion functions are a C++11 extension">, InGroup<CXX11>; 7128*67e74705SXin Lidef warn_cxx98_compat_explicit_conversion_functions : Warning< 7129*67e74705SXin Li "explicit conversion functions are incompatible with C++98">, 7130*67e74705SXin Li InGroup<CXX98Compat>, DefaultIgnore; 7131*67e74705SXin Li 7132*67e74705SXin Li// C++11 defaulted functions 7133*67e74705SXin Lidef err_defaulted_special_member_params : Error< 7134*67e74705SXin Li "an explicitly-defaulted %select{|copy |move }0constructor cannot " 7135*67e74705SXin Li "have default arguments">; 7136*67e74705SXin Lidef err_defaulted_special_member_variadic : Error< 7137*67e74705SXin Li "an explicitly-defaulted %select{|copy |move }0constructor cannot " 7138*67e74705SXin Li "be variadic">; 7139*67e74705SXin Lidef err_defaulted_special_member_return_type : Error< 7140*67e74705SXin Li "explicitly-defaulted %select{copy|move}0 assignment operator must " 7141*67e74705SXin Li "return %1">; 7142*67e74705SXin Lidef err_defaulted_special_member_quals : Error< 7143*67e74705SXin Li "an explicitly-defaulted %select{copy|move}0 assignment operator may not " 7144*67e74705SXin Li "have 'const'%select{, 'constexpr'|}1 or 'volatile' qualifiers">; 7145*67e74705SXin Lidef err_defaulted_special_member_volatile_param : Error< 7146*67e74705SXin Li "the parameter for an explicitly-defaulted %select{<<ERROR>>|" 7147*67e74705SXin Li "copy constructor|move constructor|copy assignment operator|" 7148*67e74705SXin Li "move assignment operator|<<ERROR>>}0 may not be volatile">; 7149*67e74705SXin Lidef err_defaulted_special_member_move_const_param : Error< 7150*67e74705SXin Li "the parameter for an explicitly-defaulted move " 7151*67e74705SXin Li "%select{constructor|assignment operator}0 may not be const">; 7152*67e74705SXin Lidef err_defaulted_special_member_copy_const_param : Error< 7153*67e74705SXin Li "the parameter for this explicitly-defaulted copy " 7154*67e74705SXin Li "%select{constructor|assignment operator}0 is const, but a member or base " 7155*67e74705SXin Li "requires it to be non-const">; 7156*67e74705SXin Lidef err_defaulted_copy_assign_not_ref : Error< 7157*67e74705SXin Li "the parameter for an explicitly-defaulted copy assignment operator must be an " 7158*67e74705SXin Li "lvalue reference type">; 7159*67e74705SXin Lidef err_incorrect_defaulted_exception_spec : Error< 7160*67e74705SXin Li "exception specification of explicitly defaulted %select{default constructor|" 7161*67e74705SXin Li "copy constructor|move constructor|copy assignment operator|move assignment " 7162*67e74705SXin Li "operator|destructor}0 does not match the " 7163*67e74705SXin Li "calculated one">; 7164*67e74705SXin Lidef err_incorrect_defaulted_constexpr : Error< 7165*67e74705SXin Li "defaulted definition of %select{default constructor|copy constructor|" 7166*67e74705SXin Li "move constructor|copy assignment operator|move assignment operator}0 " 7167*67e74705SXin Li "is not constexpr">; 7168*67e74705SXin Lidef err_out_of_line_default_deletes : Error< 7169*67e74705SXin Li "defaulting this %select{default constructor|copy constructor|move " 7170*67e74705SXin Li "constructor|copy assignment operator|move assignment operator|destructor}0 " 7171*67e74705SXin Li "would delete it after its first declaration">; 7172*67e74705SXin Lidef warn_vbase_moved_multiple_times : Warning< 7173*67e74705SXin Li "defaulted move assignment operator of %0 will move assign virtual base " 7174*67e74705SXin Li "class %1 multiple times">, InGroup<DiagGroup<"multiple-move-vbase">>; 7175*67e74705SXin Lidef note_vbase_moved_here : Note< 7176*67e74705SXin Li "%select{%1 is a virtual base class of base class %2 declared here|" 7177*67e74705SXin Li "virtual base class %1 declared here}0">; 7178*67e74705SXin Li 7179*67e74705SXin Lidef ext_implicit_exception_spec_mismatch : ExtWarn< 7180*67e74705SXin Li "function previously declared with an %select{explicit|implicit}0 exception " 7181*67e74705SXin Li "specification redeclared with an %select{implicit|explicit}0 exception " 7182*67e74705SXin Li "specification">, InGroup<DiagGroup<"implicit-exception-spec-mismatch">>; 7183*67e74705SXin Li 7184*67e74705SXin Lidef warn_ptr_arith_precedes_bounds : Warning< 7185*67e74705SXin Li "the pointer decremented by %0 refers before the beginning of the array">, 7186*67e74705SXin Li InGroup<ArrayBoundsPointerArithmetic>, DefaultIgnore; 7187*67e74705SXin Lidef warn_ptr_arith_exceeds_bounds : Warning< 7188*67e74705SXin Li "the pointer incremented by %0 refers past the end of the array (that " 7189*67e74705SXin Li "contains %1 element%s2)">, 7190*67e74705SXin Li InGroup<ArrayBoundsPointerArithmetic>, DefaultIgnore; 7191*67e74705SXin Lidef warn_array_index_precedes_bounds : Warning< 7192*67e74705SXin Li "array index %0 is before the beginning of the array">, 7193*67e74705SXin Li InGroup<ArrayBounds>; 7194*67e74705SXin Lidef warn_array_index_exceeds_bounds : Warning< 7195*67e74705SXin Li "array index %0 is past the end of the array (which contains %1 " 7196*67e74705SXin Li "element%s2)">, InGroup<ArrayBounds>; 7197*67e74705SXin Lidef note_array_index_out_of_bounds : Note< 7198*67e74705SXin Li "array %0 declared here">; 7199*67e74705SXin Li 7200*67e74705SXin Lidef warn_printf_insufficient_data_args : Warning< 7201*67e74705SXin Li "more '%%' conversions than data arguments">, InGroup<Format>; 7202*67e74705SXin Lidef warn_printf_data_arg_not_used : Warning< 7203*67e74705SXin Li "data argument not used by format string">, InGroup<FormatExtraArgs>; 7204*67e74705SXin Lidef warn_format_invalid_conversion : Warning< 7205*67e74705SXin Li "invalid conversion specifier '%0'">, InGroup<FormatInvalidSpecifier>; 7206*67e74705SXin Lidef warn_printf_incomplete_specifier : Warning< 7207*67e74705SXin Li "incomplete format specifier">, InGroup<Format>; 7208*67e74705SXin Lidef warn_missing_format_string : Warning< 7209*67e74705SXin Li "format string missing">, InGroup<Format>; 7210*67e74705SXin Lidef warn_scanf_nonzero_width : Warning< 7211*67e74705SXin Li "zero field width in scanf format string is unused">, 7212*67e74705SXin Li InGroup<Format>; 7213*67e74705SXin Lidef warn_format_conversion_argument_type_mismatch : Warning< 7214*67e74705SXin Li "format specifies type %0 but the argument has " 7215*67e74705SXin Li "%select{type|underlying type}2 %1">, 7216*67e74705SXin Li InGroup<Format>; 7217*67e74705SXin Lidef warn_format_conversion_argument_type_mismatch_pedantic : Extension< 7218*67e74705SXin Li "format specifies type %0 but the argument has " 7219*67e74705SXin Li "%select{type|underlying type}2 %1">, 7220*67e74705SXin Li InGroup<FormatPedantic>; 7221*67e74705SXin Lidef warn_format_argument_needs_cast : Warning< 7222*67e74705SXin Li "%select{values of type|enum values with underlying type}2 '%0' should not " 7223*67e74705SXin Li "be used as format arguments; add an explicit cast to %1 instead">, 7224*67e74705SXin Li InGroup<Format>; 7225*67e74705SXin Lidef warn_printf_positional_arg_exceeds_data_args : Warning < 7226*67e74705SXin Li "data argument position '%0' exceeds the number of data arguments (%1)">, 7227*67e74705SXin Li InGroup<Format>; 7228*67e74705SXin Lidef warn_format_zero_positional_specifier : Warning< 7229*67e74705SXin Li "position arguments in format strings start counting at 1 (not 0)">, 7230*67e74705SXin Li InGroup<Format>; 7231*67e74705SXin Lidef warn_format_invalid_positional_specifier : Warning< 7232*67e74705SXin Li "invalid position specified for %select{field width|field precision}0">, 7233*67e74705SXin Li InGroup<Format>; 7234*67e74705SXin Lidef warn_format_mix_positional_nonpositional_args : Warning< 7235*67e74705SXin Li "cannot mix positional and non-positional arguments in format string">, 7236*67e74705SXin Li InGroup<Format>; 7237*67e74705SXin Lidef warn_static_array_too_small : Warning< 7238*67e74705SXin Li "array argument is too small; contains %0 elements, callee requires at least %1">, 7239*67e74705SXin Li InGroup<ArrayBounds>; 7240*67e74705SXin Lidef note_callee_static_array : Note< 7241*67e74705SXin Li "callee declares array parameter as static here">; 7242*67e74705SXin Lidef warn_empty_format_string : Warning< 7243*67e74705SXin Li "format string is empty">, InGroup<FormatZeroLength>; 7244*67e74705SXin Lidef warn_format_string_is_wide_literal : Warning< 7245*67e74705SXin Li "format string should not be a wide string">, InGroup<Format>; 7246*67e74705SXin Lidef warn_printf_format_string_contains_null_char : Warning< 7247*67e74705SXin Li "format string contains '\\0' within the string body">, InGroup<Format>; 7248*67e74705SXin Lidef warn_printf_format_string_not_null_terminated : Warning< 7249*67e74705SXin Li "format string is not null-terminated">, InGroup<Format>; 7250*67e74705SXin Lidef warn_printf_asterisk_missing_arg : Warning< 7251*67e74705SXin Li "'%select{*|.*}0' specified field %select{width|precision}0 is missing a matching 'int' argument">, 7252*67e74705SXin Li InGroup<Format>; 7253*67e74705SXin Lidef warn_printf_asterisk_wrong_type : Warning< 7254*67e74705SXin Li "field %select{width|precision}0 should have type %1, but argument has type %2">, 7255*67e74705SXin Li InGroup<Format>; 7256*67e74705SXin Lidef warn_printf_nonsensical_optional_amount: Warning< 7257*67e74705SXin Li "%select{field width|precision}0 used with '%1' conversion specifier, resulting in undefined behavior">, 7258*67e74705SXin Li InGroup<Format>; 7259*67e74705SXin Lidef warn_printf_nonsensical_flag: Warning< 7260*67e74705SXin Li "flag '%0' results in undefined behavior with '%1' conversion specifier">, 7261*67e74705SXin Li InGroup<Format>; 7262*67e74705SXin Lidef warn_format_nonsensical_length: Warning< 7263*67e74705SXin Li "length modifier '%0' results in undefined behavior or no effect with '%1' conversion specifier">, 7264*67e74705SXin Li InGroup<Format>; 7265*67e74705SXin Lidef warn_format_non_standard_positional_arg: Warning< 7266*67e74705SXin Li "positional arguments are not supported by ISO C">, InGroup<FormatNonStandard>, DefaultIgnore; 7267*67e74705SXin Lidef warn_format_non_standard: Warning< 7268*67e74705SXin Li "'%0' %select{length modifier|conversion specifier}1 is not supported by ISO C">, 7269*67e74705SXin Li InGroup<FormatNonStandard>, DefaultIgnore; 7270*67e74705SXin Lidef warn_format_non_standard_conversion_spec: Warning< 7271*67e74705SXin Li "using length modifier '%0' with conversion specifier '%1' is not supported by ISO C">, 7272*67e74705SXin Li InGroup<FormatNonStandard>, DefaultIgnore; 7273*67e74705SXin Lidef warn_printf_ignored_flag: Warning< 7274*67e74705SXin Li "flag '%0' is ignored when flag '%1' is present">, 7275*67e74705SXin Li InGroup<Format>; 7276*67e74705SXin Lidef warn_printf_empty_objc_flag: Warning< 7277*67e74705SXin Li "missing object format flag">, 7278*67e74705SXin Li InGroup<Format>; 7279*67e74705SXin Lidef warn_printf_ObjCflags_without_ObjCConversion: Warning< 7280*67e74705SXin Li "object format flags cannot be used with '%0' conversion specifier">, 7281*67e74705SXin Li InGroup<Format>; 7282*67e74705SXin Lidef warn_printf_invalid_objc_flag: Warning< 7283*67e74705SXin Li "'%0' is not a valid object format flag">, 7284*67e74705SXin Li InGroup<Format>; 7285*67e74705SXin Lidef warn_scanf_scanlist_incomplete : Warning< 7286*67e74705SXin Li "no closing ']' for '%%[' in scanf format string">, 7287*67e74705SXin Li InGroup<Format>; 7288*67e74705SXin Lidef note_format_string_defined : Note<"format string is defined here">; 7289*67e74705SXin Lidef note_format_fix_specifier : Note<"did you mean to use '%0'?">; 7290*67e74705SXin Lidef note_printf_c_str: Note<"did you mean to call the %0 method?">; 7291*67e74705SXin Lidef note_format_security_fixit: Note< 7292*67e74705SXin Li "treat the string as an argument to avoid this">; 7293*67e74705SXin Li 7294*67e74705SXin Lidef warn_null_arg : Warning< 7295*67e74705SXin Li "null passed to a callee that requires a non-null argument">, 7296*67e74705SXin Li InGroup<NonNull>; 7297*67e74705SXin Lidef warn_null_ret : Warning< 7298*67e74705SXin Li "null returned from %select{function|method}0 that requires a non-null return value">, 7299*67e74705SXin Li InGroup<NonNull>; 7300*67e74705SXin Li 7301*67e74705SXin Li// CHECK: returning address/reference of stack memory 7302*67e74705SXin Lidef warn_ret_stack_addr_ref : Warning< 7303*67e74705SXin Li "%select{address of|reference to}0 stack memory associated with local " 7304*67e74705SXin Li "variable %1 returned">, 7305*67e74705SXin Li InGroup<ReturnStackAddress>; 7306*67e74705SXin Lidef warn_ret_local_temp_addr_ref : Warning< 7307*67e74705SXin Li "returning %select{address of|reference to}0 local temporary object">, 7308*67e74705SXin Li InGroup<ReturnStackAddress>; 7309*67e74705SXin Lidef warn_ret_addr_label : Warning< 7310*67e74705SXin Li "returning address of label, which is local">, 7311*67e74705SXin Li InGroup<ReturnStackAddress>; 7312*67e74705SXin Lidef err_ret_local_block : Error< 7313*67e74705SXin Li "returning block that lives on the local stack">; 7314*67e74705SXin Lidef note_ref_var_local_bind : Note< 7315*67e74705SXin Li "binding reference variable %0 here">; 7316*67e74705SXin Li 7317*67e74705SXin Li// Check for initializing a member variable with the address or a reference to 7318*67e74705SXin Li// a constructor parameter. 7319*67e74705SXin Lidef warn_bind_ref_member_to_parameter : Warning< 7320*67e74705SXin Li "binding reference member %0 to stack allocated parameter %1">, 7321*67e74705SXin Li InGroup<DanglingField>; 7322*67e74705SXin Lidef warn_init_ptr_member_to_parameter_addr : Warning< 7323*67e74705SXin Li "initializing pointer member %0 with the stack address of parameter %1">, 7324*67e74705SXin Li InGroup<DanglingField>; 7325*67e74705SXin Lidef warn_bind_ref_member_to_temporary : Warning< 7326*67e74705SXin Li "binding reference %select{|subobject of }1member %0 to a temporary value">, 7327*67e74705SXin Li InGroup<DanglingField>; 7328*67e74705SXin Lidef note_ref_or_ptr_member_declared_here : Note< 7329*67e74705SXin Li "%select{reference|pointer}0 member declared here">; 7330*67e74705SXin Lidef note_ref_subobject_of_member_declared_here : Note< 7331*67e74705SXin Li "member with reference subobject declared here">; 7332*67e74705SXin Li 7333*67e74705SXin Li// For non-floating point, expressions of the form x == x or x != x 7334*67e74705SXin Li// should result in a warning, since these always evaluate to a constant. 7335*67e74705SXin Li// Array comparisons have similar warnings 7336*67e74705SXin Lidef warn_comparison_always : Warning< 7337*67e74705SXin Li "%select{self-|array }0comparison always evaluates to %select{false|true|a constant}1">, 7338*67e74705SXin Li InGroup<TautologicalCompare>; 7339*67e74705SXin Lidef warn_comparison_bitwise_always : Warning< 7340*67e74705SXin Li "bitwise comparison always evaluates to %select{false|true}0">, 7341*67e74705SXin Li InGroup<TautologicalCompare>; 7342*67e74705SXin Lidef warn_tautological_overlap_comparison : Warning< 7343*67e74705SXin Li "overlapping comparisons always evaluate to %select{false|true}0">, 7344*67e74705SXin Li InGroup<TautologicalOverlapCompare>, DefaultIgnore; 7345*67e74705SXin Li 7346*67e74705SXin Lidef warn_stringcompare : Warning< 7347*67e74705SXin Li "result of comparison against %select{a string literal|@encode}0 is " 7348*67e74705SXin Li "unspecified (use strncmp instead)">, 7349*67e74705SXin Li InGroup<StringCompare>; 7350*67e74705SXin Li 7351*67e74705SXin Lidef warn_identity_field_assign : Warning< 7352*67e74705SXin Li "assigning %select{field|instance variable}0 to itself">, 7353*67e74705SXin Li InGroup<SelfAssignmentField>; 7354*67e74705SXin Li 7355*67e74705SXin Li// Type safety attributes 7356*67e74705SXin Lidef err_type_tag_for_datatype_not_ice : Error< 7357*67e74705SXin Li "'type_tag_for_datatype' attribute requires the initializer to be " 7358*67e74705SXin Li "an %select{integer|integral}0 constant expression">; 7359*67e74705SXin Lidef err_type_tag_for_datatype_too_large : Error< 7360*67e74705SXin Li "'type_tag_for_datatype' attribute requires the initializer to be " 7361*67e74705SXin Li "an %select{integer|integral}0 constant expression " 7362*67e74705SXin Li "that can be represented by a 64 bit integer">; 7363*67e74705SXin Lidef warn_type_tag_for_datatype_wrong_kind : Warning< 7364*67e74705SXin Li "this type tag was not designed to be used with this function">, 7365*67e74705SXin Li InGroup<TypeSafety>; 7366*67e74705SXin Lidef warn_type_safety_type_mismatch : Warning< 7367*67e74705SXin Li "argument type %0 doesn't match specified %1 type tag " 7368*67e74705SXin Li "%select{that requires %3|}2">, InGroup<TypeSafety>; 7369*67e74705SXin Lidef warn_type_safety_null_pointer_required : Warning< 7370*67e74705SXin Li "specified %0 type tag requires a null pointer">, InGroup<TypeSafety>; 7371*67e74705SXin Li 7372*67e74705SXin Li// Generic selections. 7373*67e74705SXin Lidef err_assoc_type_incomplete : Error< 7374*67e74705SXin Li "type %0 in generic association incomplete">; 7375*67e74705SXin Lidef err_assoc_type_nonobject : Error< 7376*67e74705SXin Li "type %0 in generic association not an object type">; 7377*67e74705SXin Lidef err_assoc_type_variably_modified : Error< 7378*67e74705SXin Li "type %0 in generic association is a variably modified type">; 7379*67e74705SXin Lidef err_assoc_compatible_types : Error< 7380*67e74705SXin Li "type %0 in generic association compatible with previously specified type %1">; 7381*67e74705SXin Lidef note_compat_assoc : Note< 7382*67e74705SXin Li "compatible type %0 specified here">; 7383*67e74705SXin Lidef err_generic_sel_no_match : Error< 7384*67e74705SXin Li "controlling expression type %0 not compatible with any generic association type">; 7385*67e74705SXin Lidef err_generic_sel_multi_match : Error< 7386*67e74705SXin Li "controlling expression type %0 compatible with %1 generic association types">; 7387*67e74705SXin Li 7388*67e74705SXin Li 7389*67e74705SXin Li// Blocks 7390*67e74705SXin Lidef err_blocks_disable : Error<"blocks support disabled - compile with -fblocks" 7391*67e74705SXin Li " or %select{pick a deployment target that supports them|for OpenCL 2.0 or above}0">; 7392*67e74705SXin Lidef err_block_returning_array_function : Error< 7393*67e74705SXin Li "block cannot return %select{array|function}0 type %1">; 7394*67e74705SXin Li 7395*67e74705SXin Li// Builtin annotation 7396*67e74705SXin Lidef err_builtin_annotation_first_arg : Error< 7397*67e74705SXin Li "first argument to __builtin_annotation must be an integer">; 7398*67e74705SXin Lidef err_builtin_annotation_second_arg : Error< 7399*67e74705SXin Li "second argument to __builtin_annotation must be a non-wide string constant">; 7400*67e74705SXin Li 7401*67e74705SXin Li// CFString checking 7402*67e74705SXin Lidef err_cfstring_literal_not_string_constant : Error< 7403*67e74705SXin Li "CFString literal is not a string constant">; 7404*67e74705SXin Lidef warn_cfstring_truncated : Warning< 7405*67e74705SXin Li "input conversion stopped due to an input byte that does not " 7406*67e74705SXin Li "belong to the input codeset UTF-8">, 7407*67e74705SXin Li InGroup<DiagGroup<"CFString-literal">>; 7408*67e74705SXin Li 7409*67e74705SXin Li// Statements. 7410*67e74705SXin Lidef err_continue_not_in_loop : Error< 7411*67e74705SXin Li "'continue' statement not in loop statement">; 7412*67e74705SXin Lidef err_break_not_in_loop_or_switch : Error< 7413*67e74705SXin Li "'break' statement not in loop or switch statement">; 7414*67e74705SXin Lidef warn_loop_ctrl_binds_to_inner : Warning< 7415*67e74705SXin Li "'%0' is bound to current loop, GCC binds it to the enclosing loop">, 7416*67e74705SXin Li InGroup<GccCompat>; 7417*67e74705SXin Lidef warn_break_binds_to_switch : Warning< 7418*67e74705SXin Li "'break' is bound to loop, GCC binds it to switch">, 7419*67e74705SXin Li InGroup<GccCompat>; 7420*67e74705SXin Lidef err_default_not_in_switch : Error< 7421*67e74705SXin Li "'default' statement not in switch statement">; 7422*67e74705SXin Lidef err_case_not_in_switch : Error<"'case' statement not in switch statement">; 7423*67e74705SXin Lidef warn_bool_switch_condition : Warning< 7424*67e74705SXin Li "switch condition has boolean value">, InGroup<SwitchBool>; 7425*67e74705SXin Lidef warn_case_value_overflow : Warning< 7426*67e74705SXin Li "overflow converting case value to switch condition type (%0 to %1)">, 7427*67e74705SXin Li InGroup<Switch>; 7428*67e74705SXin Lidef err_duplicate_case : Error<"duplicate case value '%0'">; 7429*67e74705SXin Lidef err_duplicate_case_differing_expr : Error< 7430*67e74705SXin Li "duplicate case value: '%0' and '%1' both equal '%2'">; 7431*67e74705SXin Lidef warn_case_empty_range : Warning<"empty case range specified">; 7432*67e74705SXin Lidef warn_missing_case_for_condition : 7433*67e74705SXin Li Warning<"no case matching constant switch condition '%0'">; 7434*67e74705SXin Li 7435*67e74705SXin Lidef warn_def_missing_case : Warning<"%plural{" 7436*67e74705SXin Li "1:enumeration value %1 not explicitly handled in switch|" 7437*67e74705SXin Li "2:enumeration values %1 and %2 not explicitly handled in switch|" 7438*67e74705SXin Li "3:enumeration values %1, %2, and %3 not explicitly handled in switch|" 7439*67e74705SXin Li ":%0 enumeration values not explicitly handled in switch: %1, %2, %3...}0">, 7440*67e74705SXin Li InGroup<SwitchEnum>, DefaultIgnore; 7441*67e74705SXin Li 7442*67e74705SXin Lidef warn_missing_case : Warning<"%plural{" 7443*67e74705SXin Li "1:enumeration value %1 not handled in switch|" 7444*67e74705SXin Li "2:enumeration values %1 and %2 not handled in switch|" 7445*67e74705SXin Li "3:enumeration values %1, %2, and %3 not handled in switch|" 7446*67e74705SXin Li ":%0 enumeration values not handled in switch: %1, %2, %3...}0">, 7447*67e74705SXin Li InGroup<Switch>; 7448*67e74705SXin Li 7449*67e74705SXin Lidef warn_unannotated_fallthrough : Warning< 7450*67e74705SXin Li "unannotated fall-through between switch labels">, 7451*67e74705SXin Li InGroup<ImplicitFallthrough>, DefaultIgnore; 7452*67e74705SXin Lidef warn_unannotated_fallthrough_per_function : Warning< 7453*67e74705SXin Li "unannotated fall-through between switch labels in partly-annotated " 7454*67e74705SXin Li "function">, InGroup<ImplicitFallthroughPerFunction>, DefaultIgnore; 7455*67e74705SXin Lidef note_insert_fallthrough_fixit : Note< 7456*67e74705SXin Li "insert '%0;' to silence this warning">; 7457*67e74705SXin Lidef note_insert_break_fixit : Note< 7458*67e74705SXin Li "insert 'break;' to avoid fall-through">; 7459*67e74705SXin Lidef err_fallthrough_attr_wrong_target : Error< 7460*67e74705SXin Li "%0 attribute is only allowed on empty statements">; 7461*67e74705SXin Lidef note_fallthrough_insert_semi_fixit : Note<"did you forget ';'?">; 7462*67e74705SXin Lidef err_fallthrough_attr_outside_switch : Error< 7463*67e74705SXin Li "fallthrough annotation is outside switch statement">; 7464*67e74705SXin Lidef err_fallthrough_attr_invalid_placement : Error< 7465*67e74705SXin Li "fallthrough annotation does not directly precede switch label">; 7466*67e74705SXin Lidef warn_fallthrough_attr_unreachable : Warning< 7467*67e74705SXin Li "fallthrough annotation in unreachable code">, 7468*67e74705SXin Li InGroup<ImplicitFallthrough>, DefaultIgnore; 7469*67e74705SXin Li 7470*67e74705SXin Lidef warn_unreachable_default : Warning< 7471*67e74705SXin Li "default label in switch which covers all enumeration values">, 7472*67e74705SXin Li InGroup<CoveredSwitchDefault>, DefaultIgnore; 7473*67e74705SXin Lidef warn_not_in_enum : Warning<"case value not in enumerated type %0">, 7474*67e74705SXin Li InGroup<Switch>; 7475*67e74705SXin Lidef warn_not_in_enum_assignment : Warning<"integer constant not in range " 7476*67e74705SXin Li "of enumerated type %0">, InGroup<DiagGroup<"assign-enum">>, DefaultIgnore; 7477*67e74705SXin Lidef err_typecheck_statement_requires_scalar : Error< 7478*67e74705SXin Li "statement requires expression of scalar type (%0 invalid)">; 7479*67e74705SXin Lidef err_typecheck_statement_requires_integer : Error< 7480*67e74705SXin Li "statement requires expression of integer type (%0 invalid)">; 7481*67e74705SXin Lidef err_multiple_default_labels_defined : Error< 7482*67e74705SXin Li "multiple default labels in one switch">; 7483*67e74705SXin Lidef err_switch_multiple_conversions : Error< 7484*67e74705SXin Li "multiple conversions from switch condition type %0 to an integral or " 7485*67e74705SXin Li "enumeration type">; 7486*67e74705SXin Lidef note_switch_conversion : Note< 7487*67e74705SXin Li "conversion to %select{integral|enumeration}0 type %1">; 7488*67e74705SXin Lidef err_switch_explicit_conversion : Error< 7489*67e74705SXin Li "switch condition type %0 requires explicit conversion to %1">; 7490*67e74705SXin Lidef err_switch_incomplete_class_type : Error< 7491*67e74705SXin Li "switch condition has incomplete class type %0">; 7492*67e74705SXin Li 7493*67e74705SXin Lidef warn_empty_if_body : Warning< 7494*67e74705SXin Li "if statement has empty body">, InGroup<EmptyBody>; 7495*67e74705SXin Lidef warn_empty_for_body : Warning< 7496*67e74705SXin Li "for loop has empty body">, InGroup<EmptyBody>; 7497*67e74705SXin Lidef warn_empty_range_based_for_body : Warning< 7498*67e74705SXin Li "range-based for loop has empty body">, InGroup<EmptyBody>; 7499*67e74705SXin Lidef warn_empty_while_body : Warning< 7500*67e74705SXin Li "while loop has empty body">, InGroup<EmptyBody>; 7501*67e74705SXin Lidef warn_empty_switch_body : Warning< 7502*67e74705SXin Li "switch statement has empty body">, InGroup<EmptyBody>; 7503*67e74705SXin Lidef note_empty_body_on_separate_line : Note< 7504*67e74705SXin Li "put the semicolon on a separate line to silence this warning">; 7505*67e74705SXin Li 7506*67e74705SXin Lidef err_va_start_used_in_non_variadic_function : Error< 7507*67e74705SXin Li "'va_start' used in function with fixed args">; 7508*67e74705SXin Lidef err_va_start_used_in_wrong_abi_function : Error< 7509*67e74705SXin Li "'va_start' used in %select{System V|Win64}0 ABI function">; 7510*67e74705SXin Lidef err_ms_va_start_used_in_sysv_function : Error< 7511*67e74705SXin Li "'__builtin_ms_va_start' used in System V ABI function">; 7512*67e74705SXin Lidef warn_second_arg_of_va_start_not_last_named_param : Warning< 7513*67e74705SXin Li "second argument to 'va_start' is not the last named parameter">, 7514*67e74705SXin Li InGroup<Varargs>; 7515*67e74705SXin Lidef warn_va_start_type_is_undefined : Warning< 7516*67e74705SXin Li "passing %select{an object that undergoes default argument promotion|" 7517*67e74705SXin Li "an object of reference type|a parameter declared with the 'register' " 7518*67e74705SXin Li "keyword}0 to 'va_start' has undefined behavior">, InGroup<Varargs>; 7519*67e74705SXin Lidef err_first_argument_to_va_arg_not_of_type_va_list : Error< 7520*67e74705SXin Li "first argument to 'va_arg' is of type %0 and not 'va_list'">; 7521*67e74705SXin Lidef err_second_parameter_to_va_arg_incomplete: Error< 7522*67e74705SXin Li "second argument to 'va_arg' is of incomplete type %0">; 7523*67e74705SXin Lidef err_second_parameter_to_va_arg_abstract: Error< 7524*67e74705SXin Li "second argument to 'va_arg' is of abstract type %0">; 7525*67e74705SXin Lidef warn_second_parameter_to_va_arg_not_pod : Warning< 7526*67e74705SXin Li "second argument to 'va_arg' is of non-POD type %0">, 7527*67e74705SXin Li InGroup<NonPODVarargs>, DefaultError; 7528*67e74705SXin Lidef warn_second_parameter_to_va_arg_ownership_qualified : Warning< 7529*67e74705SXin Li "second argument to 'va_arg' is of ARC ownership-qualified type %0">, 7530*67e74705SXin Li InGroup<NonPODVarargs>, DefaultError; 7531*67e74705SXin Lidef warn_second_parameter_to_va_arg_never_compatible : Warning< 7532*67e74705SXin Li "second argument to 'va_arg' is of promotable type %0; this va_arg has " 7533*67e74705SXin Li "undefined behavior because arguments will be promoted to %1">, InGroup<Varargs>; 7534*67e74705SXin Li 7535*67e74705SXin Lidef warn_return_missing_expr : Warning< 7536*67e74705SXin Li "non-void %select{function|method}1 %0 should return a value">, DefaultError, 7537*67e74705SXin Li InGroup<ReturnType>; 7538*67e74705SXin Lidef ext_return_missing_expr : ExtWarn< 7539*67e74705SXin Li "non-void %select{function|method}1 %0 should return a value">, DefaultError, 7540*67e74705SXin Li InGroup<ReturnType>; 7541*67e74705SXin Lidef ext_return_has_expr : ExtWarn< 7542*67e74705SXin Li "%select{void function|void method|constructor|destructor}1 %0 " 7543*67e74705SXin Li "should not return a value">, 7544*67e74705SXin Li DefaultError, InGroup<ReturnType>; 7545*67e74705SXin Lidef ext_return_has_void_expr : Extension< 7546*67e74705SXin Li "void %select{function|method|block}1 %0 should not return void expression">; 7547*67e74705SXin Lidef err_return_init_list : Error< 7548*67e74705SXin Li "%select{void function|void method|constructor|destructor}1 %0 " 7549*67e74705SXin Li "must not return a value">; 7550*67e74705SXin Lidef err_ctor_dtor_returns_void : Error< 7551*67e74705SXin Li "%select{constructor|destructor}1 %0 must not return void expression">; 7552*67e74705SXin Lidef warn_noreturn_function_has_return_expr : Warning< 7553*67e74705SXin Li "function %0 declared 'noreturn' should not return">, 7554*67e74705SXin Li InGroup<InvalidNoreturn>; 7555*67e74705SXin Lidef warn_falloff_noreturn_function : Warning< 7556*67e74705SXin Li "function declared 'noreturn' should not return">, 7557*67e74705SXin Li InGroup<InvalidNoreturn>; 7558*67e74705SXin Lidef err_noreturn_block_has_return_expr : Error< 7559*67e74705SXin Li "block declared 'noreturn' should not return">; 7560*67e74705SXin Lidef err_noreturn_missing_on_first_decl : Error< 7561*67e74705SXin Li "function declared '[[noreturn]]' after its first declaration">; 7562*67e74705SXin Lidef note_noreturn_missing_first_decl : Note< 7563*67e74705SXin Li "declaration missing '[[noreturn]]' attribute is here">; 7564*67e74705SXin Lidef err_carries_dependency_missing_on_first_decl : Error< 7565*67e74705SXin Li "%select{function|parameter}0 declared '[[carries_dependency]]' " 7566*67e74705SXin Li "after its first declaration">; 7567*67e74705SXin Lidef note_carries_dependency_missing_first_decl : Note< 7568*67e74705SXin Li "declaration missing '[[carries_dependency]]' attribute is here">; 7569*67e74705SXin Lidef err_carries_dependency_param_not_function_decl : Error< 7570*67e74705SXin Li "'[[carries_dependency]]' attribute only allowed on parameter in a function " 7571*67e74705SXin Li "declaration or lambda">; 7572*67e74705SXin Lidef err_block_on_nonlocal : Error< 7573*67e74705SXin Li "__block attribute not allowed, only allowed on local variables">; 7574*67e74705SXin Lidef err_block_on_vm : Error< 7575*67e74705SXin Li "__block attribute not allowed on declaration with a variably modified type">; 7576*67e74705SXin Li 7577*67e74705SXin Lidef err_shufflevector_non_vector : Error< 7578*67e74705SXin Li "first two arguments to __builtin_shufflevector must be vectors">; 7579*67e74705SXin Lidef err_shufflevector_incompatible_vector : Error< 7580*67e74705SXin Li "first two arguments to __builtin_shufflevector must have the same type">; 7581*67e74705SXin Lidef err_shufflevector_nonconstant_argument : Error< 7582*67e74705SXin Li "index for __builtin_shufflevector must be a constant integer">; 7583*67e74705SXin Lidef err_shufflevector_argument_too_large : Error< 7584*67e74705SXin Li "index for __builtin_shufflevector must be less than the total number " 7585*67e74705SXin Li "of vector elements">; 7586*67e74705SXin Li 7587*67e74705SXin Lidef err_convertvector_non_vector : Error< 7588*67e74705SXin Li "first argument to __builtin_convertvector must be a vector">; 7589*67e74705SXin Lidef err_convertvector_non_vector_type : Error< 7590*67e74705SXin Li "second argument to __builtin_convertvector must be a vector type">; 7591*67e74705SXin Lidef err_convertvector_incompatible_vector : Error< 7592*67e74705SXin Li "first two arguments to __builtin_convertvector must have the same number of elements">; 7593*67e74705SXin Li 7594*67e74705SXin Lidef err_first_argument_to_cwsc_not_call : Error< 7595*67e74705SXin Li "first argument to __builtin_call_with_static_chain must be a non-member call expression">; 7596*67e74705SXin Lidef err_first_argument_to_cwsc_block_call : Error< 7597*67e74705SXin Li "first argument to __builtin_call_with_static_chain must not be a block call">; 7598*67e74705SXin Lidef err_first_argument_to_cwsc_builtin_call : Error< 7599*67e74705SXin Li "first argument to __builtin_call_with_static_chain must not be a builtin call">; 7600*67e74705SXin Lidef err_first_argument_to_cwsc_pdtor_call : Error< 7601*67e74705SXin Li "first argument to __builtin_call_with_static_chain must not be a pseudo-destructor call">; 7602*67e74705SXin Lidef err_second_argument_to_cwsc_not_pointer : Error< 7603*67e74705SXin Li "second argument to __builtin_call_with_static_chain must be of pointer type">; 7604*67e74705SXin Li 7605*67e74705SXin Lidef err_vector_incorrect_num_initializers : Error< 7606*67e74705SXin Li "%select{too many|too few}0 elements in vector initialization (expected %1 elements, have %2)">; 7607*67e74705SXin Lidef err_altivec_empty_initializer : Error<"expected initializer">; 7608*67e74705SXin Li 7609*67e74705SXin Lidef err_invalid_neon_type_code : Error< 7610*67e74705SXin Li "incompatible constant for this __builtin_neon function">; 7611*67e74705SXin Lidef err_argument_invalid_range : Error< 7612*67e74705SXin Li "argument should be a value from %0 to %1">; 7613*67e74705SXin Lidef warn_neon_vector_initializer_non_portable : Warning< 7614*67e74705SXin Li "vector initializers are not compatible with NEON intrinsics in big endian " 7615*67e74705SXin Li "mode">, InGroup<DiagGroup<"nonportable-vector-initialization">>; 7616*67e74705SXin Lidef note_neon_vector_initializer_non_portable : Note< 7617*67e74705SXin Li "consider using vld1_%0%1() to initialize a vector from memory, or " 7618*67e74705SXin Li "vcreate_%0%1() to initialize from an integer constant">; 7619*67e74705SXin Lidef note_neon_vector_initializer_non_portable_q : Note< 7620*67e74705SXin Li "consider using vld1q_%0%1() to initialize a vector from memory, or " 7621*67e74705SXin Li "vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer " 7622*67e74705SXin Li "constants">; 7623*67e74705SXin Lidef err_systemz_invalid_tabort_code : Error< 7624*67e74705SXin Li "invalid transaction abort code">; 7625*67e74705SXin Lidef err_64_bit_builtin_32_bit_tgt : Error< 7626*67e74705SXin Li "this builtin is only available on 64-bit targets">; 7627*67e74705SXin Lidef err_ppc_builtin_only_on_pwr7 : Error< 7628*67e74705SXin Li "this builtin is only valid on POWER7 or later CPUs">; 7629*67e74705SXin Lidef err_x86_builtin_32_bit_tgt : Error< 7630*67e74705SXin Li "this builtin is only available on x86-64 targets">; 7631*67e74705SXin Li 7632*67e74705SXin Lidef err_builtin_longjmp_unsupported : Error< 7633*67e74705SXin Li "__builtin_longjmp is not supported for the current target">; 7634*67e74705SXin Lidef err_builtin_setjmp_unsupported : Error< 7635*67e74705SXin Li "__builtin_setjmp is not supported for the current target">; 7636*67e74705SXin Li 7637*67e74705SXin Lidef err_builtin_longjmp_invalid_val : Error< 7638*67e74705SXin Li "argument to __builtin_longjmp must be a constant 1">; 7639*67e74705SXin Lidef err_builtin_requires_language : Error<"'%0' is only available in %1">; 7640*67e74705SXin Li 7641*67e74705SXin Lidef err_constant_integer_arg_type : Error< 7642*67e74705SXin Li "argument to %0 must be a constant integer">; 7643*67e74705SXin Li 7644*67e74705SXin Lidef ext_mixed_decls_code : Extension< 7645*67e74705SXin Li "ISO C90 forbids mixing declarations and code">, 7646*67e74705SXin Li InGroup<DiagGroup<"declaration-after-statement">>; 7647*67e74705SXin Li 7648*67e74705SXin Lidef err_non_local_variable_decl_in_for : Error< 7649*67e74705SXin Li "declaration of non-local variable in 'for' loop">; 7650*67e74705SXin Lidef err_non_variable_decl_in_for : Error< 7651*67e74705SXin Li "non-variable declaration in 'for' loop">; 7652*67e74705SXin Lidef err_toomany_element_decls : Error< 7653*67e74705SXin Li "only one element declaration is allowed">; 7654*67e74705SXin Lidef err_selector_element_not_lvalue : Error< 7655*67e74705SXin Li "selector element is not a valid lvalue">; 7656*67e74705SXin Lidef err_selector_element_type : Error< 7657*67e74705SXin Li "selector element type %0 is not a valid object">; 7658*67e74705SXin Lidef err_selector_element_const_type : Error< 7659*67e74705SXin Li "selector element of type %0 cannot be a constant l-value expression">; 7660*67e74705SXin Lidef err_collection_expr_type : Error< 7661*67e74705SXin Li "the type %0 is not a pointer to a fast-enumerable object">; 7662*67e74705SXin Lidef warn_collection_expr_type : Warning< 7663*67e74705SXin Li "collection expression type %0 may not respond to %1">; 7664*67e74705SXin Li 7665*67e74705SXin Lidef err_invalid_conversion_between_ext_vectors : Error< 7666*67e74705SXin Li "invalid conversion between ext-vector type %0 and %1">; 7667*67e74705SXin Li 7668*67e74705SXin Lidef warn_duplicate_attribute_exact : Warning< 7669*67e74705SXin Li "attribute %0 is already applied">, InGroup<IgnoredAttributes>; 7670*67e74705SXin Li 7671*67e74705SXin Lidef warn_duplicate_attribute : Warning< 7672*67e74705SXin Li "attribute %0 is already applied with different parameters">, 7673*67e74705SXin Li InGroup<IgnoredAttributes>; 7674*67e74705SXin Li 7675*67e74705SXin Lidef warn_sync_fetch_and_nand_semantics_change : Warning< 7676*67e74705SXin Li "the semantics of this intrinsic changed with GCC " 7677*67e74705SXin Li "version 4.4 - the newer semantics are provided here">, 7678*67e74705SXin Li InGroup<DiagGroup<"sync-fetch-and-nand-semantics-changed">>; 7679*67e74705SXin Li 7680*67e74705SXin Li// Type 7681*67e74705SXin Lidef ext_invalid_sign_spec : Extension<"'%0' cannot be signed or unsigned">; 7682*67e74705SXin Lidef warn_receiver_forward_class : Warning< 7683*67e74705SXin Li "receiver %0 is a forward class and corresponding @interface may not exist">, 7684*67e74705SXin Li InGroup<ForwardClassReceiver>; 7685*67e74705SXin Lidef note_method_sent_forward_class : Note<"method %0 is used for the forward class">; 7686*67e74705SXin Lidef ext_missing_declspec : ExtWarn< 7687*67e74705SXin Li "declaration specifier missing, defaulting to 'int'">; 7688*67e74705SXin Lidef ext_missing_type_specifier : ExtWarn< 7689*67e74705SXin Li "type specifier missing, defaults to 'int'">, 7690*67e74705SXin Li InGroup<ImplicitInt>; 7691*67e74705SXin Lidef err_decimal_unsupported : Error< 7692*67e74705SXin Li "GNU decimal type extension not supported">; 7693*67e74705SXin Lidef err_missing_type_specifier : Error< 7694*67e74705SXin Li "C++ requires a type specifier for all declarations">; 7695*67e74705SXin Lidef err_objc_array_of_interfaces : Error< 7696*67e74705SXin Li "array of interface %0 is invalid (probably should be an array of pointers)">; 7697*67e74705SXin Lidef ext_c99_array_usage : Extension< 7698*67e74705SXin Li "%select{qualifier in |static |}0array size %select{||'[*] '}0is a C99 " 7699*67e74705SXin Li "feature">, InGroup<C99>; 7700*67e74705SXin Lidef err_c99_array_usage_cxx : Error< 7701*67e74705SXin Li "%select{qualifier in |static |}0array size %select{||'[*] '}0is a C99 " 7702*67e74705SXin Li "feature, not permitted in C++">; 7703*67e74705SXin Li def err_type_requires_extension : Error< 7704*67e74705SXin Li "use of type %0 requires %1 extension to be enabled">; 7705*67e74705SXin Lidef err_type_unsupported : Error< 7706*67e74705SXin Li "%0 is not supported on this target">; 7707*67e74705SXin Lidef err_nsconsumed_attribute_mismatch : Error< 7708*67e74705SXin Li "overriding method has mismatched ns_consumed attribute on its" 7709*67e74705SXin Li " parameter">; 7710*67e74705SXin Lidef err_nsreturns_retained_attribute_mismatch : Error< 7711*67e74705SXin Li "overriding method has mismatched ns_returns_%select{not_retained|retained}0" 7712*67e74705SXin Li " attributes">; 7713*67e74705SXin Li 7714*67e74705SXin Lidef note_getter_unavailable : Note< 7715*67e74705SXin Li "or because setter is declared here, but no getter method %0 is found">; 7716*67e74705SXin Lidef err_invalid_protocol_qualifiers : Error< 7717*67e74705SXin Li "invalid protocol qualifiers on non-ObjC type">; 7718*67e74705SXin Lidef warn_ivar_use_hidden : Warning< 7719*67e74705SXin Li "local declaration of %0 hides instance variable">, 7720*67e74705SXin Li InGroup<DiagGroup<"shadow-ivar">>; 7721*67e74705SXin Lidef warn_direct_initialize_call : Warning< 7722*67e74705SXin Li "explicit call to +initialize results in duplicate call to +initialize">, 7723*67e74705SXin Li InGroup<ExplicitInitializeCall>; 7724*67e74705SXin Lidef warn_direct_super_initialize_call : Warning< 7725*67e74705SXin Li "explicit call to [super initialize] should only be in implementation " 7726*67e74705SXin Li "of +initialize">, 7727*67e74705SXin Li InGroup<ExplicitInitializeCall>; 7728*67e74705SXin Lidef error_ivar_use_in_class_method : Error< 7729*67e74705SXin Li "instance variable %0 accessed in class method">; 7730*67e74705SXin Lidef error_implicit_ivar_access : Error< 7731*67e74705SXin Li "instance variable %0 cannot be accessed because 'self' has been redeclared">; 7732*67e74705SXin Lidef error_private_ivar_access : Error<"instance variable %0 is private">, 7733*67e74705SXin Li AccessControl; 7734*67e74705SXin Lidef error_protected_ivar_access : Error<"instance variable %0 is protected">, 7735*67e74705SXin Li AccessControl; 7736*67e74705SXin Lidef warn_maynot_respond : Warning<"%0 may not respond to %1">; 7737*67e74705SXin Lidef ext_typecheck_base_super : Warning< 7738*67e74705SXin Li "method parameter type " 7739*67e74705SXin Li "%diff{$ does not match super class method parameter type $|" 7740*67e74705SXin Li "does not match super class method parameter type}0,1">, 7741*67e74705SXin Li InGroup<SuperSubClassMismatch>, DefaultIgnore; 7742*67e74705SXin Lidef warn_missing_method_return_type : Warning< 7743*67e74705SXin Li "method has no return type specified; defaults to 'id'">, 7744*67e74705SXin Li InGroup<MissingMethodReturnType>, DefaultIgnore; 7745*67e74705SXin Lidef warn_direct_ivar_access : Warning<"instance variable %0 is being " 7746*67e74705SXin Li "directly accessed">, InGroup<DiagGroup<"direct-ivar-access">>, DefaultIgnore; 7747*67e74705SXin Li 7748*67e74705SXin Li// Spell-checking diagnostics 7749*67e74705SXin Lidef err_unknown_typename : Error< 7750*67e74705SXin Li "unknown type name %0">; 7751*67e74705SXin Lidef err_unknown_type_or_class_name_suggest : Error< 7752*67e74705SXin Li "unknown %select{type|class}1 name %0; did you mean %2?">; 7753*67e74705SXin Lidef err_unknown_typename_suggest : Error< 7754*67e74705SXin Li "unknown type name %0; did you mean %1?">; 7755*67e74705SXin Lidef err_unknown_nested_typename_suggest : Error< 7756*67e74705SXin Li "no type named %0 in %1; did you mean %select{|simply }2%3?">; 7757*67e74705SXin Lidef err_no_member_suggest : Error<"no member named %0 in %1; did you mean %select{|simply }2%3?">; 7758*67e74705SXin Lidef err_undeclared_use_suggest : Error< 7759*67e74705SXin Li "use of undeclared %0; did you mean %1?">; 7760*67e74705SXin Lidef err_undeclared_var_use_suggest : Error< 7761*67e74705SXin Li "use of undeclared identifier %0; did you mean %1?">; 7762*67e74705SXin Lidef err_no_template_suggest : Error<"no template named %0; did you mean %1?">; 7763*67e74705SXin Lidef err_no_member_template_suggest : Error< 7764*67e74705SXin Li "no template named %0 in %1; did you mean %select{|simply }2%3?">; 7765*67e74705SXin Lidef err_mem_init_not_member_or_class_suggest : Error< 7766*67e74705SXin Li "initializer %0 does not name a non-static data member or base " 7767*67e74705SXin Li "class; did you mean the %select{base class|member}1 %2?">; 7768*67e74705SXin Lidef err_field_designator_unknown_suggest : Error< 7769*67e74705SXin Li "field designator %0 does not refer to any field in type %1; did you mean " 7770*67e74705SXin Li "%2?">; 7771*67e74705SXin Lidef err_typecheck_member_reference_ivar_suggest : Error< 7772*67e74705SXin Li "%0 does not have a member named %1; did you mean %2?">; 7773*67e74705SXin Lidef err_property_not_found_suggest : Error< 7774*67e74705SXin Li "property %0 not found on object of type %1; did you mean %2?">; 7775*67e74705SXin Lidef err_class_property_found : Error< 7776*67e74705SXin Li "property %0 is a class property; did you mean to access it with class '%1'?">; 7777*67e74705SXin Lidef err_ivar_access_using_property_syntax_suggest : Error< 7778*67e74705SXin Li "property %0 not found on object of type %1; did you mean to access instance variable %2?">; 7779*67e74705SXin Lidef warn_property_access_suggest : Warning< 7780*67e74705SXin Li"property %0 not found on object of type %1; did you mean to access property %2?">, 7781*67e74705SXin LiInGroup<PropertyAccessDotSyntax>; 7782*67e74705SXin Lidef err_property_found_suggest : Error< 7783*67e74705SXin Li "property %0 found on object of type %1; did you mean to access " 7784*67e74705SXin Li "it with the \".\" operator?">; 7785*67e74705SXin Lidef err_undef_interface_suggest : Error< 7786*67e74705SXin Li "cannot find interface declaration for %0; did you mean %1?">; 7787*67e74705SXin Lidef warn_undef_interface_suggest : Warning< 7788*67e74705SXin Li "cannot find interface declaration for %0; did you mean %1?">; 7789*67e74705SXin Lidef err_undef_superclass_suggest : Error< 7790*67e74705SXin Li "cannot find interface declaration for %0, superclass of %1; did you mean " 7791*67e74705SXin Li "%2?">; 7792*67e74705SXin Lidef err_undeclared_protocol_suggest : Error< 7793*67e74705SXin Li "cannot find protocol declaration for %0; did you mean %1?">; 7794*67e74705SXin Lidef note_base_class_specified_here : Note< 7795*67e74705SXin Li "base class %0 specified here">; 7796*67e74705SXin Lidef err_using_directive_suggest : Error< 7797*67e74705SXin Li "no namespace named %0; did you mean %1?">; 7798*67e74705SXin Lidef err_using_directive_member_suggest : Error< 7799*67e74705SXin Li "no namespace named %0 in %1; did you mean %select{|simply }2%3?">; 7800*67e74705SXin Lidef note_namespace_defined_here : Note<"namespace %0 defined here">; 7801*67e74705SXin Lidef err_sizeof_pack_no_pack_name_suggest : Error< 7802*67e74705SXin Li "%0 does not refer to the name of a parameter pack; did you mean %1?">; 7803*67e74705SXin Lidef note_parameter_pack_here : Note<"parameter pack %0 declared here">; 7804*67e74705SXin Li 7805*67e74705SXin Lidef err_uncasted_use_of_unknown_any : Error< 7806*67e74705SXin Li "%0 has unknown type; cast it to its declared type to use it">; 7807*67e74705SXin Lidef err_uncasted_call_of_unknown_any : Error< 7808*67e74705SXin Li "%0 has unknown return type; cast the call to its declared return type">; 7809*67e74705SXin Lidef err_uncasted_send_to_unknown_any_method : Error< 7810*67e74705SXin Li "no known method %select{%objcinstance1|%objcclass1}0; cast the " 7811*67e74705SXin Li "message send to the method's return type">; 7812*67e74705SXin Lidef err_unsupported_unknown_any_decl : Error< 7813*67e74705SXin Li "%0 has unknown type, which is not supported for this kind of declaration">; 7814*67e74705SXin Lidef err_unsupported_unknown_any_expr : Error< 7815*67e74705SXin Li "unsupported expression with unknown type">; 7816*67e74705SXin Lidef err_unsupported_unknown_any_call : Error< 7817*67e74705SXin Li "call to unsupported expression with unknown type">; 7818*67e74705SXin Lidef err_unknown_any_addrof : Error< 7819*67e74705SXin Li "the address of a declaration with unknown type " 7820*67e74705SXin Li "can only be cast to a pointer type">; 7821*67e74705SXin Lidef err_unknown_any_var_function_type : Error< 7822*67e74705SXin Li "variable %0 with unknown type cannot be given a function type">; 7823*67e74705SXin Lidef err_unknown_any_function : Error< 7824*67e74705SXin Li "function %0 with unknown type must be given a function type">; 7825*67e74705SXin Li 7826*67e74705SXin Lidef err_filter_expression_integral : Error< 7827*67e74705SXin Li "filter expression type should be an integral value not %0">; 7828*67e74705SXin Li 7829*67e74705SXin Lidef err_non_asm_stmt_in_naked_function : Error< 7830*67e74705SXin Li "non-ASM statement in naked function is not supported">; 7831*67e74705SXin Lidef err_asm_naked_this_ref : Error< 7832*67e74705SXin Li "'this' pointer references not allowed in naked functions">; 7833*67e74705SXin Lidef err_asm_naked_parm_ref : Error< 7834*67e74705SXin Li "parameter references not allowed in naked functions">; 7835*67e74705SXin Li 7836*67e74705SXin Li// OpenCL warnings and errors. 7837*67e74705SXin Lidef err_invalid_astype_of_different_size : Error< 7838*67e74705SXin Li "invalid reinterpretation: sizes of %0 and %1 must match">; 7839*67e74705SXin Lidef err_static_kernel : Error< 7840*67e74705SXin Li "kernel functions cannot be declared static">; 7841*67e74705SXin Lidef err_opencl_ptrptr_kernel_param : Error< 7842*67e74705SXin Li "kernel parameter cannot be declared as a pointer to a pointer">; 7843*67e74705SXin Lidef err_opencl_private_ptr_kernel_param : Error< 7844*67e74705SXin Li "kernel parameter cannot be declared as a pointer to the __private address space">; 7845*67e74705SXin Lidef err_opencl_function_variable : Error< 7846*67e74705SXin Li "%select{non-kernel function|function scope}0 variable cannot be declared in %1 address space">; 7847*67e74705SXin Lidef err_static_function_scope : Error< 7848*67e74705SXin Li "variables in function scope cannot be declared static">; 7849*67e74705SXin Lidef err_opencl_bitfields : Error< 7850*67e74705SXin Li "bitfields are not supported in OpenCL">; 7851*67e74705SXin Lidef err_opencl_vla : Error< 7852*67e74705SXin Li "variable length arrays are not supported in OpenCL">; 7853*67e74705SXin Lidef err_bad_kernel_param_type : Error< 7854*67e74705SXin Li "%0 cannot be used as the type of a kernel parameter">; 7855*67e74705SXin Lidef err_record_with_pointers_kernel_param : Error< 7856*67e74705SXin Li "%select{struct|union}0 kernel parameters may not contain pointers">; 7857*67e74705SXin Lidef note_within_field_of_type : Note< 7858*67e74705SXin Li "within field of type %0 declared here">; 7859*67e74705SXin Lidef note_illegal_field_declared_here : Note< 7860*67e74705SXin Li "field of illegal %select{type|pointer type}0 %1 declared here">; 7861*67e74705SXin Lidef err_event_t_global_var : Error< 7862*67e74705SXin Li "the event_t type cannot be used to declare a program scope variable">; 7863*67e74705SXin Lidef err_opencl_type_struct_or_union_field : Error< 7864*67e74705SXin Li "the %0 type cannot be used to declare a structure or union field">; 7865*67e74705SXin Lidef err_event_t_addr_space_qual : Error< 7866*67e74705SXin Li "the event_t type can only be used with __private address space qualifier">; 7867*67e74705SXin Lidef err_expected_kernel_void_return_type : Error< 7868*67e74705SXin Li "kernel must have void return type">; 7869*67e74705SXin Lidef err_sampler_argument_required : Error< 7870*67e74705SXin Li "sampler_t variable required - got %0">; 7871*67e74705SXin Lidef err_wrong_sampler_addressspace: Error< 7872*67e74705SXin Li "sampler type cannot be used with the __local and __global address space qualifiers">; 7873*67e74705SXin Lidef error_opencl_cast_non_zero_to_event_t : Error< 7874*67e74705SXin Li "cannot cast non-zero value '%0' to 'event_t'">; 7875*67e74705SXin Lidef err_opencl_global_invalid_addr_space : Error< 7876*67e74705SXin Li "%select{program scope|static local|extern}0 variable must reside in %1 address space">; 7877*67e74705SXin Lidef err_missing_actual_pipe_type : Error< 7878*67e74705SXin Li "missing actual type specifier for pipe">; 7879*67e74705SXin Lidef err_reference_pipe_type : Error < 7880*67e74705SXin Li "pipes packet types cannot be of reference type">; 7881*67e74705SXin Lidef err_opencl_no_main : Error<"%select{function|kernel}0 cannot be called 'main'">; 7882*67e74705SXin Lidef err_opencl_kernel_attr : 7883*67e74705SXin Li Error<"attribute %0 can only be applied to a kernel function">; 7884*67e74705SXin Lidef err_opencl_return_value_with_address_space : Error< 7885*67e74705SXin Li "return value cannot be qualified with address space">; 7886*67e74705SXin Lidef err_opencl_constant_no_init : Error< 7887*67e74705SXin Li "variable in constant address space must be initialized">; 7888*67e74705SXin Lidef err_atomic_init_constant : Error< 7889*67e74705SXin Li "atomic variable can only be assigned to a compile time constant" 7890*67e74705SXin Li " in the declaration statement in the program scope">; 7891*67e74705SXin Lidef err_opencl_implicit_vector_conversion : Error< 7892*67e74705SXin Li "implicit conversions between vector types (%0 and %1) are not permitted">; 7893*67e74705SXin Lidef err_opencl_block_proto_variadic : Error< 7894*67e74705SXin Li "invalid block prototype, variadic arguments are not allowed in OpenCL">; 7895*67e74705SXin Lidef err_opencl_invalid_type_array : Error< 7896*67e74705SXin Li "array of %0 type is invalid in OpenCL">; 7897*67e74705SXin Lidef err_opencl_ternary_with_block : Error< 7898*67e74705SXin Li "block type cannot be used as expression in ternary expression in OpenCL">; 7899*67e74705SXin Lidef err_opencl_pointer_to_type : Error< 7900*67e74705SXin Li "pointer to type %0 is invalid in OpenCL">; 7901*67e74705SXin Lidef err_opencl_type_can_only_be_used_as_function_parameter : Error < 7902*67e74705SXin Li "type %0 can only be used as a function parameter in OpenCL">; 7903*67e74705SXin Lidef warn_opencl_attr_deprecated_ignored : Warning < 7904*67e74705SXin Li "%0 attribute is deprecated and ignored in OpenCL version %1">, 7905*67e74705SXin Li InGroup<IgnoredAttributes>; 7906*67e74705SXin Li 7907*67e74705SXin Li// OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions 7908*67e74705SXin Lidef err_opencl_builtin_pipe_first_arg : Error< 7909*67e74705SXin Li "first argument to %0 must be a pipe type">; 7910*67e74705SXin Lidef err_opencl_builtin_pipe_arg_num : Error< 7911*67e74705SXin Li "invalid number of arguments to function: %0">; 7912*67e74705SXin Lidef err_opencl_builtin_pipe_invalid_arg : Error< 7913*67e74705SXin Li "invalid argument type to function %0 (expecting %1 having %2)">; 7914*67e74705SXin Lidef err_opencl_builtin_pipe_invalid_access_modifier : Error< 7915*67e74705SXin Li "invalid pipe access modifier (expecting %0)">; 7916*67e74705SXin Li 7917*67e74705SXin Li// OpenCL access qualifier 7918*67e74705SXin Lidef err_opencl_invalid_access_qualifier : Error< 7919*67e74705SXin Li "access qualifier can only be used for pipe and image type">; 7920*67e74705SXin Lidef err_opencl_invalid_read_write : Error< 7921*67e74705SXin Li "access qualifier %0 can not be used for %1 %select{|prior to OpenCL version 2.0}2">; 7922*67e74705SXin Lidef err_opencl_multiple_access_qualifiers : Error< 7923*67e74705SXin Li "multiple access qualifiers">; 7924*67e74705SXin Lidef note_opencl_typedef_access_qualifier : Note< 7925*67e74705SXin Li "previously declared '%0' here">; 7926*67e74705SXin Li 7927*67e74705SXin Li// OpenCL Section 6.8.g 7928*67e74705SXin Lidef err_opencl_unknown_type_specifier : Error< 7929*67e74705SXin Li "OpenCL version %0 does not support the '%1' %select{type qualifier|storage class specifier}2">; 7930*67e74705SXin Li 7931*67e74705SXin Li// OpenCL v2.0 s6.12.5 Blocks restrictions 7932*67e74705SXin Lidef err_opencl_block_storage_type : Error< 7933*67e74705SXin Li "the __block storage type is not permitted">; 7934*67e74705SXin Lidef err_opencl_invalid_block_declaration : Error< 7935*67e74705SXin Li "invalid block variable declaration - must be %select{const qualified|initialized}0">; 7936*67e74705SXin Lidef err_opencl_extern_block_declaration : Error< 7937*67e74705SXin Li "invalid block variable declaration - using 'extern' storage class is disallowed">; 7938*67e74705SXin Li 7939*67e74705SXin Li// OpenCL v2.0 s6.13.9 - Address space qualifier functions. 7940*67e74705SXin Lidef err_opencl_builtin_to_addr_arg_num : Error< 7941*67e74705SXin Li "invalid number of arguments to function: %0">; 7942*67e74705SXin Lidef err_opencl_builtin_to_addr_invalid_arg : Error< 7943*67e74705SXin Li "invalid argument %0 to function: %1, expecting a generic pointer argument">; 7944*67e74705SXin Li 7945*67e74705SXin Li// OpenCL v2.0 s6.13.17 Enqueue kernel restrictions. 7946*67e74705SXin Lidef err_opencl_enqueue_kernel_incorrect_args : Error< 7947*67e74705SXin Li "illegal call to enqueue_kernel, incorrect argument types">; 7948*67e74705SXin Lidef err_opencl_enqueue_kernel_expected_type : Error< 7949*67e74705SXin Li "illegal call to enqueue_kernel, expected %0 argument type">; 7950*67e74705SXin Lidef err_opencl_enqueue_kernel_local_size_args : Error< 7951*67e74705SXin Li "mismatch in number of block parameters and local size arguments passed">; 7952*67e74705SXin Lidef err_opencl_enqueue_kernel_invalid_local_size_type : Error< 7953*67e74705SXin Li "local memory sizes need to be specified as uint">; 7954*67e74705SXin Lidef err_opencl_enqueue_kernel_blocks_non_local_void_args : Error< 7955*67e74705SXin Li "blocks used in device side enqueue are expected to have parameters of type 'local void*'">; 7956*67e74705SXin Lidef err_opencl_enqueue_kernel_blocks_no_args : Error< 7957*67e74705SXin Li "blocks in this form of device side enqueue call are expected to have have no parameters">; 7958*67e74705SXin Li 7959*67e74705SXin Li// OpenCL v2.2 s2.1.2.3 - Vector Component Access 7960*67e74705SXin Lidef ext_opencl_ext_vector_type_rgba_selector: ExtWarn< 7961*67e74705SXin Li "vector component name '%0' is an OpenCL version 2.2 feature">, 7962*67e74705SXin Li InGroup<OpenCLUnsupportedRGBA>; 7963*67e74705SXin Li} // end of sema category 7964*67e74705SXin Li 7965*67e74705SXin Lilet CategoryName = "OpenMP Issue" in { 7966*67e74705SXin Li// OpenMP support. 7967*67e74705SXin Lidef err_omp_expected_var_arg : Error< 7968*67e74705SXin Li "%0 is not a global variable, static local variable or static data member">; 7969*67e74705SXin Lidef err_omp_expected_var_arg_suggest : Error< 7970*67e74705SXin Li "%0 is not a global variable, static local variable or static data member; " 7971*67e74705SXin Li "did you mean %1">; 7972*67e74705SXin Lidef err_omp_global_var_arg : Error< 7973*67e74705SXin Li "arguments of '#pragma omp %0' must have %select{global storage|static storage duration}1">; 7974*67e74705SXin Lidef err_omp_ref_type_arg : Error< 7975*67e74705SXin Li "arguments of '#pragma omp %0' cannot be of reference type %1">; 7976*67e74705SXin Lidef err_omp_region_not_file_context : Error< 7977*67e74705SXin Li "directive must be at file or namespace scope">; 7978*67e74705SXin Lidef err_omp_var_scope : Error< 7979*67e74705SXin Li "'#pragma omp %0' must appear in the scope of the %q1 variable declaration">; 7980*67e74705SXin Lidef err_omp_var_used : Error< 7981*67e74705SXin Li "'#pragma omp %0' must precede all references to variable %q1">; 7982*67e74705SXin Lidef err_omp_var_thread_local : Error< 7983*67e74705SXin Li "variable %0 cannot be threadprivate because it is %select{thread-local|a global named register variable}1">; 7984*67e74705SXin Lidef err_omp_private_incomplete_type : Error< 7985*67e74705SXin Li "a private variable with incomplete type %0">; 7986*67e74705SXin Lidef err_omp_firstprivate_incomplete_type : Error< 7987*67e74705SXin Li "a firstprivate variable with incomplete type %0">; 7988*67e74705SXin Lidef err_omp_lastprivate_incomplete_type : Error< 7989*67e74705SXin Li "a lastprivate variable with incomplete type %0">; 7990*67e74705SXin Lidef err_omp_reduction_incomplete_type : Error< 7991*67e74705SXin Li "a reduction list item with incomplete type %0">; 7992*67e74705SXin Lidef err_omp_unexpected_clause_value : Error< 7993*67e74705SXin Li "expected %0 in OpenMP clause '%1'">; 7994*67e74705SXin Lidef err_omp_expected_var_name_member_expr : Error< 7995*67e74705SXin Li "expected variable name%select{| or data member of current class}0">; 7996*67e74705SXin Lidef err_omp_expected_var_name_member_expr_or_array_item : Error< 7997*67e74705SXin Li "expected variable name%select{|, data member of current class}0, array element or array section">; 7998*67e74705SXin Lidef err_omp_expected_named_var_member_or_array_expression: Error< 7999*67e74705SXin Li "expected expression containing only member accesses and/or array sections based on named variables">; 8000*67e74705SXin Lidef err_omp_bit_fields_forbidden_in_clause : Error< 8001*67e74705SXin Li "bit fields cannot be used to specify storage in a '%0' clause">; 8002*67e74705SXin Lidef err_array_section_does_not_specify_contiguous_storage : Error< 8003*67e74705SXin Li "array section does not specify contiguous storage">; 8004*67e74705SXin Lidef err_omp_union_type_not_allowed : Error< 8005*67e74705SXin Li "mapped storage cannot be derived from a union">; 8006*67e74705SXin Lidef err_omp_expected_access_to_data_field : Error< 8007*67e74705SXin Li "expected access to data field">; 8008*67e74705SXin Lidef err_omp_multiple_array_items_in_map_clause : Error< 8009*67e74705SXin Li "multiple array elements associated with the same variable are not allowed in map clauses of the same construct">; 8010*67e74705SXin Lidef err_omp_pointer_mapped_along_with_derived_section : Error< 8011*67e74705SXin Li "pointer cannot be mapped along with a section derived from itself">; 8012*67e74705SXin Lidef err_omp_original_storage_is_shared_and_does_not_contain : Error< 8013*67e74705SXin Li "original storage of expression in data environment is shared but data environment do not fully contain mapped expression storage">; 8014*67e74705SXin Lidef err_omp_same_pointer_derreferenced : Error< 8015*67e74705SXin Li "same pointer derreferenced in multiple different ways in map clause expressions">; 8016*67e74705SXin Lidef note_omp_task_predetermined_firstprivate_here : Note< 8017*67e74705SXin Li "predetermined as a firstprivate in a task construct here">; 8018*67e74705SXin Lidef err_omp_threadprivate_incomplete_type : Error< 8019*67e74705SXin Li "threadprivate variable with incomplete type %0">; 8020*67e74705SXin Lidef err_omp_no_dsa_for_variable : Error< 8021*67e74705SXin Li "variable %0 must have explicitly specified data sharing attributes">; 8022*67e74705SXin Lidef err_omp_wrong_dsa : Error< 8023*67e74705SXin Li "%0 variable cannot be %1">; 8024*67e74705SXin Lidef err_omp_variably_modified_type_not_supported : Error< 8025*67e74705SXin Li "arguments of OpenMP clause '%0' in '#pragma omp %2' directive cannot be of variably-modified type %1">; 8026*67e74705SXin Lidef note_omp_explicit_dsa : Note< 8027*67e74705SXin Li "defined as %0">; 8028*67e74705SXin Lidef note_omp_predetermined_dsa : Note< 8029*67e74705SXin Li "%select{static data member is predetermined as shared|" 8030*67e74705SXin Li "variable with static storage duration is predetermined as shared|" 8031*67e74705SXin Li "loop iteration variable is predetermined as private|" 8032*67e74705SXin Li "loop iteration variable is predetermined as linear|" 8033*67e74705SXin Li "loop iteration variable is predetermined as lastprivate|" 8034*67e74705SXin Li "constant variable is predetermined as shared|" 8035*67e74705SXin Li "global variable is predetermined as shared|" 8036*67e74705SXin Li "non-shared variable in a task construct is predetermined as firstprivate|" 8037*67e74705SXin Li "variable with automatic storage duration is predetermined as private}0" 8038*67e74705SXin Li "%select{|; perhaps you forget to enclose 'omp %2' directive into a parallel or another task region?}1">; 8039*67e74705SXin Lidef note_omp_implicit_dsa : Note< 8040*67e74705SXin Li "implicitly determined as %0">; 8041*67e74705SXin Lidef err_omp_loop_var_dsa : Error< 8042*67e74705SXin Li "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; 8043*67e74705SXin Lidef err_omp_not_for : Error< 8044*67e74705SXin Li "%select{statement after '#pragma omp %1' must be a for loop|" 8045*67e74705SXin Li "expected %2 for loops after '#pragma omp %1'%select{|, but found only %4}3}0">; 8046*67e74705SXin Lidef note_omp_collapse_ordered_expr : Note< 8047*67e74705SXin Li "as specified in %select{'collapse'|'ordered'|'collapse' and 'ordered'}0 clause%select{||s}0">; 8048*67e74705SXin Lidef err_omp_negative_expression_in_clause : Error< 8049*67e74705SXin Li "argument to '%0' clause must be a %select{non-negative|strictly positive}1 integer value">; 8050*67e74705SXin Lidef err_omp_not_integral : Error< 8051*67e74705SXin Li "expression must have integral or unscoped enumeration " 8052*67e74705SXin Li "type, not %0">; 8053*67e74705SXin Lidef err_omp_threadprivate_in_target : Error< 8054*67e74705SXin Li "threadprivate variables cannot be used in target constructs">; 8055*67e74705SXin Lidef err_omp_incomplete_type : Error< 8056*67e74705SXin Li "expression has incomplete class type %0">; 8057*67e74705SXin Lidef err_omp_explicit_conversion : Error< 8058*67e74705SXin Li "expression requires explicit conversion from %0 to %1">; 8059*67e74705SXin Lidef note_omp_conversion_here : Note< 8060*67e74705SXin Li "conversion to %select{integral|enumeration}0 type %1 declared here">; 8061*67e74705SXin Lidef err_omp_ambiguous_conversion : Error< 8062*67e74705SXin Li "ambiguous conversion from type %0 to an integral or unscoped " 8063*67e74705SXin Li "enumeration type">; 8064*67e74705SXin Lidef err_omp_required_access : Error< 8065*67e74705SXin Li "%0 variable must be %1">; 8066*67e74705SXin Lidef err_omp_const_variable : Error< 8067*67e74705SXin Li "const-qualified variable cannot be %0">; 8068*67e74705SXin Lidef err_omp_const_reduction_list_item : Error< 8069*67e74705SXin Li "const-qualified list item cannot be reduction">; 8070*67e74705SXin Lidef err_omp_linear_incomplete_type : Error< 8071*67e74705SXin Li "a linear variable with incomplete type %0">; 8072*67e74705SXin Lidef err_omp_linear_expected_int_or_ptr : Error< 8073*67e74705SXin Li "argument of a linear clause should be of integral or pointer " 8074*67e74705SXin Li "type, not %0">; 8075*67e74705SXin Lidef warn_omp_linear_step_zero : Warning< 8076*67e74705SXin Li "zero linear step (%0 %select{|and other variables in clause }1should probably be const)">, 8077*67e74705SXin Li InGroup<OpenMPClauses>; 8078*67e74705SXin Lidef warn_omp_alignment_not_power_of_two : Warning< 8079*67e74705SXin Li "aligned clause will be ignored because the requested alignment is not a power of 2">, 8080*67e74705SXin Li InGroup<OpenMPClauses>; 8081*67e74705SXin Lidef err_omp_enclosed_declare_target : Error< 8082*67e74705SXin Li "declare target region may not be enclosed within another declare target region">; 8083*67e74705SXin Lidef err_omp_invalid_target_decl : Error< 8084*67e74705SXin Li "%0 used in declare target directive is not a variable or a function name">; 8085*67e74705SXin Lidef err_omp_declare_target_multiple : Error< 8086*67e74705SXin Li "%0 appears multiple times in clauses on the same declare target directive">; 8087*67e74705SXin Lidef err_omp_declare_target_to_and_link : Error< 8088*67e74705SXin Li "%0 must not appear in both clauses 'to' and 'link'">; 8089*67e74705SXin Lidef warn_omp_not_in_target_context : Warning< 8090*67e74705SXin Li "declaration is not declared in any declare target region">, 8091*67e74705SXin Li InGroup<OpenMPTarget>; 8092*67e74705SXin Lidef err_omp_aligned_expected_array_or_ptr : Error< 8093*67e74705SXin Li "argument of aligned clause should be array" 8094*67e74705SXin Li "%select{ or pointer|, pointer, reference to array or reference to pointer}1" 8095*67e74705SXin Li ", not %0">; 8096*67e74705SXin Lidef err_omp_aligned_twice : Error< 8097*67e74705SXin Li "%select{a variable|a parameter|'this'}0 cannot appear in more than one aligned clause">; 8098*67e74705SXin Lidef err_omp_local_var_in_threadprivate_init : Error< 8099*67e74705SXin Li "variable with local storage in initial value of threadprivate variable">; 8100*67e74705SXin Lidef err_omp_loop_not_canonical_init : Error< 8101*67e74705SXin Li "initialization clause of OpenMP for loop is not in canonical form " 8102*67e74705SXin Li "('var = init' or 'T var = init')">; 8103*67e74705SXin Lidef ext_omp_loop_not_canonical_init : ExtWarn< 8104*67e74705SXin Li "initialization clause of OpenMP for loop is not in canonical form " 8105*67e74705SXin Li "('var = init' or 'T var = init')">, InGroup<OpenMPLoopForm>; 8106*67e74705SXin Lidef err_omp_loop_not_canonical_cond : Error< 8107*67e74705SXin Li "condition of OpenMP for loop must be a relational comparison " 8108*67e74705SXin Li "('<', '<=', '>', or '>=') of loop variable %0">; 8109*67e74705SXin Lidef err_omp_loop_not_canonical_incr : Error< 8110*67e74705SXin Li "increment clause of OpenMP for loop must perform simple addition " 8111*67e74705SXin Li "or subtraction on loop variable %0">; 8112*67e74705SXin Lidef err_omp_loop_variable_type : Error< 8113*67e74705SXin Li "variable must be of integer or %select{pointer|random access iterator}0 type">; 8114*67e74705SXin Lidef err_omp_loop_incr_not_compatible : Error< 8115*67e74705SXin Li "increment expression must cause %0 to %select{decrease|increase}1 " 8116*67e74705SXin Li "on each iteration of OpenMP for loop">; 8117*67e74705SXin Lidef note_omp_loop_cond_requres_compatible_incr : Note< 8118*67e74705SXin Li "loop step is expected to be %select{negative|positive}0 due to this condition">; 8119*67e74705SXin Lidef err_omp_loop_diff_cxx : Error< 8120*67e74705SXin Li "could not calculate number of iterations calling 'operator-' with " 8121*67e74705SXin Li "upper and lower loop bounds">; 8122*67e74705SXin Lidef err_omp_loop_cannot_use_stmt : Error< 8123*67e74705SXin Li "'%0' statement cannot be used in OpenMP for loop">; 8124*67e74705SXin Lidef err_omp_simd_region_cannot_use_stmt : Error< 8125*67e74705SXin Li "'%0' statement cannot be used in OpenMP simd region">; 8126*67e74705SXin Lidef warn_omp_loop_64_bit_var : Warning< 8127*67e74705SXin Li "OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed">, 8128*67e74705SXin Li InGroup<OpenMPLoopForm>; 8129*67e74705SXin Lidef err_omp_unknown_reduction_identifier : Error< 8130*67e74705SXin Li "incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', " 8131*67e74705SXin Li "'&&', '||', 'min' or 'max' or declare reduction for type %0">; 8132*67e74705SXin Lidef err_omp_not_resolved_reduction_identifier : Error< 8133*67e74705SXin Li "unable to resolve declare reduction construct for type %0">; 8134*67e74705SXin Lidef err_omp_reduction_ref_type_arg : Error< 8135*67e74705SXin Li "argument of OpenMP clause 'reduction' must reference the same object in all threads">; 8136*67e74705SXin Lidef err_omp_clause_not_arithmetic_type_arg : Error< 8137*67e74705SXin Li "arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of %select{scalar|arithmetic}0 type">; 8138*67e74705SXin Lidef err_omp_clause_floating_type_arg : Error< 8139*67e74705SXin Li "arguments of OpenMP clause 'reduction' with bitwise operators cannot be of floating type">; 8140*67e74705SXin Lidef err_omp_once_referenced : Error< 8141*67e74705SXin Li "variable can appear only once in OpenMP '%0' clause">; 8142*67e74705SXin Lidef err_omp_once_referenced_in_target_update : Error< 8143*67e74705SXin Li "variable can appear only once in OpenMP 'target update' construct">; 8144*67e74705SXin Lidef note_omp_referenced : Note< 8145*67e74705SXin Li "previously referenced here">; 8146*67e74705SXin Lidef err_omp_reduction_in_task : Error< 8147*67e74705SXin Li "reduction variables may not be accessed in an explicit task">; 8148*67e74705SXin Lidef err_omp_reduction_id_not_compatible : Error< 8149*67e74705SXin Li "list item of type %0 is not valid for specified reduction operation: unable to provide default initialization value">; 8150*67e74705SXin Lidef err_omp_prohibited_region : Error< 8151*67e74705SXin Li "region cannot be%select{| closely}0 nested inside '%1' region" 8152*67e74705SXin Li "%select{|; perhaps you forget to enclose 'omp %3' directive into a parallel region?|" 8153*67e74705SXin Li "; perhaps you forget to enclose 'omp %3' directive into a for or a parallel for region with 'ordered' clause?|" 8154*67e74705SXin Li "; perhaps you forget to enclose 'omp %3' directive into a target region?|" 8155*67e74705SXin Li "; perhaps you forget to enclose 'omp %3' directive into a teams region?}2">; 8156*67e74705SXin Lidef err_omp_prohibited_region_simd : Error< 8157*67e74705SXin Li "OpenMP constructs may not be nested inside a simd region">; 8158*67e74705SXin Lidef err_omp_prohibited_region_atomic : Error< 8159*67e74705SXin Li "OpenMP constructs may not be nested inside an atomic region">; 8160*67e74705SXin Lidef err_omp_prohibited_region_critical_same_name : Error< 8161*67e74705SXin Li "cannot nest 'critical' regions having the same name %0">; 8162*67e74705SXin Lidef note_omp_previous_critical_region : Note< 8163*67e74705SXin Li "previous 'critical' region starts here">; 8164*67e74705SXin Lidef err_omp_sections_not_compound_stmt : Error< 8165*67e74705SXin Li "the statement for '#pragma omp sections' must be a compound statement">; 8166*67e74705SXin Lidef err_omp_parallel_sections_not_compound_stmt : Error< 8167*67e74705SXin Li "the statement for '#pragma omp parallel sections' must be a compound statement">; 8168*67e74705SXin Lidef err_omp_orphaned_section_directive : Error< 8169*67e74705SXin Li "%select{orphaned 'omp section' directives are prohibited, it|'omp section' directive}0" 8170*67e74705SXin Li " must be closely nested to a sections region%select{|, not a %1 region}0">; 8171*67e74705SXin Lidef err_omp_sections_substmt_not_section : Error< 8172*67e74705SXin Li "statement in 'omp sections' directive must be enclosed into a section region">; 8173*67e74705SXin Lidef err_omp_parallel_sections_substmt_not_section : Error< 8174*67e74705SXin Li "statement in 'omp parallel sections' directive must be enclosed into a section region">; 8175*67e74705SXin Lidef err_omp_parallel_reduction_in_task_firstprivate : Error< 8176*67e74705SXin Li "argument of a reduction clause of a %0 construct must not appear in a firstprivate clause on a task construct">; 8177*67e74705SXin Lidef err_omp_atomic_read_not_expression_statement : Error< 8178*67e74705SXin Li "the statement for 'atomic read' must be an expression statement of form 'v = x;'," 8179*67e74705SXin Li " where v and x are both lvalue expressions with scalar type">; 8180*67e74705SXin Lidef note_omp_atomic_read_write: Note< 8181*67e74705SXin Li "%select{expected an expression statement|expected built-in assignment operator|expected expression of scalar type|expected lvalue expression}0">; 8182*67e74705SXin Lidef err_omp_atomic_write_not_expression_statement : Error< 8183*67e74705SXin Li "the statement for 'atomic write' must be an expression statement of form 'x = expr;'," 8184*67e74705SXin Li " where x is a lvalue expression with scalar type">; 8185*67e74705SXin Lidef err_omp_atomic_update_not_expression_statement : Error< 8186*67e74705SXin Li "the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x'," 8187*67e74705SXin Li " where x is an l-value expression with scalar type">; 8188*67e74705SXin Lidef err_omp_atomic_not_expression_statement : Error< 8189*67e74705SXin Li "the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x'," 8190*67e74705SXin Li " where x is an l-value expression with scalar type">; 8191*67e74705SXin Lidef note_omp_atomic_update: Note< 8192*67e74705SXin Li "%select{expected an expression statement|expected built-in binary or unary operator|expected unary decrement/increment operation|" 8193*67e74705SXin Li "expected expression of scalar type|expected assignment expression|expected built-in binary operator|" 8194*67e74705SXin Li "expected one of '+', '*', '-', '/', '&', '^', '%|', '<<', or '>>' built-in operations|expected in right hand side of expression}0">; 8195*67e74705SXin Lidef err_omp_atomic_capture_not_expression_statement : Error< 8196*67e74705SXin Li "the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x'," 8197*67e74705SXin Li " where x and v are both l-value expressions with scalar type">; 8198*67e74705SXin Lidef err_omp_atomic_capture_not_compound_statement : Error< 8199*67e74705SXin Li "the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}'," 8200*67e74705SXin Li " '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}'," 8201*67e74705SXin Li " '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}'" 8202*67e74705SXin Li " where x is an l-value expression with scalar type">; 8203*67e74705SXin Lidef note_omp_atomic_capture: Note< 8204*67e74705SXin Li "%select{expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression}0">; 8205*67e74705SXin Lidef err_omp_atomic_several_clauses : Error< 8206*67e74705SXin Li "directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">; 8207*67e74705SXin Lidef note_omp_atomic_previous_clause : Note< 8208*67e74705SXin Li "'%0' clause used here">; 8209*67e74705SXin Lidef err_omp_target_contains_not_only_teams : Error< 8210*67e74705SXin Li "target construct with nested teams region contains statements outside of the teams construct">; 8211*67e74705SXin Lidef note_omp_nested_teams_construct_here : Note< 8212*67e74705SXin Li "nested teams construct here">; 8213*67e74705SXin Lidef note_omp_nested_statement_here : Note< 8214*67e74705SXin Li "%select{statement|directive}0 outside teams construct here">; 8215*67e74705SXin Lidef err_omp_single_copyprivate_with_nowait : Error< 8216*67e74705SXin Li "the 'copyprivate' clause must not be used with the 'nowait' clause">; 8217*67e74705SXin Lidef note_omp_nowait_clause_here : Note< 8218*67e74705SXin Li "'nowait' clause is here">; 8219*67e74705SXin Lidef err_omp_single_decl_in_declare_simd : Error< 8220*67e74705SXin Li "single declaration is expected after 'declare simd' directive">; 8221*67e74705SXin Lidef err_omp_function_expected : Error< 8222*67e74705SXin Li "'#pragma omp declare simd' can only be applied to functions">; 8223*67e74705SXin Lidef err_omp_wrong_cancel_region : Error< 8224*67e74705SXin Li "one of 'for', 'parallel', 'sections' or 'taskgroup' is expected">; 8225*67e74705SXin Lidef err_omp_parent_cancel_region_nowait : Error< 8226*67e74705SXin Li "parent region for 'omp %select{cancellation point/cancel}0' construct cannot be nowait">; 8227*67e74705SXin Lidef err_omp_parent_cancel_region_ordered : Error< 8228*67e74705SXin Li "parent region for 'omp %select{cancellation point/cancel}0' construct cannot be ordered">; 8229*67e74705SXin Lidef err_omp_reduction_wrong_type : Error<"reduction type cannot be %select{qualified with 'const', 'volatile' or 'restrict'|a function|a reference|an array}0 type">; 8230*67e74705SXin Lidef err_omp_wrong_var_in_declare_reduction : Error<"only %select{'omp_priv' or 'omp_orig'|'omp_in' or 'omp_out'}0 variables are allowed in %select{initializer|combiner}0 expression">; 8231*67e74705SXin Lidef err_omp_declare_reduction_redefinition : Error<"redefinition of user-defined reduction for type %0">; 8232*67e74705SXin Lidef err_omp_array_section_use : Error<"OpenMP array section is not allowed here">; 8233*67e74705SXin Lidef err_omp_typecheck_section_value : Error< 8234*67e74705SXin Li "subscripted value is not an array or pointer">; 8235*67e74705SXin Lidef err_omp_typecheck_section_not_integer : Error< 8236*67e74705SXin Li "array section %select{lower bound|length}0 is not an integer">; 8237*67e74705SXin Lidef err_omp_section_function_type : Error< 8238*67e74705SXin Li "section of pointer to function type %0">; 8239*67e74705SXin Lidef warn_omp_section_is_char : Warning<"array section %select{lower bound|length}0 is of type 'char'">, 8240*67e74705SXin Li InGroup<CharSubscript>, DefaultIgnore; 8241*67e74705SXin Lidef err_omp_section_incomplete_type : Error< 8242*67e74705SXin Li "section of pointer to incomplete type %0">; 8243*67e74705SXin Lidef err_omp_section_negative : Error< 8244*67e74705SXin Li "section %select{lower bound|length}0 is evaluated to a negative value %1">; 8245*67e74705SXin Lidef err_omp_section_length_undefined : Error< 8246*67e74705SXin Li "section length is unspecified and cannot be inferred because subscripted value is %select{not an array|an array of unknown bound}0">; 8247*67e74705SXin Lidef err_omp_wrong_linear_modifier : Error< 8248*67e74705SXin Li "expected %select{'val' modifier|one of 'ref', val' or 'uval' modifiers}0">; 8249*67e74705SXin Lidef err_omp_wrong_linear_modifier_non_reference : Error< 8250*67e74705SXin Li "variable of non-reference type %0 can be used only with 'val' modifier, but used with '%1'">; 8251*67e74705SXin Lidef err_omp_wrong_simdlen_safelen_values : Error< 8252*67e74705SXin Li "the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter">; 8253*67e74705SXin Lidef err_omp_wrong_if_directive_name_modifier : Error< 8254*67e74705SXin Li "directive name modifier '%0' is not allowed for '#pragma omp %1'">; 8255*67e74705SXin Lidef err_omp_no_more_if_clause : Error< 8256*67e74705SXin Li "no more 'if' clause is allowed">; 8257*67e74705SXin Lidef err_omp_unnamed_if_clause : Error< 8258*67e74705SXin Li "expected %select{|one of}0 %1 directive name modifier%select{|s}0">; 8259*67e74705SXin Lidef note_omp_previous_named_if_clause : Note< 8260*67e74705SXin Li "previous clause with directive name modifier specified here">; 8261*67e74705SXin Lidef err_omp_ordered_directive_with_param : Error< 8262*67e74705SXin Li "'ordered' directive %select{without any clauses|with 'threads' clause}0 cannot be closely nested inside ordered region with specified parameter">; 8263*67e74705SXin Lidef err_omp_ordered_directive_without_param : Error< 8264*67e74705SXin Li "'ordered' directive with 'depend' clause cannot be closely nested inside ordered region without specified parameter">; 8265*67e74705SXin Lidef note_omp_ordered_param : Note< 8266*67e74705SXin Li "'ordered' clause with specified parameter">; 8267*67e74705SXin Lidef err_omp_expected_base_var_name : Error< 8268*67e74705SXin Li "expected variable name as a base of the array %select{subscript|section}0">; 8269*67e74705SXin Lidef err_omp_map_shared_storage : Error< 8270*67e74705SXin Li "variable already marked as mapped in current construct">; 8271*67e74705SXin Lidef err_omp_not_mappable_type : Error< 8272*67e74705SXin Li "type %0 is not mappable to target">; 8273*67e74705SXin Lidef err_omp_invalid_map_type_for_directive : Error< 8274*67e74705SXin Li "%select{map type '%1' is not allowed|map type must be specified}0 for '#pragma omp %2'">; 8275*67e74705SXin Lidef err_omp_no_map_for_directive : Error< 8276*67e74705SXin Li "expected at least one map clause for '#pragma omp %0'">; 8277*67e74705SXin Lidef note_omp_polymorphic_in_target : Note< 8278*67e74705SXin Li "mappable type cannot be polymorphic">; 8279*67e74705SXin Lidef note_omp_static_member_in_target : Note< 8280*67e74705SXin Li "mappable type cannot contain static members">; 8281*67e74705SXin Lidef err_omp_threadprivate_in_clause : Error< 8282*67e74705SXin Li "threadprivate variables are not allowed in '%0' clause">; 8283*67e74705SXin Lidef err_omp_wrong_ordered_loop_count : Error< 8284*67e74705SXin Li "the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause">; 8285*67e74705SXin Lidef note_collapse_loop_count : Note< 8286*67e74705SXin Li "parameter of the 'collapse' clause">; 8287*67e74705SXin Lidef err_omp_grainsize_num_tasks_mutually_exclusive : Error< 8288*67e74705SXin Li "'%0' and '%1' clause are mutually exclusive and may not appear on the same directive">; 8289*67e74705SXin Lidef note_omp_previous_grainsize_num_tasks : Note< 8290*67e74705SXin Li "'%0' clause is specified here">; 8291*67e74705SXin Lidef err_omp_hint_clause_no_name : Error< 8292*67e74705SXin Li "the name of the construct must be specified in presence of 'hint' clause">; 8293*67e74705SXin Lidef err_omp_critical_with_hint : Error< 8294*67e74705SXin Li "constructs with the same name must have a 'hint' clause with the same value">; 8295*67e74705SXin Lidef note_omp_critical_hint_here : Note< 8296*67e74705SXin Li "%select{|previous }0'hint' clause with value '%1'">; 8297*67e74705SXin Lidef note_omp_critical_no_hint : Note< 8298*67e74705SXin Li "%select{|previous }0directive with no 'hint' clause specified">; 8299*67e74705SXin Lidef err_omp_firstprivate_distribute_private_teams : Error< 8300*67e74705SXin Li "private variable in '#pragma omp teams' cannot be firstprivate in '#pragma omp distribute'">; 8301*67e74705SXin Lidef err_omp_firstprivate_and_lastprivate_in_distribute : Error< 8302*67e74705SXin Li "lastprivate variable cannot be firstprivate in '#pragma omp distribute'">; 8303*67e74705SXin Lidef err_omp_firstprivate_distribute_in_teams_reduction : Error< 8304*67e74705SXin Li "reduction variable in '#pragma omp teams' cannot be firstprivate in '#pragma omp distribute'">; 8305*67e74705SXin Lidef err_omp_depend_clause_thread_simd : Error< 8306*67e74705SXin Li "'depend' clauses cannot be mixed with '%0' clause">; 8307*67e74705SXin Lidef err_omp_depend_sink_expected_loop_iteration : Error< 8308*67e74705SXin Li "expected %0 loop iteration variable">; 8309*67e74705SXin Lidef err_omp_depend_sink_unexpected_expr : Error< 8310*67e74705SXin Li "unexpected expression: number of expressions is larger than the number of associated loops">; 8311*67e74705SXin Lidef err_omp_depend_sink_expected_plus_minus : Error< 8312*67e74705SXin Li "expected '+' or '-' operation">; 8313*67e74705SXin Lidef err_omp_depend_sink_source_not_allowed : Error< 8314*67e74705SXin Li "'depend(%select{source|sink:vec}0)' clause%select{|s}0 cannot be mixed with 'depend(%select{sink:vec|source}0)' clause%select{s|}0">; 8315*67e74705SXin Lidef err_omp_linear_ordered : Error< 8316*67e74705SXin Li "'linear' clause cannot be specified along with 'ordered' clause with a parameter">; 8317*67e74705SXin Lidef err_omp_unexpected_schedule_modifier : Error< 8318*67e74705SXin Li "modifier '%0' cannot be used along with modifier '%1'">; 8319*67e74705SXin Lidef err_omp_schedule_nonmonotonic_static : Error< 8320*67e74705SXin Li "'nonmonotonic' modifier can only be specified with 'dynamic' or 'guided' schedule kind">; 8321*67e74705SXin Lidef err_omp_schedule_nonmonotonic_ordered : Error< 8322*67e74705SXin Li "'schedule' clause with 'nonmonotonic' modifier cannot be specified if an 'ordered' clause is specified">; 8323*67e74705SXin Lidef err_omp_ordered_simd : Error< 8324*67e74705SXin Li "'ordered' clause with a parameter can not be specified in '#pragma omp %0' directive">; 8325*67e74705SXin Lidef err_omp_variable_in_map_and_dsa : Error< 8326*67e74705SXin Li "%0 variable cannot be in a map clause in '#pragma omp %1' directive">; 8327*67e74705SXin Lidef err_omp_param_or_this_in_clause : Error< 8328*67e74705SXin Li "expected reference to one of the parameters of function %0%select{| or 'this'}1">; 8329*67e74705SXin Lidef err_omp_expected_uniform_param : Error< 8330*67e74705SXin Li "expected a reference to a parameter specified in a 'uniform' clause">; 8331*67e74705SXin Lidef err_omp_expected_int_param : Error< 8332*67e74705SXin Li "expected a reference to an integer-typed parameter">; 8333*67e74705SXin Lidef err_omp_at_least_one_motion_clause_required : Error< 8334*67e74705SXin Li "expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'">; 8335*67e74705SXin Lidef err_omp_usedeviceptr_not_a_pointer : Error< 8336*67e74705SXin Li "expected pointer or reference to pointer in 'use_device_ptr' clause">; 8337*67e74705SXin Lidef err_omp_argument_type_isdeviceptr : Error < 8338*67e74705SXin Li "expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'">; 8339*67e74705SXin Lidef warn_omp_nesting_simd : Warning< 8340*67e74705SXin Li "OpenMP only allows an ordered construct with the simd clause nested in a simd construct">, 8341*67e74705SXin Li InGroup<SourceUsesOpenMP>; 8342*67e74705SXin Li} // end of OpenMP category 8343*67e74705SXin Li 8344*67e74705SXin Lilet CategoryName = "Related Result Type Issue" in { 8345*67e74705SXin Li// Objective-C related result type compatibility 8346*67e74705SXin Lidef warn_related_result_type_compatibility_class : Warning< 8347*67e74705SXin Li "method is expected to return an instance of its class type " 8348*67e74705SXin Li "%diff{$, but is declared to return $|" 8349*67e74705SXin Li ", but is declared to return different type}0,1">; 8350*67e74705SXin Lidef warn_related_result_type_compatibility_protocol : Warning< 8351*67e74705SXin Li "protocol method is expected to return an instance of the implementing " 8352*67e74705SXin Li "class, but is declared to return %0">; 8353*67e74705SXin Lidef note_related_result_type_family : Note< 8354*67e74705SXin Li "%select{overridden|current}0 method is part of the '%select{|alloc|copy|init|" 8355*67e74705SXin Li "mutableCopy|new|autorelease|dealloc|finalize|release|retain|retainCount|" 8356*67e74705SXin Li "self}1' method family%select{| and is expected to return an instance of its " 8357*67e74705SXin Li "class type}0">; 8358*67e74705SXin Lidef note_related_result_type_overridden : Note< 8359*67e74705SXin Li "overridden method returns an instance of its class type">; 8360*67e74705SXin Lidef note_related_result_type_inferred : Note< 8361*67e74705SXin Li "%select{class|instance}0 method %1 is assumed to return an instance of " 8362*67e74705SXin Li "its receiver type (%2)">; 8363*67e74705SXin Lidef note_related_result_type_explicit : Note< 8364*67e74705SXin Li "%select{overridden|current}0 method is explicitly declared 'instancetype'" 8365*67e74705SXin Li "%select{| and is expected to return an instance of its class type}0">; 8366*67e74705SXin Li 8367*67e74705SXin Li} 8368*67e74705SXin Li 8369*67e74705SXin Lilet CategoryName = "Modules Issue" in { 8370*67e74705SXin Lidef err_module_private_specialization : Error< 8371*67e74705SXin Li "%select{template|partial|member}0 specialization cannot be " 8372*67e74705SXin Li "declared __module_private__">; 8373*67e74705SXin Lidef err_module_private_local : Error< 8374*67e74705SXin Li "%select{local variable|parameter|typedef}0 %1 cannot be declared " 8375*67e74705SXin Li "__module_private__">; 8376*67e74705SXin Lidef err_module_private_local_class : Error< 8377*67e74705SXin Li "local %select{struct|interface|union|class|enum}0 cannot be declared " 8378*67e74705SXin Li "__module_private__">; 8379*67e74705SXin Lidef err_module_unimported_use : Error< 8380*67e74705SXin Li "%select{declaration|definition|default argument|" 8381*67e74705SXin Li "explicit specialization|partial specialization}0 of %1 must be imported " 8382*67e74705SXin Li "from module '%2' before it is required">; 8383*67e74705SXin Lidef err_module_unimported_use_header : Error< 8384*67e74705SXin Li "missing '#include %3'; " 8385*67e74705SXin Li "%select{declaration|definition|default argument|" 8386*67e74705SXin Li "explicit specialization|partial specialization}0 of %1 must be imported " 8387*67e74705SXin Li "from module '%2' before it is required">; 8388*67e74705SXin Lidef err_module_unimported_use_multiple : Error< 8389*67e74705SXin Li "%select{declaration|definition|default argument|" 8390*67e74705SXin Li "explicit specialization|partial specialization}0 of %1 must be imported " 8391*67e74705SXin Li "from one of the following modules before it is required:%2">; 8392*67e74705SXin Lidef ext_module_import_in_extern_c : ExtWarn< 8393*67e74705SXin Li "import of C++ module '%0' appears within extern \"C\" language linkage " 8394*67e74705SXin Li "specification">, DefaultError, 8395*67e74705SXin Li InGroup<DiagGroup<"module-import-in-extern-c">>; 8396*67e74705SXin Lidef note_module_import_in_extern_c : Note< 8397*67e74705SXin Li "extern \"C\" language linkage specification begins here">; 8398*67e74705SXin Lidef err_module_import_not_at_top_level_fatal : Error< 8399*67e74705SXin Li "import of module '%0' appears within %1">, DefaultFatal; 8400*67e74705SXin Lidef ext_module_import_not_at_top_level_noop : ExtWarn< 8401*67e74705SXin Li "redundant #include of module '%0' appears within %1">, DefaultError, 8402*67e74705SXin Li InGroup<DiagGroup<"modules-import-nested-redundant">>; 8403*67e74705SXin Lidef note_module_import_not_at_top_level : Note<"%0 begins here">; 8404*67e74705SXin Lidef err_module_self_import : Error< 8405*67e74705SXin Li "import of module '%0' appears within same top-level module '%1'">; 8406*67e74705SXin Lidef err_module_import_in_implementation : Error< 8407*67e74705SXin Li "@import of module '%0' in implementation of '%1'; use #import">; 8408*67e74705SXin Li 8409*67e74705SXin Lidef ext_equivalent_internal_linkage_decl_in_modules : ExtWarn< 8410*67e74705SXin Li "ambiguous use of internal linkage declaration %0 defined in multiple modules">, 8411*67e74705SXin Li InGroup<DiagGroup<"modules-ambiguous-internal-linkage">>; 8412*67e74705SXin Lidef note_equivalent_internal_linkage_decl : Note< 8413*67e74705SXin Li "declared here%select{ in module '%1'|}0">; 8414*67e74705SXin Li} 8415*67e74705SXin Li 8416*67e74705SXin Lilet CategoryName = "Coroutines Issue" in { 8417*67e74705SXin Lidef err_return_in_coroutine : Error< 8418*67e74705SXin Li "return statement not allowed in coroutine; did you mean 'co_return'?">; 8419*67e74705SXin Lidef note_declared_coroutine_here : Note< 8420*67e74705SXin Li "function is a coroutine due to use of " 8421*67e74705SXin Li "'%select{co_await|co_yield|co_return}0' here">; 8422*67e74705SXin Lidef err_coroutine_objc_method : Error< 8423*67e74705SXin Li "Objective-C methods as coroutines are not yet supported">; 8424*67e74705SXin Lidef err_coroutine_unevaluated_context : Error< 8425*67e74705SXin Li "'%0' cannot be used in an unevaluated context">; 8426*67e74705SXin Lidef err_coroutine_outside_function : Error< 8427*67e74705SXin Li "'%0' cannot be used outside a function">; 8428*67e74705SXin Lidef err_coroutine_ctor_dtor : Error< 8429*67e74705SXin Li "'%1' cannot be used in a %select{constructor|destructor}0">; 8430*67e74705SXin Lidef err_coroutine_constexpr : Error< 8431*67e74705SXin Li "'%0' cannot be used in a constexpr function">; 8432*67e74705SXin Lidef err_coroutine_varargs : Error< 8433*67e74705SXin Li "'%0' cannot be used in a varargs function">; 8434*67e74705SXin Lidef ext_coroutine_without_co_await_co_yield : ExtWarn< 8435*67e74705SXin Li "'co_return' used in a function " 8436*67e74705SXin Li "that uses neither 'co_await' nor 'co_yield'">, 8437*67e74705SXin Li InGroup<DiagGroup<"coreturn-without-coawait">>; 8438*67e74705SXin Lidef err_implied_std_coroutine_traits_not_found : Error< 8439*67e74705SXin Li "you need to include <coroutine> before defining a coroutine">; 8440*67e74705SXin Lidef err_malformed_std_coroutine_traits : Error< 8441*67e74705SXin Li "'std::coroutine_traits' must be a class template">; 8442*67e74705SXin Lidef err_implied_std_coroutine_traits_promise_type_not_found : Error< 8443*67e74705SXin Li "this function cannot be a coroutine: %q0 has no member named 'promise_type'">; 8444*67e74705SXin Lidef err_implied_std_coroutine_traits_promise_type_not_class : Error< 8445*67e74705SXin Li "this function cannot be a coroutine: %0 is not a class">; 8446*67e74705SXin Lidef err_coroutine_traits_missing_specialization : Error< 8447*67e74705SXin Li "this function cannot be a coroutine: missing definition of " 8448*67e74705SXin Li "specialization %q0">; 8449*67e74705SXin Li} 8450*67e74705SXin Li 8451*67e74705SXin Lilet CategoryName = "Documentation Issue" in { 8452*67e74705SXin Lidef warn_not_a_doxygen_trailing_member_comment : Warning< 8453*67e74705SXin Li "not a Doxygen trailing comment">, InGroup<Documentation>, DefaultIgnore; 8454*67e74705SXin Li} // end of documentation issue category 8455*67e74705SXin Li 8456*67e74705SXin Lilet CategoryName = "Instrumentation Issue" in { 8457*67e74705SXin Lidef warn_profile_data_out_of_date : Warning< 8458*67e74705SXin Li "profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1" 8459*67e74705SXin Li " no data and %2 %plural{1:has|:have}2 mismatched data that will be ignored">, 8460*67e74705SXin Li InGroup<ProfileInstrOutOfDate>; 8461*67e74705SXin Lidef warn_profile_data_unprofiled : Warning< 8462*67e74705SXin Li "no profile data available for file \"%0\"">, 8463*67e74705SXin Li InGroup<ProfileInstrUnprofiled>; 8464*67e74705SXin Li 8465*67e74705SXin Li} // end of instrumentation issue category 8466*67e74705SXin Li 8467*67e74705SXin Lilet CategoryName = "Nullability Issue" in { 8468*67e74705SXin Li 8469*67e74705SXin Lidef warn_mismatched_nullability_attr : Warning< 8470*67e74705SXin Li "nullability specifier %0 conflicts with existing specifier %1">, 8471*67e74705SXin Li InGroup<Nullability>; 8472*67e74705SXin Li 8473*67e74705SXin Lidef warn_nullability_declspec : Warning< 8474*67e74705SXin Li "nullability specifier %0 cannot be applied " 8475*67e74705SXin Li "to non-pointer type %1; did you mean to apply the specifier to the " 8476*67e74705SXin Li "%select{pointer|block pointer|member pointer|function pointer|" 8477*67e74705SXin Li "member function pointer}2?">, 8478*67e74705SXin Li InGroup<NullabilityDeclSpec>, 8479*67e74705SXin Li DefaultError; 8480*67e74705SXin Li 8481*67e74705SXin Lidef note_nullability_here : Note<"%0 specified here">; 8482*67e74705SXin Li 8483*67e74705SXin Lidef err_nullability_nonpointer : Error< 8484*67e74705SXin Li "nullability specifier %0 cannot be applied to non-pointer type %1">; 8485*67e74705SXin Li 8486*67e74705SXin Lidef warn_nullability_lost : Warning< 8487*67e74705SXin Li "implicit conversion from nullable pointer %0 to non-nullable pointer " 8488*67e74705SXin Li "type %1">, 8489*67e74705SXin Li InGroup<NullableToNonNullConversion>, DefaultIgnore; 8490*67e74705SXin Li 8491*67e74705SXin Lidef err_nullability_cs_multilevel : Error< 8492*67e74705SXin Li "nullability keyword %0 cannot be applied to multi-level pointer type %1">; 8493*67e74705SXin Lidef note_nullability_type_specifier : Note< 8494*67e74705SXin Li "use nullability type specifier %0 to affect the innermost " 8495*67e74705SXin Li "pointer type of %1">; 8496*67e74705SXin Li 8497*67e74705SXin Lidef warn_null_resettable_setter : Warning< 8498*67e74705SXin Li "synthesized setter %0 for null_resettable property %1 does not handle nil">, 8499*67e74705SXin Li InGroup<Nullability>; 8500*67e74705SXin Li 8501*67e74705SXin Lidef warn_nullability_missing : Warning< 8502*67e74705SXin Li "%select{pointer|block pointer|member pointer}0 is missing a nullability " 8503*67e74705SXin Li "type specifier (_Nonnull, _Nullable, or _Null_unspecified)">, 8504*67e74705SXin Li InGroup<NullabilityCompleteness>; 8505*67e74705SXin Li 8506*67e74705SXin Lidef err_objc_type_arg_explicit_nullability : Error< 8507*67e74705SXin Li "type argument %0 cannot explicitly specify nullability">; 8508*67e74705SXin Li 8509*67e74705SXin Lidef err_objc_type_param_bound_explicit_nullability : Error< 8510*67e74705SXin Li "type parameter %0 bound %1 cannot explicitly specify nullability">; 8511*67e74705SXin Li 8512*67e74705SXin Li} 8513*67e74705SXin Li 8514*67e74705SXin Lilet CategoryName = "Generics Issue" in { 8515*67e74705SXin Li 8516*67e74705SXin Lidef err_objc_type_param_bound_nonobject : Error< 8517*67e74705SXin Li "type bound %0 for type parameter %1 is not an Objective-C pointer type">; 8518*67e74705SXin Li 8519*67e74705SXin Lidef err_objc_type_param_bound_missing_pointer : Error< 8520*67e74705SXin Li "missing '*' in type bound %0 for type parameter %1">; 8521*67e74705SXin Lidef err_objc_type_param_bound_qualified : Error< 8522*67e74705SXin Li "type bound %1 for type parameter %0 cannot be qualified with '%2'">; 8523*67e74705SXin Li 8524*67e74705SXin Lidef err_objc_type_param_redecl : Error< 8525*67e74705SXin Li "redeclaration of type parameter %0">; 8526*67e74705SXin Li 8527*67e74705SXin Lidef err_objc_type_param_arity_mismatch : Error< 8528*67e74705SXin Li "%select{forward class declaration|class definition|category|extension}0 has " 8529*67e74705SXin Li "too %select{few|many}1 type parameters (expected %2, have %3)">; 8530*67e74705SXin Li 8531*67e74705SXin Lidef err_objc_type_param_bound_conflict : Error< 8532*67e74705SXin Li "type bound %0 for type parameter %1 conflicts with " 8533*67e74705SXin Li "%select{implicit|previous}2 bound %3%select{for type parameter %5|}4">; 8534*67e74705SXin Li 8535*67e74705SXin Lidef err_objc_type_param_variance_conflict : Error< 8536*67e74705SXin Li "%select{in|co|contra}0variant type parameter %1 conflicts with previous " 8537*67e74705SXin Li "%select{in|co|contra}2variant type parameter %3">; 8538*67e74705SXin Li 8539*67e74705SXin Lidef note_objc_type_param_here : Note<"type parameter %0 declared here">; 8540*67e74705SXin Li 8541*67e74705SXin Lidef err_objc_type_param_bound_missing : Error< 8542*67e74705SXin Li "missing type bound %0 for type parameter %1 in %select{@interface|@class}2">; 8543*67e74705SXin Li 8544*67e74705SXin Lidef err_objc_parameterized_category_nonclass : Error< 8545*67e74705SXin Li "%select{extension|category}0 of non-parameterized class %1 cannot have type " 8546*67e74705SXin Li "parameters">; 8547*67e74705SXin Li 8548*67e74705SXin Lidef err_objc_parameterized_forward_class : Error< 8549*67e74705SXin Li "forward declaration of non-parameterized class %0 cannot have type " 8550*67e74705SXin Li "parameters">; 8551*67e74705SXin Li 8552*67e74705SXin Lidef err_objc_parameterized_forward_class_first : Error< 8553*67e74705SXin Li "class %0 previously declared with type parameters">; 8554*67e74705SXin Li 8555*67e74705SXin Lidef err_objc_type_arg_missing_star : Error< 8556*67e74705SXin Li "type argument %0 must be a pointer (requires a '*')">; 8557*67e74705SXin Lidef err_objc_type_arg_qualified : Error< 8558*67e74705SXin Li "type argument %0 cannot be qualified with '%1'">; 8559*67e74705SXin Li 8560*67e74705SXin Lidef err_objc_type_arg_missing : Error< 8561*67e74705SXin Li "no type or protocol named %0">; 8562*67e74705SXin Li 8563*67e74705SXin Lidef err_objc_type_args_and_protocols : Error< 8564*67e74705SXin Li "angle brackets contain both a %select{type|protocol}0 (%1) and a " 8565*67e74705SXin Li "%select{protocol|type}0 (%2)">; 8566*67e74705SXin Li 8567*67e74705SXin Lidef err_objc_type_args_non_class : Error< 8568*67e74705SXin Li "type arguments cannot be applied to non-class type %0">; 8569*67e74705SXin Li 8570*67e74705SXin Lidef err_objc_type_args_non_parameterized_class : Error< 8571*67e74705SXin Li "type arguments cannot be applied to non-parameterized class %0">; 8572*67e74705SXin Li 8573*67e74705SXin Lidef err_objc_type_args_specialized_class : Error< 8574*67e74705SXin Li "type arguments cannot be applied to already-specialized class type %0">; 8575*67e74705SXin Li 8576*67e74705SXin Lidef err_objc_type_args_wrong_arity : Error< 8577*67e74705SXin Li "too %select{many|few}0 type arguments for class %1 (have %2, expected %3)">; 8578*67e74705SXin Li} 8579*67e74705SXin Li 8580*67e74705SXin Lidef err_objc_type_arg_not_id_compatible : Error< 8581*67e74705SXin Li "type argument %0 is neither an Objective-C object nor a block type">; 8582*67e74705SXin Li 8583*67e74705SXin Lidef err_objc_type_arg_does_not_match_bound : Error< 8584*67e74705SXin Li "type argument %0 does not satisfy the bound (%1) of type parameter %2">; 8585*67e74705SXin Li 8586*67e74705SXin Lidef warn_objc_redundant_qualified_class_type : Warning< 8587*67e74705SXin Li "parameterized class %0 already conforms to the protocols listed; did you " 8588*67e74705SXin Li "forget a '*'?">, InGroup<ObjCProtocolQualifiers>; 8589*67e74705SXin Li 8590*67e74705SXin Lidef warn_block_literal_attributes_on_omitted_return_type : Warning< 8591*67e74705SXin Li "attribute %0 ignored, because it cannot be applied to omitted return type">, 8592*67e74705SXin Li InGroup<IgnoredAttributes>; 8593*67e74705SXin Li 8594*67e74705SXin Lidef warn_block_literal_qualifiers_on_omitted_return_type : Warning< 8595*67e74705SXin Li "'%0' qualifier on omitted return type %1 has no effect">, 8596*67e74705SXin Li InGroup<IgnoredQualifiers>; 8597*67e74705SXin Li 8598*67e74705SXin Li} // end of sema component. 8599