1//==--- DiagnosticASTKinds.td - libast diagnostics ------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9let Component = "AST" in { 10 11// Constant expression diagnostics. These (and their users) belong in Sema. 12def note_expr_divide_by_zero : Note<"division by zero">; 13def note_constexpr_invalid_cast : Note< 14 "%select{reinterpret_cast|dynamic_cast|%select{this conversion|cast that" 15 " performs the conversions of a reinterpret_cast}1|cast from %1}0" 16 " is not allowed in a constant expression" 17 "%select{| in C++ standards before C++20||}0">; 18def note_constexpr_invalid_void_star_cast : Note< 19 "cast from %0 is not allowed in a constant expression " 20 "%select{in C++ standards before C++2c|because the pointed object " 21 "type %2 is not similar to the target type %3}1">; 22def note_constexpr_invalid_downcast : Note< 23 "cannot cast object of dynamic type %0 to type %1">; 24def note_constexpr_overflow : Note< 25 "value %0 is outside the range of representable values of type %1">; 26def note_constexpr_negative_shift : Note<"negative shift count %0">; 27def note_constexpr_large_shift : Note< 28 "shift count %0 >= width of type %1 (%2 bit%s2)">; 29def note_constexpr_lshift_of_negative : Note<"left shift of negative value %0">; 30def note_constexpr_lshift_discards : Note<"signed left shift discards bits">; 31def note_constexpr_invalid_function : Note< 32 "%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot " 33 "be used in a constant expression">; 34def note_constexpr_invalid_inhctor : Note< 35 "constructor inherited from base class %0 cannot be used in a " 36 "constant expression; derived class cannot be implicitly initialized">; 37def note_constexpr_no_return : Note< 38 "control reached end of constexpr function">; 39def note_constexpr_virtual_call : Note< 40 "cannot evaluate call to virtual function in a constant expression " 41 "in C++ standards before C++20">; 42def note_constexpr_pure_virtual_call : Note< 43 "pure virtual function %q0 called">; 44def note_constexpr_polymorphic_unknown_dynamic_type : Note< 45 "%select{|||||virtual function called on|dynamic_cast applied to|" 46 "typeid applied to|construction of|destruction of}0 object '%1' " 47 "whose dynamic type is not constant">; 48def note_constexpr_dynamic_cast_to_reference_failed : Note< 49 "reference dynamic_cast failed: %select{" 50 "static type %1 of operand is a non-public base class of dynamic type %2|" 51 "dynamic type %2 of operand does not have a base class of type %3|" 52 "%3 is an ambiguous base class of dynamic type %2 of operand|" 53 "%3 is a non-public base class of dynamic type %2 of operand}0">; 54def note_constexpr_virtual_base : Note< 55 "cannot construct object of type %0 with virtual base class " 56 "in a constant expression">; 57def note_constexpr_nonliteral : Note< 58 "non-literal type %0 cannot be used in a constant expression">; 59def note_constexpr_non_global : Note< 60 "%select{pointer|reference}0 to %select{|subobject of }1" 61 "%select{temporary|%3}2 is not a constant expression">; 62def note_constexpr_not_static : Note< 63 "address of non-static constexpr variable %0 may differ on each invocation " 64 "of the enclosing function; add 'static' to give it a constant address">; 65def note_constexpr_dynamic_alloc : Note< 66 "%select{pointer|reference}0 to %select{|subobject of }1" 67 "heap-allocated object is not a constant expression">; 68def note_consteval_address_accessible : Note< 69 "%select{pointer|reference}0 to a consteval declaration " 70 "is not a constant expression">; 71def note_constexpr_uninitialized : Note< 72 "subobject %select{of type |}0%1 is not initialized">; 73def note_constexpr_uninitialized_base : Note< 74 "constructor of base class %0 is not called">; 75def note_constexpr_static_local : Note< 76 "control flows through the definition of a %select{static|thread_local}0 variable">; 77def note_constexpr_subobject_declared_here : Note< 78 "subobject declared here">; 79def note_constexpr_array_index : Note<"cannot refer to element %0 of " 80 "%select{array of %2 element%plural{1:|:s}2|non-array object}1 " 81 "in a constant expression">; 82def note_constexpr_float_arithmetic : Note< 83 "floating point arithmetic produces %select{an infinity|a NaN}0">; 84def note_constexpr_dynamic_rounding : Note< 85 "cannot evaluate this expression if rounding mode is dynamic">; 86def note_constexpr_float_arithmetic_strict : Note< 87 "compile time floating point arithmetic suppressed in strict evaluation modes">; 88def note_constexpr_pointer_subtraction_not_same_array : Note< 89 "subtracted pointers are not elements of the same array">; 90def note_constexpr_pointer_subtraction_zero_size : Note< 91 "subtraction of pointers to type %0 of zero size">; 92def note_constexpr_pointer_comparison_unspecified : Note< 93 "comparison between '%0' and '%1' has unspecified value">; 94def note_constexpr_pointer_constant_comparison : Note< 95 "comparison of numeric address '%0' with pointer '%1' can only be performed " 96 "at runtime">; 97def note_constexpr_literal_comparison : Note< 98 "comparison of addresses of literals has unspecified value">; 99def note_constexpr_pointer_weak_comparison : Note< 100 "comparison against address of weak declaration '%0' can only be performed " 101 "at runtime">; 102def note_constexpr_mem_pointer_weak_comparison : Note< 103 "comparison against pointer to weak member %q0 can only be performed " 104 "at runtime">; 105def note_constexpr_pointer_comparison_past_end : Note< 106 "comparison against pointer '%0' that points past the end of a " 107 "complete object has unspecified value">; 108def note_constexpr_pointer_comparison_zero_sized : Note< 109 "comparison of pointers '%0' and '%1' to unrelated zero-sized objects">; 110def note_constexpr_pointer_comparison_base_classes : Note< 111 "comparison of addresses of subobjects of different base classes " 112 "has unspecified value">; 113def note_constexpr_pointer_comparison_base_field : Note< 114 "comparison of address of base class subobject %0 of class %1 to field %2 " 115 "has unspecified value">; 116def note_constexpr_pointer_comparison_differing_access : Note< 117 "comparison of address of fields %0 and %2 of %4 with differing access " 118 "specifiers (%1 vs %3) has unspecified value">; 119def note_constexpr_compare_virtual_mem_ptr : Note< 120 "comparison of pointer to virtual member function %0 has unspecified value">; 121def note_constexpr_past_end : Note< 122 "dereferenced pointer past the end of %select{|subobject of }0" 123 "%select{temporary|%2}1 is not a constant expression">; 124def note_constexpr_past_end_subobject : Note< 125 "cannot %select{access base class of|access derived class of|access field of|" 126 "access array element of|ERROR|" 127 "access real component of|access imaginary component of}0 " 128 "pointer past the end of object">; 129def note_non_null_attribute_failed : Note< 130 "null passed to a callee that requires a non-null argument">; 131def note_constexpr_null_subobject : Note< 132 "cannot %select{access base class of|access derived class of|access field of|" 133 "access array element of|perform pointer arithmetic on|" 134 "access real component of|" 135 "access imaginary component of}0 null pointer">; 136def note_constexpr_null_callee : Note< 137 "'%0' evaluates to a null function pointer">; 138def note_constexpr_function_param_value_unknown : Note< 139 "function parameter %0 with unknown value cannot be used in a constant " 140 "expression">; 141def note_constexpr_var_init_unknown : Note< 142 "initializer of %0 is unknown">; 143def note_constexpr_var_init_non_constant : Note< 144 "initializer of %0 is not a constant expression">; 145def note_constexpr_var_init_weak : Note< 146 "initializer of weak variable %0 is not considered constant because " 147 "it may be different at runtime">; 148def note_constexpr_typeid_polymorphic : Note< 149 "typeid applied to expression of polymorphic type %0 is " 150 "not allowed in a constant expression in C++ standards before C++20">; 151def note_constexpr_void_comparison : Note< 152 "comparison between unequal pointers to void has unspecified result">; 153def note_constexpr_temporary_here : Note<"temporary created here">; 154def note_constexpr_dynamic_alloc_here : Note<"heap allocation performed here">; 155def note_constexpr_conditional_never_const : Note< 156 "both arms of conditional operator are unable to produce a " 157 "constant expression">; 158def note_constexpr_depth_limit_exceeded : Note< 159 "constexpr evaluation exceeded maximum depth of %0 calls">; 160def note_constexpr_call_limit_exceeded : Note< 161 "constexpr evaluation hit maximum call limit">; 162def note_constexpr_step_limit_exceeded : Note< 163 "constexpr evaluation hit maximum step limit; possible infinite loop?">; 164def note_constexpr_heap_alloc_limit_exceeded : Note< 165 "constexpr evaluation hit maximum heap allocation limit">; 166def note_constexpr_this : Note< 167 "%select{|implicit }0use of 'this' pointer is only allowed within the " 168 "evaluation of a call to a 'constexpr' member function">; 169def note_constexpr_lifetime_ended : Note< 170 "%select{read of|read of|assignment to|increment of|decrement of|" 171 "member call on|dynamic_cast of|typeid applied to|construction of|" 172 "destruction of}0 %select{temporary|variable}1 whose " 173 "%plural{8:storage duration|:lifetime}0 has ended">; 174def note_constexpr_access_uninit : Note< 175 "%select{read of|read of|assignment to|increment of|decrement of|" 176 "member call on|dynamic_cast of|typeid applied to|" 177 "construction of subobject of|destruction of}0 " 178 "%select{object outside its lifetime|uninitialized object}1 " 179 "is not allowed in a constant expression">; 180def note_constexpr_use_uninit_reference : Note< 181 "use of reference outside its lifetime " 182 "is not allowed in a constant expression">; 183def note_constexpr_modify_const_type : Note< 184 "modification of object of const-qualified type %0 is not allowed " 185 "in a constant expression">; 186def note_constexpr_access_volatile_type : Note< 187 "%select{read of|read of|assignment to|increment of|decrement of|" 188 "<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 " 189 "volatile-qualified type %1 is not allowed in a constant expression">; 190def note_constexpr_access_volatile_obj : Note< 191 "%select{read of|read of|assignment to|increment of|decrement of|" 192 "<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 " 193 "volatile %select{temporary|object %2|member %2}1 is not allowed in " 194 "a constant expression">; 195def note_constexpr_volatile_here : Note< 196 "volatile %select{temporary created|object declared|member declared}0 here">; 197def note_constexpr_access_mutable : Note< 198 "%select{read of|read of|assignment to|increment of|decrement of|" 199 "member call on|dynamic_cast of|typeid applied to|construction of|" 200 "destruction of}0 " 201 "mutable member %1 is not allowed in a constant expression">; 202def note_constexpr_ltor_non_const_int : Note< 203 "read of non-const variable %0 is not allowed in a constant expression">; 204def note_constexpr_ltor_non_integral : Note< 205 "read of variable %0 of non-integral, non-enumeration type %1 " 206 "is not allowed in a constant expression">; 207def note_constexpr_ltor_non_constexpr : Note< 208 "read of non-constexpr variable %0 is not allowed in a constant expression">; 209def note_constexpr_ltor_incomplete_type : Note< 210 "read of incomplete type %0 is not allowed in a constant expression">; 211def note_constexpr_access_null : Note< 212 "%select{read of|read of|assignment to|increment of|decrement of|" 213 "member call on|dynamic_cast of|typeid applied to|construction of|" 214 "destruction of}0 " 215 "dereferenced null pointer is not allowed in a constant expression">; 216def note_constexpr_access_past_end : Note< 217 "%select{read of|read of|assignment to|increment of|decrement of|" 218 "member call on|dynamic_cast of|typeid applied to|construction of|" 219 "destruction of}0 " 220 "dereferenced one-past-the-end pointer is not allowed " 221 "in a constant expression">; 222def note_constexpr_access_unsized_array : Note< 223 "%select{read of|read of|assignment to|increment of|decrement of|" 224 "member call on|dynamic_cast of|typeid applied to|construction of|" 225 "destruction of}0 " 226 "element of array without known bound " 227 "is not allowed in a constant expression">; 228def note_constexpr_access_inactive_union_member : Note< 229 "%select{read of|read of|assignment to|increment of|decrement of|" 230 "member call on|dynamic_cast of|typeid applied to|" 231 "construction of subobject of|destruction of}0 " 232 "member %1 of union with %select{active member %3|no active member}2 " 233 "is not allowed in a constant expression">; 234def note_constexpr_union_member_change_during_init : Note< 235 "assignment would change active union member during the initialization of " 236 "a different member of the same union">; 237def note_constexpr_access_static_temporary : Note< 238 "%select{read of|read of|assignment to|increment of|decrement of|" 239 "member call on|dynamic_cast of|typeid applied to|reconstruction of|" 240 "destruction of}0 temporary " 241 "is not allowed in a constant expression outside the expression that " 242 "created the temporary">; 243def note_constexpr_access_unreadable_object : Note< 244 "%select{read of|read of|assignment to|increment of|decrement of|" 245 "member call on|dynamic_cast of|typeid applied to|construction of|" 246 "destruction of}0 " 247 "object '%1' whose value is not known">; 248def note_constexpr_access_deleted_object : Note< 249 "%select{read of|read of|assignment to|increment of|decrement of|" 250 "member call on|dynamic_cast of|typeid applied to|construction of|" 251 "destruction of}0 " 252 "heap allocated object that has been deleted">; 253def note_constexpr_modify_global : Note< 254 "a constant expression cannot modify an object that is visible outside " 255 "that expression">; 256def note_constexpr_stmt_expr_unsupported : Note< 257 "this use of statement expressions is not supported in a " 258 "constant expression">; 259def note_constexpr_calls_suppressed : Note< 260 "(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to " 261 "see all)">; 262def note_constexpr_call_here : Note<"in call to '%0'">; 263def note_constexpr_inherited_ctor_call_here : Note< 264 "in implicit initialization for inherited constructor of %0">; 265def note_constexpr_baa_insufficient_alignment : Note< 266 "%select{alignment of|offset of the aligned pointer from}0 the base pointee " 267 "object (%1 %plural{1:byte|:bytes}1) is %select{less than|not a multiple of}0 the " 268 "asserted %2 %plural{1:byte|:bytes}2">; 269def note_constexpr_baa_value_insufficient_alignment : Note< 270 "value of the aligned pointer (%0) is not a multiple of the asserted %1 " 271 "%plural{1:byte|:bytes}1">; 272def note_constexpr_invalid_alignment : Note< 273 "requested alignment %0 is not a positive power of two">; 274def note_constexpr_alignment_too_big : Note< 275 "requested alignment must be %0 or less for type %1; %2 is invalid">; 276def note_constexpr_alignment_compute : Note< 277 "cannot constant evaluate whether run-time alignment is at least %0">; 278def note_constexpr_alignment_adjust : Note< 279 "cannot constant evaluate the result of adjusting alignment to %0">; 280def note_constexpr_destroy_out_of_lifetime : Note< 281 "destroying object '%0' whose lifetime has already ended">; 282def note_constexpr_unsupported_destruction : Note< 283 "non-trivial destruction of type %0 in a constant expression is not supported">; 284def note_constexpr_unsupported_temporary_nontrivial_dtor : Note< 285 "non-trivial destruction of lifetime-extended temporary with type %0 " 286 "used in the result of a constant expression is not yet supported">; 287def note_constexpr_unsupported_unsized_array : Note< 288 "array-to-pointer decay of array member without known bound is not supported">; 289def note_constexpr_unsized_array_indexed : Note< 290 "indexing of array without known bound is not allowed " 291 "in a constant expression">; 292def note_constexpr_memcmp_unsupported : Note< 293 "constant evaluation of %0 between arrays of types %1 and %2 " 294 "is not supported; only arrays of narrow character types can be compared">; 295def note_constexpr_memchr_unsupported : Note< 296 "constant evaluation of %0 on array of type %1 " 297 "is not supported; only arrays of narrow character types can be searched">; 298def note_constexpr_memcpy_null : Note< 299 "%select{source|destination}2 of " 300 "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' " 301 "is %3">; 302def note_constexpr_memcpy_type_pun : Note< 303 "cannot constant evaluate '%select{memcpy|memmove}0' from object of " 304 "type %1 to object of type %2">; 305def note_constexpr_memcpy_nontrivial : Note< 306 "cannot constant evaluate '%select{memcpy|memmove}0' between objects of " 307 "non-trivially-copyable type %1">; 308def note_constexpr_memcpy_incomplete_type : Note< 309 "cannot constant evaluate '%select{memcpy|memmove}0' between objects of " 310 "incomplete type %1">; 311def note_constexpr_memcpy_overlap : Note< 312 "'%select{memcpy|wmemcpy}0' between overlapping memory regions">; 313def note_constexpr_memcpy_unsupported : Note< 314 "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' " 315 "not supported: %select{" 316 "size to copy (%4) is not a multiple of size of element type %3 (%5)|" 317 "source is not a contiguous array of at least %4 elements of type %3|" 318 "destination is not a contiguous array of at least %4 elements of type %3}2">; 319def note_constexpr_bit_cast_unsupported_type : Note< 320 "constexpr bit cast involving type %0 is not yet supported">; 321def note_constexpr_bit_cast_unsupported_bitfield : Note< 322 "constexpr bit_cast involving bit-field is not yet supported">; 323def note_constexpr_bit_cast_invalid_type : Note< 324 "bit_cast %select{from|to}0 a %select{|type with a }1" 325 "%select{union|pointer|member pointer|volatile|reference}2 " 326 "%select{type|member}1 is not allowed in a constant expression">; 327def note_constexpr_bit_cast_invalid_subtype : Note< 328 "invalid type %0 is a %select{member|base}1 of %2">; 329def note_constexpr_bit_cast_invalid_vector : Note< 330 "bit_cast involving type %0 is not allowed in a constant expression; " 331 "element size %1 * element count %2 is not a multiple of the byte size %3">; 332def note_constexpr_bit_cast_indet_dest : Note< 333 "indeterminate value can only initialize an object of type 'unsigned char'" 334 "%select{, 'char',|}1 or 'std::byte'; %0 is invalid">; 335def note_constexpr_bit_cast_unrepresentable_value : Note< 336 "value %1 cannot be represented in type %0">; 337def note_constexpr_pseudo_destructor : Note< 338 "pseudo-destructor call is not permitted in constant expressions " 339 "until C++20">; 340def note_constexpr_construct_complex_elem : Note< 341 "construction of individual component of complex number is not yet supported " 342 "in constant expressions">; 343def note_constexpr_destroy_complex_elem : Note< 344 "destruction of individual component of complex number is not yet supported " 345 "in constant expressions">; 346def note_constexpr_new : Note< 347 "dynamic memory allocation is not permitted in constant expressions " 348 "until C++20">; 349def note_constexpr_new_non_replaceable : Note< 350 "call to %select{placement|class-specific}0 %1">; 351def note_constexpr_new_placement : Note< 352 "this placement new expression is not yet supported in constant expressions">; 353def note_constexpr_placement_new_wrong_type : Note< 354 "placement new would change type of storage from %0 to %1">; 355def note_constexpr_new_negative : Note< 356 "cannot allocate array; evaluated array bound %0 is negative">; 357def note_constexpr_new_too_large : Note< 358 "cannot allocate array; evaluated array bound %0 is too large">; 359def note_constexpr_new_exceeds_limits : Note< 360 "cannot allocate array; evaluated array bound %0 exceeds the limit (%1); " 361 "use '-fconstexpr-steps' to increase this limit">; 362def note_constexpr_new_too_small : Note< 363 "cannot allocate array; evaluated array bound %0 is too small to hold " 364 "%1 explicitly initialized elements">; 365def note_constexpr_new_untyped : Note< 366 "cannot allocate untyped memory in a constant expression; " 367 "use 'std::allocator<T>::allocate' to allocate memory of type 'T'">; 368def note_constexpr_new_not_complete_object_type : Note< 369 "cannot allocate memory of %select{incomplete|function}0 type %1">; 370def note_constexpr_operator_new_bad_size : Note< 371 "allocated size %0 is not a multiple of size %1 of element type %2">; 372def note_constexpr_delete_not_heap_alloc : Note< 373 "delete of pointer '%0' that does not point to a heap-allocated object">; 374def note_constexpr_double_delete : Note< 375 "delete of pointer that has already been deleted">; 376def note_constexpr_double_destroy : Note< 377 "destruction of object that is already being destroyed">; 378def note_constexpr_new_delete_mismatch : Note< 379 "%plural{2:'delete' used to delete pointer to object " 380 "allocated with 'std::allocator<...>::allocate'|" 381 ":%select{non-array delete|array delete|'std::allocator<...>::deallocate'}0 " 382 "used to delete pointer to " 383 "%select{array object of type %2|non-array object of type %2|" 384 "object allocated with 'new'}0}1">; 385def note_constexpr_deallocate_null : Note< 386 "'std::allocator<...>::deallocate' used to delete a null pointer">; 387def note_constexpr_delete_subobject : Note< 388 "delete of pointer%select{ to subobject|}1 '%0' " 389 "%select{|that does not point to complete object}1">; 390def note_constexpr_delete_base_nonvirt_dtor : Note< 391 "delete of object with dynamic type %1 through pointer to " 392 "base class type %0 with non-virtual destructor">; 393def note_constexpr_memory_leak : Note< 394 "allocation performed here was not deallocated" 395 "%plural{0:|: (along with %0 other memory leak%s0)}0">; 396def note_constexpr_unsupported_layout : Note< 397 "type %0 has unexpected layout">; 398def note_constexpr_unsupported_flexible_array : Note< 399 "flexible array initialization is not yet supported">; 400def note_constexpr_non_const_vectorelements : Note< 401 "cannot determine number of elements for sizeless vectors in a constant expression">; 402def note_constexpr_assumption_failed : Note< 403 "assumption evaluated to false">; 404def err_experimental_clang_interp_failed : Error< 405 "the experimental clang interpreter failed to evaluate an expression">; 406 407def warn_integer_constant_overflow : Warning< 408 "overflow in expression; result is %0 with type %1">, 409 InGroup<DiagGroup<"integer-overflow">>; 410def warn_fixedpoint_constant_overflow : Warning< 411 "overflow in expression; result is %0 with type %1">, 412 InGroup<DiagGroup<"fixed-point-overflow">>; 413def warn_constexpr_unscoped_enum_out_of_range : Warning< 414 "integer value %0 is outside the valid range of values [%1, %2] for the " 415 "enumeration type %3">, DefaultError, ShowInSystemHeader, ShowInSystemMacro, 416 InGroup<DiagGroup<"enum-constexpr-conversion">>; 417 418// This is a temporary diagnostic, and shall be removed once our 419// implementation is complete, and like the preceding constexpr notes belongs 420// in Sema. 421def note_unimplemented_constexpr_lambda_feature_ast : Note< 422 "unimplemented constexpr lambda feature: %0 (coming soon!)">; 423 424def warn_is_constant_evaluated_always_true_constexpr : Warning< 425 "'%0' will always evaluate to 'true' in a manifestly constant-evaluated expression">, 426 InGroup<DiagGroup<"constant-evaluated">>; 427 428// inline asm related. 429let CategoryName = "Inline Assembly Issue" in { 430 def err_asm_invalid_escape : Error< 431 "invalid %% escape in inline assembly string">; 432 def err_asm_unknown_symbolic_operand_name : Error< 433 "unknown symbolic operand name in inline assembly string">; 434 435 def err_asm_unterminated_symbolic_operand_name : Error< 436 "unterminated symbolic operand name in inline assembly string">; 437 def err_asm_empty_symbolic_operand_name : Error< 438 "empty symbolic operand name in inline assembly string">; 439 def err_asm_invalid_operand_number : Error< 440 "invalid operand number in inline asm string">; 441} 442 443// vtable related. 444let CategoryName = "VTable ABI Issue" in { 445 def err_vftable_ambiguous_component : Error< 446 "ambiguous vftable component for %0 introduced via covariant thunks; " 447 "this is an inherent limitation of the ABI">; 448 def note_covariant_thunk : Note< 449 "covariant thunk required by %0">; 450} 451 452// Importing ASTs 453def err_odr_variable_type_inconsistent : Error< 454 "external variable %0 declared with incompatible types in different " 455 "translation units (%1 vs. %2)">; 456def warn_odr_variable_type_inconsistent : Warning< 457 "external variable %0 declared with incompatible types in different " 458 "translation units (%1 vs. %2)">, 459 InGroup<ODR>; 460def err_odr_variable_multiple_def : Error< 461 "external variable %0 defined in multiple translation units">; 462def warn_odr_variable_multiple_def : Warning< 463 "external variable %0 defined in multiple translation units">, 464 InGroup<ODR>; 465def note_odr_value_here : Note<"declared here with type %0">; 466def err_odr_function_type_inconsistent : Error< 467 "external function %0 declared with incompatible types in different " 468 "translation units (%1 vs. %2)">; 469def warn_odr_function_type_inconsistent : Warning< 470 "external function %0 declared with incompatible types in different " 471 "translation units (%1 vs. %2)">, 472 InGroup<ODR>; 473def err_odr_tag_type_inconsistent 474 : Error<"type %0 has incompatible definitions in different translation " 475 "units">; 476def warn_odr_tag_type_inconsistent 477 : Warning<"type %0 has incompatible definitions in different translation " 478 "units">, 479 InGroup<ODR>; 480def note_odr_tag_kind_here: Note< 481 "%0 is a %select{struct|interface|union|class|enum}1 here">; 482def note_odr_field : Note<"field %0 has type %1 here">; 483def note_odr_field_name : Note<"field has name %0 here">; 484def note_odr_missing_field : Note<"no corresponding field here">; 485def note_odr_base : Note<"class has base type %0">; 486def note_odr_virtual_base : Note< 487 "%select{non-virtual|virtual}0 derivation here">; 488def note_odr_missing_base : Note<"no corresponding base class here">; 489def note_odr_number_of_bases : Note< 490 "class has %0 base %plural{1:class|:classes}0">; 491def note_odr_enumerator : Note<"enumerator %0 with value %1 here">; 492def note_odr_missing_enumerator : Note<"no corresponding enumerator here">; 493def err_odr_field_type_inconsistent : Error< 494 "field %0 declared with incompatible types in different " 495 "translation units (%1 vs. %2)">; 496def warn_odr_field_type_inconsistent : Warning< 497 "field %0 declared with incompatible types in different " 498 "translation units (%1 vs. %2)">, 499 InGroup<ODR>; 500 501// Importing Objective-C ASTs 502def err_odr_ivar_type_inconsistent : Error< 503 "instance variable %0 declared with incompatible types in different " 504 "translation units (%1 vs. %2)">; 505def warn_odr_ivar_type_inconsistent : Warning< 506 "instance variable %0 declared with incompatible types in different " 507 "translation units (%1 vs. %2)">, 508 InGroup<ODR>; 509def err_odr_objc_superclass_inconsistent : Error< 510 "class %0 has incompatible superclasses">; 511def warn_odr_objc_superclass_inconsistent : Warning< 512 "class %0 has incompatible superclasses">, 513 InGroup<ODR>; 514def note_odr_objc_superclass : Note<"inherits from superclass %0 here">; 515def note_odr_objc_missing_superclass : Note<"no corresponding superclass here">; 516def err_odr_objc_method_result_type_inconsistent : Error< 517 "%select{class|instance}0 method %1 has incompatible result types in " 518 "different translation units (%2 vs. %3)">; 519def warn_odr_objc_method_result_type_inconsistent : Warning< 520 "%select{class|instance}0 method %1 has incompatible result types in " 521 "different translation units (%2 vs. %3)">, 522 InGroup<ODR>; 523def err_odr_objc_method_num_params_inconsistent : Error< 524 "%select{class|instance}0 method %1 has a different number of parameters in " 525 "different translation units (%2 vs. %3)">; 526def warn_odr_objc_method_num_params_inconsistent : Warning< 527 "%select{class|instance}0 method %1 has a different number of parameters in " 528 "different translation units (%2 vs. %3)">, 529 InGroup<ODR>; 530def err_odr_objc_method_param_type_inconsistent : Error< 531 "%select{class|instance}0 method %1 has a parameter with a different types " 532 "in different translation units (%2 vs. %3)">; 533def warn_odr_objc_method_param_type_inconsistent : Warning< 534 "%select{class|instance}0 method %1 has a parameter with a different types " 535 "in different translation units (%2 vs. %3)">, 536 InGroup<ODR>; 537def err_odr_objc_method_variadic_inconsistent : Error< 538 "%select{class|instance}0 method %1 is variadic in one translation unit " 539 "and not variadic in another">; 540def warn_odr_objc_method_variadic_inconsistent : Warning< 541 "%select{class|instance}0 method %1 is variadic in one translation unit " 542 "and not variadic in another">, 543 InGroup<ODR>; 544def note_odr_objc_method_here : Note< 545 "%select{class|instance}0 method %1 also declared here">; 546def err_odr_objc_property_type_inconsistent : Error< 547 "property %0 declared with incompatible types in different " 548 "translation units (%1 vs. %2)">; 549def warn_odr_objc_property_type_inconsistent : Warning< 550 "property %0 declared with incompatible types in different " 551 "translation units (%1 vs. %2)">, 552 InGroup<ODR>; 553def err_odr_objc_property_impl_kind_inconsistent : Error< 554 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one " 555 "translation but %select{@dynamic|@synthesize}1 in another translation unit">; 556def warn_odr_objc_property_impl_kind_inconsistent : Warning< 557 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one " 558 "translation but %select{@dynamic|@synthesize}1 in another translation unit">, 559 InGroup<ODR>; 560def note_odr_objc_property_impl_kind : Note< 561 "property %0 is implemented with %select{@synthesize|@dynamic}1 here">; 562def err_odr_objc_synthesize_ivar_inconsistent : Error< 563 "property %0 is synthesized to different ivars in different translation " 564 "units (%1 vs. %2)">; 565def warn_odr_objc_synthesize_ivar_inconsistent : Warning< 566 "property %0 is synthesized to different ivars in different translation " 567 "units (%1 vs. %2)">, 568 InGroup<ODR>; 569def note_odr_objc_synthesize_ivar_here : Note< 570 "property is synthesized to ivar %0 here">; 571 572// Importing C++ ASTs 573def note_odr_friend : Note<"friend declared here">; 574def note_odr_missing_friend : Note<"no corresponding friend here">; 575def err_odr_different_num_template_parameters : Error< 576 "template parameter lists have a different number of parameters (%0 vs %1)">; 577def warn_odr_different_num_template_parameters : Warning< 578 "template parameter lists have a different number of parameters (%0 vs %1)">, 579 InGroup<ODR>; 580def note_odr_template_parameter_list : Note< 581 "template parameter list also declared here">; 582def err_odr_different_template_parameter_kind : Error< 583 "template parameter has different kinds in different translation units">; 584def warn_odr_different_template_parameter_kind : Warning< 585 "template parameter has different kinds in different translation units">, 586 InGroup<ODR>; 587def note_odr_template_parameter_here : Note< 588 "template parameter declared here">; 589def err_odr_parameter_pack_non_pack : Error< 590 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">; 591def warn_odr_parameter_pack_non_pack : Warning< 592 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">, 593 InGroup<ODR>; 594def note_odr_parameter_pack_non_pack : Note< 595 "%select{parameter|parameter pack}0 declared here">; 596def err_odr_non_type_parameter_type_inconsistent : Error< 597 "non-type template parameter declared with incompatible types in different " 598 "translation units (%0 vs. %1)">; 599def warn_odr_non_type_parameter_type_inconsistent : Warning< 600 "non-type template parameter declared with incompatible types in different " 601 "translation units (%0 vs. %1)">, 602 InGroup<ODR>; 603def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">; 604 605// Compare ODR hashes 606def err_module_odr_violation_different_definitions : Error< 607 "%q0 has different definitions in different modules; " 608 "%select{definition in module '%2' is here|defined here}1">; 609def note_first_module_difference : Note< 610 "in first definition, possible difference is here">; 611def note_module_odr_violation_different_definitions : Note< 612 "definition in module '%0' is here">; 613def note_second_module_difference : Note< 614 "in second definition, possible difference is here">; 615 616def err_module_odr_violation_definition_data : Error < 617 "%q0 has different definitions in different modules; first difference is " 618 "%select{definition in module '%2'|defined here}1 found " 619 "%select{" 620 "%4 base %plural{1:class|:classes}4|" 621 "%4 virtual base %plural{1:class|:classes}4|" 622 "%ordinal4 base class with type %5|" 623 "%ordinal4 %select{non-virtual|virtual}5 base class %6|" 624 "%ordinal4 base class %5 with " 625 "%select{public|protected|private|no}6 access specifier}3">; 626 627def note_module_odr_violation_definition_data : Note < 628 "but in '%0' found " 629 "%select{" 630 "%2 base %plural{1:class|:classes}2|" 631 "%2 virtual base %plural{1:class|:classes}2|" 632 "%ordinal2 base class with different type %3|" 633 "%ordinal2 %select{non-virtual|virtual}3 base class %4|" 634 "%ordinal2 base class %3 with " 635 "%select{public|protected|private|no}4 access specifier}1">; 636 637def err_module_odr_violation_objc_interface : Error < 638 "%0 has different definitions in different modules; first difference is " 639 "%select{definition in module '%2'|defined here}1 found " 640 "%select{" 641 "%select{no super class|super class with type %5}4|" 642 "instance variable '%4' access control is " 643 "%select{|@private|@protected|@public|@package}5" 644 "}3">; 645def note_module_odr_violation_objc_interface : Note < 646 "but in %select{'%1'|definition here}0 found " 647 "%select{" 648 "%select{no super class|super class with type %4}3|" 649 "instance variable '%3' access control is " 650 "%select{|@private|@protected|@public|@package}4" 651 "}2">; 652 653def err_module_odr_violation_template_parameter : Error < 654 "%q0 has different definitions in different modules; first difference is " 655 "%select{definition in module '%2'|defined here}1 found " 656 "%select{" 657 "unnamed template parameter|" 658 "template parameter %5|" 659 "template parameter with %select{no |}4default argument|" 660 "template parameter with default argument}3">; 661 662def note_module_odr_violation_template_parameter : Note < 663 "but in '%0' found " 664 "%select{" 665 "unnamed template parameter %2|" 666 "template parameter %3|" 667 "template parameter with %select{no |}2default argument|" 668 "template parameter with different default argument}1">; 669 670def err_module_odr_violation_mismatch_decl : Error< 671 "%q0 has different definitions in different modules; first difference is " 672 "%select{definition in module '%2'|defined here}1 found " 673 "%select{end of class|public access specifier|private access specifier|" 674 "protected access specifier|static assert|field|method|type alias|typedef|" 675 "data member|friend declaration|function template|method|instance variable|" 676 "property}3">; 677def note_module_odr_violation_mismatch_decl : Note< 678 "but in %select{'%1'|definition here}0 found " 679 "%select{end of class|public access specifier|private access specifier|" 680 "protected access specifier|static assert|field|method|type alias|typedef|" 681 "data member|friend declaration|function template|method|instance variable|" 682 "property}2">; 683 684def err_module_odr_violation_record : Error< 685 "%q0 has different definitions in different modules; first difference is " 686 "%select{definition in module '%2'|defined here}1 found " 687 "%select{" 688 "static assert with condition|" 689 "static assert with message|" 690 "static assert with %select{|no }4message|" 691 "%select{method %5|constructor|destructor}4|" 692 "%select{method %5|constructor|destructor}4 " 693 "is %select{not deleted|deleted}6|" 694 "%select{method %5|constructor|destructor}4 " 695 "is %select{not defaulted|defaulted}6|" 696 "%select{method %5|constructor|destructor}4 " 697 "is %select{|pure }6%select{not virtual|virtual}7|" 698 "%select{method %5|constructor|destructor}4 " 699 "is %select{not static|static}6|" 700 "%select{method %5|constructor|destructor}4 " 701 "is %select{not volatile|volatile}6|" 702 "%select{method %5|constructor|destructor}4 " 703 "is %select{not const|const}6|" 704 "%select{method %5|constructor|destructor}4 " 705 "is %select{not inline|inline}6|" 706 "%select{method %5|constructor|destructor}4 " 707 "with %ordinal6 parameter with%select{out|}7 a default argument|" 708 "%select{method %5|constructor|destructor}4 " 709 "with %ordinal6 parameter with a default argument|" 710 "%select{method %5|constructor|destructor}4 " 711 "with %select{no |}6template arguments|" 712 "%select{method %5|constructor|destructor}4 " 713 "with %6 template argument%s6|" 714 "%select{method %5|constructor|destructor}4 " 715 "with %6 for %ordinal7 template argument|" 716 "%select{method %5|constructor|destructor}4 " 717 "with %select{no body|body}6|" 718 "%select{method %5|constructor|destructor}4 " 719 "with body|" 720 "friend %select{class|function}4|" 721 "friend %4|" 722 "friend function %4|" 723 "function template %4 with %5 template parameter%s5|" 724 "function template %4 with %ordinal5 template parameter being a " 725 "%select{type|non-type|template}6 template parameter|" 726 "function template %4 with %ordinal5 template parameter " 727 "%select{with no name|named %7}6|" 728 "function template %4 with %ordinal5 template parameter with " 729 "%select{no |}6default argument|" 730 "function template %4 with %ordinal5 template parameter with " 731 "default argument %6|" 732 "function template %4 with %ordinal5 template parameter with one type|" 733 "function template %4 with %ordinal5 template parameter %select{not |}6" 734 "being a template parameter pack|" 735 "}3">; 736 737def note_module_odr_violation_record : Note<"but in '%0' found " 738 "%select{" 739 "static assert with different condition|" 740 "static assert with different message|" 741 "static assert with %select{|no }2message|" 742 "%select{method %3|constructor|destructor}2|" 743 "%select{method %3|constructor|destructor}2 " 744 "is %select{not deleted|deleted}4|" 745 "%select{method %3|constructor|destructor}2 " 746 "is %select{not defaulted|defaulted}4|" 747 "%select{method %3|constructor|destructor}2 " 748 "is %select{|pure }4%select{not virtual|virtual}5|" 749 "%select{method %3|constructor|destructor}2 " 750 "is %select{not static|static}4|" 751 "%select{method %3|constructor|destructor}2 " 752 "is %select{not volatile|volatile}4|" 753 "%select{method %3|constructor|destructor}2 " 754 "is %select{not const|const}4|" 755 "%select{method %3|constructor|destructor}2 " 756 "is %select{not inline|inline}4|" 757 "%select{method %3|constructor|destructor}2 " 758 "with %ordinal4 parameter with%select{out|}5 a default argument|" 759 "%select{method %3|constructor|destructor}2 " 760 "with %ordinal4 parameter with a different default argument|" 761 "%select{method %3|constructor|destructor}2 " 762 "with %select{no |}4template arguments|" 763 "%select{method %3|constructor|destructor}2 " 764 "with %4 template argument%s4|" 765 "%select{method %3|constructor|destructor}2 " 766 "with %4 for %ordinal5 template argument|" 767 "%select{method %3|constructor|destructor}2 " 768 "with %select{no body|body}4|" 769 "%select{method %3|constructor|destructor}2 " 770 "with different body|" 771 "friend %select{class|function}2|" 772 "friend %2|" 773 "friend function %2|" 774 "function template %2 with %3 template parameter%s3|" 775 "function template %2 with %ordinal3 template paramter being a " 776 "%select{type|non-type|template}4 template parameter|" 777 "function template %2 with %ordinal3 template parameter " 778 "%select{with no name|named %5}4|" 779 "function template %2 with %ordinal3 template parameter with " 780 "%select{no |}4default argument|" 781 "function template %2 with %ordinal3 template parameter with " 782 "default argument %4|" 783 "function template %2 with %ordinal3 template parameter with different type|" 784 "function template %2 with %ordinal3 template parameter %select{not |}4" 785 "being a template parameter pack|" 786 "}1">; 787 788def err_module_odr_violation_field : Error< 789 "%q0 has different definitions in different modules; first difference is " 790 "%select{definition in module '%2'|defined here}1 found " 791 "%select{" 792 "field %4|" 793 "field %4 with type %5|" 794 "%select{non-|}5bitfield %4|" 795 "bitfield %4 with one width expression|" 796 "%select{non-|}5mutable field %4|" 797 "field %4 with %select{no|an}5 initializer|" 798 "field %4 with an initializer" 799 "}3">; 800def note_module_odr_violation_field : Note< 801 "but in %select{'%1'|definition here}0 found " 802 "%select{" 803 "field %3|" 804 "field %3 with type %4|" 805 "%select{non-|}4bitfield %3|" 806 "bitfield %3 with different width expression|" 807 "%select{non-|}4mutable field %3|" 808 "field %3 with %select{no|an}4 initializer|" 809 "field %3 with a different initializer" 810 "}2">; 811 812def err_module_odr_violation_typedef : Error< 813 "%q0 has different definitions in different modules; first difference is " 814 "%select{definition in module '%2'|defined here}1 found " 815 "%select{" 816 "%select{typedef|type alias}4 name %5|" 817 "%select{typedef|type alias}4 %5 with underlying type %6" 818 "}3">; 819def note_module_odr_violation_typedef : Note<"but in '%0' found " 820 "%select{" 821 "%select{typedef|type alias}2 name %3|" 822 "%select{typedef|type alias}2 %3 with different underlying type %4" 823 "}1">; 824 825def err_module_odr_violation_variable : Error< 826 "%q0 has different definitions in different modules; first difference is " 827 "%select{definition in module '%2'|defined here}1 found " 828 "%select{" 829 "data member with name %4|" 830 "data member %4 with type %5|" 831 "data member %4 with%select{out|}5 an initializer|" 832 "data member %4 with an initializer|" 833 "data member %4 %select{is constexpr|is not constexpr}5" 834 "}3">; 835def note_module_odr_violation_variable : Note<"but in '%0' found " 836 "%select{" 837 "data member with name %2|" 838 "data member %2 with different type %3|" 839 "data member %2 with%select{out|}3 an initializer|" 840 "data member %2 with a different initializer|" 841 "data member %2 %select{is constexpr|is not constexpr}3" 842 "}1">; 843 844def err_module_odr_violation_function : Error< 845 "%q0 has different definitions in different modules; " 846 "%select{definition in module '%2'|defined here}1 " 847 "first difference is " 848 "%select{" 849 "return type is %4|" 850 "%ordinal4 parameter with name %5|" 851 "%ordinal4 parameter with type %5%select{| decayed from %7}6|" 852 "%ordinal4 parameter with%select{out|}5 a default argument|" 853 "%ordinal4 parameter with a default argument|" 854 "function body" 855 "}3">; 856 857def note_module_odr_violation_function : Note<"but in '%0' found " 858 "%select{" 859 "different return type %2|" 860 "%ordinal2 parameter with name %3|" 861 "%ordinal2 parameter with type %3%select{| decayed from %5}4|" 862 "%ordinal2 parameter with%select{out|}3 a default argument|" 863 "%ordinal2 parameter with a different default argument|" 864 "a different body" 865 "}1">; 866 867def err_module_odr_violation_enum : Error< 868 "%q0 has different definitions in different modules; " 869 "%select{definition in module '%2'|defined here}1 " 870 "first difference is " 871 "%select{" 872 "enum that is %select{not scoped|scoped}4|" 873 "enum scoped with keyword %select{struct|class}4|" 874 "enum %select{without|with}4 specified type|" 875 "enum with specified type %4|" 876 "enum with %4 element%s4|" 877 "%ordinal4 element has name %5|" 878 "%ordinal4 element %5 %select{has|does not have}6 an initializer|" 879 "%ordinal4 element %5 has an initializer|" 880 "}3">; 881 882def note_module_odr_violation_enum : Note<"but in '%0' found " 883 "%select{" 884 "enum that is %select{not scoped|scoped}2|" 885 "enum scoped with keyword %select{struct|class}2|" 886 "enum %select{without|with}2 specified type|" 887 "enum with specified type %2|" 888 "enum with %2 element%s2|" 889 "%ordinal2 element has name %3|" 890 "%ordinal2 element %3 %select{has|does not have}4 an initializer|" 891 "%ordinal2 element %3 has different initializer|" 892 "}1">; 893 894def err_module_odr_violation_referenced_protocols : Error < 895 "%q0 has different definitions in different modules; first difference is " 896 "%select{definition in module '%2'|defined here}1 found " 897 "%select{" 898 "%4 referenced %plural{1:protocol|:protocols}4|" 899 "%ordinal4 referenced protocol with name %5" 900 "}3">; 901def note_module_odr_violation_referenced_protocols : Note < 902 "but in %select{'%1'|definition here}0 found " 903 "%select{" 904 "%3 referenced %plural{1:protocol|:protocols}3|" 905 "%ordinal3 referenced protocol with different name %4" 906 "}2">; 907 908def err_module_odr_violation_objc_method : Error< 909 "%q0 has different definitions in different modules; first difference is " 910 "%select{definition in module '%2'|defined here}1 found " 911 "%select{" 912 "method %4 with return type %5|" 913 "%select{class|instance}5 method %4|" 914 "%select{no|'required'|'optional'}4 method control|" 915 "method %4 with %select{no designated initializer|designated initializer}5|" 916 "%select{regular|direct}5 method %4|" 917 "method %4" 918 "}3">; 919def note_module_odr_violation_objc_method : Note< 920 "but in %select{'%1'|definition here}0 found " 921 "%select{" 922 "method %3 with different return type %4|" 923 "method %3 as %select{class|instance}4 method|" 924 "%select{no|'required'|'optional'}3 method control|" 925 "method %3 with %select{no designated initializer|designated initializer}4|" 926 "%select{regular|direct}4 method %3|" 927 "different method %3" 928 "}2">; 929 930def err_module_odr_violation_method_params : Error< 931 "%q0 has different definitions in different modules; first difference is " 932 "%select{definition in module '%2'|defined here}1 found " 933 "%select{" 934 "%select{method %5|constructor|destructor}4 " 935 "that has %6 parameter%s6|" 936 "%select{method %5|constructor|destructor}4 " 937 "with %ordinal6 parameter of type %7%select{| decayed from %9}8|" 938 "%select{method %5|constructor|destructor}4 " 939 "with %ordinal6 parameter named %7" 940 "}3">; 941def note_module_odr_violation_method_params : Note< 942 "but in %select{'%1'|definition here}0 found " 943 "%select{" 944 "%select{method %4|constructor|destructor}3 " 945 "that has %5 parameter%s5|" 946 "%select{method %4|constructor|destructor}3 " 947 "with %ordinal5 parameter of type %6%select{| decayed from %8}7|" 948 "%select{method %4|constructor|destructor}3 " 949 "with %ordinal5 parameter named %6" 950 "}2">; 951 952def err_module_odr_violation_objc_property : Error< 953 "%q0 has different definitions in different modules; first difference is " 954 "%select{definition in module '%2'|defined here}1 found " 955 "%select{" 956 "property %4|" 957 "property %4 with type %5|" 958 "%select{no|'required'|'optional'}4 property control|" 959 "property %4 with %select{default |}6'%select{none|readonly|getter|assign|" 960 "readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|" 961 "unsafe_unretained|nullability|null_resettable|class|direct}5' attribute" 962 "}3">; 963def note_module_odr_violation_objc_property : Note< 964 "but in %select{'%1'|definition here}0 found " 965 "%select{" 966 "property %3|" 967 "property %3 with type %4|" 968 "%select{no|'required'|'optional'}3 property control|" 969 "property %3 with different '%select{none|readonly|getter|assign|" 970 "readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|" 971 "unsafe_unretained|nullability|null_resettable|class|direct}4' attribute" 972 "}2">; 973 974def err_module_odr_violation_mismatch_decl_unknown : Error< 975 "%q0 %select{with definition in module '%2'|defined here}1 has different " 976 "definitions in different modules; first difference is this " 977 "%select{||||static assert|field|method|type alias|typedef|data member|" 978 "friend declaration|function template|method|instance variable|" 979 "property|unexpected decl}3">; 980def note_module_odr_violation_mismatch_decl_unknown : Note< 981 "but in %select{'%1'|definition here}0 found " 982 "%select{||||different static assert|different field|different method|" 983 "different type alias|different typedef|different data member|" 984 "different friend declaration|different function template|different method|" 985 "different instance variable|different property|another unexpected decl}2">; 986 987 988def remark_sanitize_address_insert_extra_padding_accepted : Remark< 989 "-fsanitize-address-field-padding applied to %0">, ShowInSystemHeader, 990 InGroup<SanitizeAddressRemarks>; 991def remark_sanitize_address_insert_extra_padding_rejected : Remark< 992 "-fsanitize-address-field-padding ignored for %0 because it " 993 "%select{is not C++|is packed|is a union|is trivially copyable|" 994 "has trivial destructor|is standard layout|is in a ignorelisted file|" 995 "is ignorelisted}1">, ShowInSystemHeader, 996 InGroup<SanitizeAddressRemarks>; 997 998def warn_npot_ms_struct : Warning< 999 "ms_struct may not produce Microsoft-compatible layouts with fundamental " 1000 "data types with sizes that aren't a power of two">, 1001 DefaultError, InGroup<IncompatibleMSStruct>; 1002 1003// -Wpadded-bitfield 1004def warn_padded_struct_bitfield : Warning< 1005 "padding %select{struct|interface|class}0 %1 with %2 " 1006 "%select{byte|bit}3%s2 to align %4">, 1007 InGroup<PaddedBitField>, DefaultIgnore; 1008def warn_padded_struct_anon_bitfield : Warning< 1009 "padding %select{struct|interface|class}0 %1 with %2 " 1010 "%select{byte|bit}3%s2 to align anonymous bit-field">, 1011 InGroup<PaddedBitField>, DefaultIgnore; 1012 1013// -Wpadded, -Wpacked 1014def warn_padded_struct_field : Warning< 1015 "padding %select{struct|interface|class}0 %1 with %2 " 1016 "%select{byte|bit}3%s2 to align %4">, 1017 InGroup<Padded>, DefaultIgnore; 1018def warn_padded_struct_anon_field : Warning< 1019 "padding %select{struct|interface|class}0 %1 with %2 " 1020 "%select{byte|bit}3%s2 to align anonymous field">, 1021 InGroup<Padded>, DefaultIgnore; 1022def warn_padded_struct_size : Warning< 1023 "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">, 1024 InGroup<Padded>, DefaultIgnore; 1025def warn_unnecessary_packed : Warning< 1026 "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore; 1027def warn_unpacked_field 1028 : Warning< 1029 "not packing field %0 as it is non-POD for the purposes of layout">, 1030 InGroup<PackedNonPod>, 1031 DefaultIgnore; 1032 1033// -Wunaligned-access 1034def warn_unaligned_access : Warning< 1035 "field %1 within %0 is less aligned than %2 and is usually due to %0 being " 1036 "packed, which can lead to unaligned accesses">, InGroup<UnalignedAccess>, DefaultIgnore; 1037} 1038