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 err_experimental_clang_interp_failed : Error< 403 "the experimental clang interpreter failed to evaluate an expression">; 404 405def warn_integer_constant_overflow : Warning< 406 "overflow in expression; result is %0 with type %1">, 407 InGroup<DiagGroup<"integer-overflow">>; 408def warn_fixedpoint_constant_overflow : Warning< 409 "overflow in expression; result is %0 with type %1">, 410 InGroup<DiagGroup<"fixed-point-overflow">>; 411def warn_constexpr_unscoped_enum_out_of_range : Warning< 412 "integer value %0 is outside the valid range of values [%1, %2] for the " 413 "enumeration type %3">, DefaultError, ShowInSystemHeader, ShowInSystemMacro, 414 InGroup<DiagGroup<"enum-constexpr-conversion">>; 415 416// This is a temporary diagnostic, and shall be removed once our 417// implementation is complete, and like the preceding constexpr notes belongs 418// in Sema. 419def note_unimplemented_constexpr_lambda_feature_ast : Note< 420 "unimplemented constexpr lambda feature: %0 (coming soon!)">; 421 422def warn_is_constant_evaluated_always_true_constexpr : Warning< 423 "'%0' will always evaluate to 'true' in a manifestly constant-evaluated expression">, 424 InGroup<DiagGroup<"constant-evaluated">>; 425 426// inline asm related. 427let CategoryName = "Inline Assembly Issue" in { 428 def err_asm_invalid_escape : Error< 429 "invalid %% escape in inline assembly string">; 430 def err_asm_unknown_symbolic_operand_name : Error< 431 "unknown symbolic operand name in inline assembly string">; 432 433 def err_asm_unterminated_symbolic_operand_name : Error< 434 "unterminated symbolic operand name in inline assembly string">; 435 def err_asm_empty_symbolic_operand_name : Error< 436 "empty symbolic operand name in inline assembly string">; 437 def err_asm_invalid_operand_number : Error< 438 "invalid operand number in inline asm string">; 439} 440 441// vtable related. 442let CategoryName = "VTable ABI Issue" in { 443 def err_vftable_ambiguous_component : Error< 444 "ambiguous vftable component for %0 introduced via covariant thunks; " 445 "this is an inherent limitation of the ABI">; 446 def note_covariant_thunk : Note< 447 "covariant thunk required by %0">; 448} 449 450// Importing ASTs 451def err_odr_variable_type_inconsistent : Error< 452 "external variable %0 declared with incompatible types in different " 453 "translation units (%1 vs. %2)">; 454def warn_odr_variable_type_inconsistent : Warning< 455 "external variable %0 declared with incompatible types in different " 456 "translation units (%1 vs. %2)">, 457 InGroup<ODR>; 458def err_odr_variable_multiple_def : Error< 459 "external variable %0 defined in multiple translation units">; 460def warn_odr_variable_multiple_def : Warning< 461 "external variable %0 defined in multiple translation units">, 462 InGroup<ODR>; 463def note_odr_value_here : Note<"declared here with type %0">; 464def err_odr_function_type_inconsistent : Error< 465 "external function %0 declared with incompatible types in different " 466 "translation units (%1 vs. %2)">; 467def warn_odr_function_type_inconsistent : Warning< 468 "external function %0 declared with incompatible types in different " 469 "translation units (%1 vs. %2)">, 470 InGroup<ODR>; 471def err_odr_tag_type_inconsistent 472 : Error<"type %0 has incompatible definitions in different translation " 473 "units">; 474def warn_odr_tag_type_inconsistent 475 : Warning<"type %0 has incompatible definitions in different translation " 476 "units">, 477 InGroup<ODR>; 478def note_odr_tag_kind_here: Note< 479 "%0 is a %select{struct|interface|union|class|enum}1 here">; 480def note_odr_field : Note<"field %0 has type %1 here">; 481def note_odr_field_name : Note<"field has name %0 here">; 482def note_odr_missing_field : Note<"no corresponding field here">; 483def note_odr_base : Note<"class has base type %0">; 484def note_odr_virtual_base : Note< 485 "%select{non-virtual|virtual}0 derivation here">; 486def note_odr_missing_base : Note<"no corresponding base class here">; 487def note_odr_number_of_bases : Note< 488 "class has %0 base %plural{1:class|:classes}0">; 489def note_odr_enumerator : Note<"enumerator %0 with value %1 here">; 490def note_odr_missing_enumerator : Note<"no corresponding enumerator here">; 491def err_odr_field_type_inconsistent : Error< 492 "field %0 declared with incompatible types in different " 493 "translation units (%1 vs. %2)">; 494def warn_odr_field_type_inconsistent : Warning< 495 "field %0 declared with incompatible types in different " 496 "translation units (%1 vs. %2)">, 497 InGroup<ODR>; 498 499// Importing Objective-C ASTs 500def err_odr_ivar_type_inconsistent : Error< 501 "instance variable %0 declared with incompatible types in different " 502 "translation units (%1 vs. %2)">; 503def warn_odr_ivar_type_inconsistent : Warning< 504 "instance variable %0 declared with incompatible types in different " 505 "translation units (%1 vs. %2)">, 506 InGroup<ODR>; 507def err_odr_objc_superclass_inconsistent : Error< 508 "class %0 has incompatible superclasses">; 509def warn_odr_objc_superclass_inconsistent : Warning< 510 "class %0 has incompatible superclasses">, 511 InGroup<ODR>; 512def note_odr_objc_superclass : Note<"inherits from superclass %0 here">; 513def note_odr_objc_missing_superclass : Note<"no corresponding superclass here">; 514def err_odr_objc_method_result_type_inconsistent : Error< 515 "%select{class|instance}0 method %1 has incompatible result types in " 516 "different translation units (%2 vs. %3)">; 517def warn_odr_objc_method_result_type_inconsistent : Warning< 518 "%select{class|instance}0 method %1 has incompatible result types in " 519 "different translation units (%2 vs. %3)">, 520 InGroup<ODR>; 521def err_odr_objc_method_num_params_inconsistent : Error< 522 "%select{class|instance}0 method %1 has a different number of parameters in " 523 "different translation units (%2 vs. %3)">; 524def warn_odr_objc_method_num_params_inconsistent : Warning< 525 "%select{class|instance}0 method %1 has a different number of parameters in " 526 "different translation units (%2 vs. %3)">, 527 InGroup<ODR>; 528def err_odr_objc_method_param_type_inconsistent : Error< 529 "%select{class|instance}0 method %1 has a parameter with a different types " 530 "in different translation units (%2 vs. %3)">; 531def warn_odr_objc_method_param_type_inconsistent : Warning< 532 "%select{class|instance}0 method %1 has a parameter with a different types " 533 "in different translation units (%2 vs. %3)">, 534 InGroup<ODR>; 535def err_odr_objc_method_variadic_inconsistent : Error< 536 "%select{class|instance}0 method %1 is variadic in one translation unit " 537 "and not variadic in another">; 538def warn_odr_objc_method_variadic_inconsistent : Warning< 539 "%select{class|instance}0 method %1 is variadic in one translation unit " 540 "and not variadic in another">, 541 InGroup<ODR>; 542def note_odr_objc_method_here : Note< 543 "%select{class|instance}0 method %1 also declared here">; 544def err_odr_objc_property_type_inconsistent : Error< 545 "property %0 declared with incompatible types in different " 546 "translation units (%1 vs. %2)">; 547def warn_odr_objc_property_type_inconsistent : Warning< 548 "property %0 declared with incompatible types in different " 549 "translation units (%1 vs. %2)">, 550 InGroup<ODR>; 551def err_odr_objc_property_impl_kind_inconsistent : Error< 552 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one " 553 "translation but %select{@dynamic|@synthesize}1 in another translation unit">; 554def warn_odr_objc_property_impl_kind_inconsistent : Warning< 555 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one " 556 "translation but %select{@dynamic|@synthesize}1 in another translation unit">, 557 InGroup<ODR>; 558def note_odr_objc_property_impl_kind : Note< 559 "property %0 is implemented with %select{@synthesize|@dynamic}1 here">; 560def err_odr_objc_synthesize_ivar_inconsistent : Error< 561 "property %0 is synthesized to different ivars in different translation " 562 "units (%1 vs. %2)">; 563def warn_odr_objc_synthesize_ivar_inconsistent : Warning< 564 "property %0 is synthesized to different ivars in different translation " 565 "units (%1 vs. %2)">, 566 InGroup<ODR>; 567def note_odr_objc_synthesize_ivar_here : Note< 568 "property is synthesized to ivar %0 here">; 569 570// Importing C++ ASTs 571def note_odr_friend : Note<"friend declared here">; 572def note_odr_missing_friend : Note<"no corresponding friend here">; 573def err_odr_different_num_template_parameters : Error< 574 "template parameter lists have a different number of parameters (%0 vs %1)">; 575def warn_odr_different_num_template_parameters : Warning< 576 "template parameter lists have a different number of parameters (%0 vs %1)">, 577 InGroup<ODR>; 578def note_odr_template_parameter_list : Note< 579 "template parameter list also declared here">; 580def err_odr_different_template_parameter_kind : Error< 581 "template parameter has different kinds in different translation units">; 582def warn_odr_different_template_parameter_kind : Warning< 583 "template parameter has different kinds in different translation units">, 584 InGroup<ODR>; 585def note_odr_template_parameter_here : Note< 586 "template parameter declared here">; 587def err_odr_parameter_pack_non_pack : Error< 588 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">; 589def warn_odr_parameter_pack_non_pack : Warning< 590 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">, 591 InGroup<ODR>; 592def note_odr_parameter_pack_non_pack : Note< 593 "%select{parameter|parameter pack}0 declared here">; 594def err_odr_non_type_parameter_type_inconsistent : Error< 595 "non-type template parameter declared with incompatible types in different " 596 "translation units (%0 vs. %1)">; 597def warn_odr_non_type_parameter_type_inconsistent : Warning< 598 "non-type template parameter declared with incompatible types in different " 599 "translation units (%0 vs. %1)">, 600 InGroup<ODR>; 601def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">; 602 603// Compare ODR hashes 604def err_module_odr_violation_different_definitions : Error< 605 "%q0 has different definitions in different modules; " 606 "%select{definition in module '%2' is here|defined here}1">; 607def note_first_module_difference : Note< 608 "in first definition, possible difference is here">; 609def note_module_odr_violation_different_definitions : Note< 610 "definition in module '%0' is here">; 611def note_second_module_difference : Note< 612 "in second definition, possible difference is here">; 613 614def err_module_odr_violation_definition_data : Error < 615 "%q0 has different definitions in different modules; first difference is " 616 "%select{definition in module '%2'|defined here}1 found " 617 "%select{" 618 "%4 base %plural{1:class|:classes}4|" 619 "%4 virtual base %plural{1:class|:classes}4|" 620 "%ordinal4 base class with type %5|" 621 "%ordinal4 %select{non-virtual|virtual}5 base class %6|" 622 "%ordinal4 base class %5 with " 623 "%select{public|protected|private|no}6 access specifier}3">; 624 625def note_module_odr_violation_definition_data : Note < 626 "but in '%0' found " 627 "%select{" 628 "%2 base %plural{1:class|:classes}2|" 629 "%2 virtual base %plural{1:class|:classes}2|" 630 "%ordinal2 base class with different type %3|" 631 "%ordinal2 %select{non-virtual|virtual}3 base class %4|" 632 "%ordinal2 base class %3 with " 633 "%select{public|protected|private|no}4 access specifier}1">; 634 635def err_module_odr_violation_objc_interface : Error < 636 "%0 has different definitions in different modules; first difference is " 637 "%select{definition in module '%2'|defined here}1 found " 638 "%select{" 639 "%select{no super class|super class with type %5}4|" 640 "instance variable '%4' access control is " 641 "%select{|@private|@protected|@public|@package}5" 642 "}3">; 643def note_module_odr_violation_objc_interface : Note < 644 "but in %select{'%1'|definition here}0 found " 645 "%select{" 646 "%select{no super class|super class with type %4}3|" 647 "instance variable '%3' access control is " 648 "%select{|@private|@protected|@public|@package}4" 649 "}2">; 650 651def err_module_odr_violation_template_parameter : Error < 652 "%q0 has different definitions in different modules; first difference is " 653 "%select{definition in module '%2'|defined here}1 found " 654 "%select{" 655 "unnamed template parameter|" 656 "template parameter %5|" 657 "template parameter with %select{no |}4default argument|" 658 "template parameter with default argument}3">; 659 660def note_module_odr_violation_template_parameter : Note < 661 "but in '%0' found " 662 "%select{" 663 "unnamed template parameter %2|" 664 "template parameter %3|" 665 "template parameter with %select{no |}2default argument|" 666 "template parameter with different default argument}1">; 667 668def err_module_odr_violation_mismatch_decl : Error< 669 "%q0 has different definitions in different modules; first difference is " 670 "%select{definition in module '%2'|defined here}1 found " 671 "%select{end of class|public access specifier|private access specifier|" 672 "protected access specifier|static assert|field|method|type alias|typedef|" 673 "data member|friend declaration|function template|method|instance variable|" 674 "property}3">; 675def note_module_odr_violation_mismatch_decl : Note< 676 "but in %select{'%1'|definition here}0 found " 677 "%select{end of class|public access specifier|private access specifier|" 678 "protected access specifier|static assert|field|method|type alias|typedef|" 679 "data member|friend declaration|function template|method|instance variable|" 680 "property}2">; 681 682def err_module_odr_violation_record : Error< 683 "%q0 has different definitions in different modules; first difference is " 684 "%select{definition in module '%2'|defined here}1 found " 685 "%select{" 686 "static assert with condition|" 687 "static assert with message|" 688 "static assert with %select{|no }4message|" 689 "%select{method %5|constructor|destructor}4|" 690 "%select{method %5|constructor|destructor}4 " 691 "is %select{not deleted|deleted}6|" 692 "%select{method %5|constructor|destructor}4 " 693 "is %select{not defaulted|defaulted}6|" 694 "%select{method %5|constructor|destructor}4 " 695 "is %select{|pure }6%select{not virtual|virtual}7|" 696 "%select{method %5|constructor|destructor}4 " 697 "is %select{not static|static}6|" 698 "%select{method %5|constructor|destructor}4 " 699 "is %select{not volatile|volatile}6|" 700 "%select{method %5|constructor|destructor}4 " 701 "is %select{not const|const}6|" 702 "%select{method %5|constructor|destructor}4 " 703 "is %select{not inline|inline}6|" 704 "%select{method %5|constructor|destructor}4 " 705 "with %ordinal6 parameter with%select{out|}7 a default argument|" 706 "%select{method %5|constructor|destructor}4 " 707 "with %ordinal6 parameter with a default argument|" 708 "%select{method %5|constructor|destructor}4 " 709 "with %select{no |}6template arguments|" 710 "%select{method %5|constructor|destructor}4 " 711 "with %6 template argument%s6|" 712 "%select{method %5|constructor|destructor}4 " 713 "with %6 for %ordinal7 template argument|" 714 "%select{method %5|constructor|destructor}4 " 715 "with %select{no body|body}6|" 716 "%select{method %5|constructor|destructor}4 " 717 "with body|" 718 "friend %select{class|function}4|" 719 "friend %4|" 720 "friend function %4|" 721 "function template %4 with %5 template parameter%s5|" 722 "function template %4 with %ordinal5 template parameter being a " 723 "%select{type|non-type|template}6 template parameter|" 724 "function template %4 with %ordinal5 template parameter " 725 "%select{with no name|named %7}6|" 726 "function template %4 with %ordinal5 template parameter with " 727 "%select{no |}6default argument|" 728 "function template %4 with %ordinal5 template parameter with " 729 "default argument %6|" 730 "function template %4 with %ordinal5 template parameter with one type|" 731 "function template %4 with %ordinal5 template parameter %select{not |}6" 732 "being a template parameter pack|" 733 "}3">; 734 735def note_module_odr_violation_record : Note<"but in '%0' found " 736 "%select{" 737 "static assert with different condition|" 738 "static assert with different message|" 739 "static assert with %select{|no }2message|" 740 "%select{method %3|constructor|destructor}2|" 741 "%select{method %3|constructor|destructor}2 " 742 "is %select{not deleted|deleted}4|" 743 "%select{method %3|constructor|destructor}2 " 744 "is %select{not defaulted|defaulted}4|" 745 "%select{method %3|constructor|destructor}2 " 746 "is %select{|pure }4%select{not virtual|virtual}5|" 747 "%select{method %3|constructor|destructor}2 " 748 "is %select{not static|static}4|" 749 "%select{method %3|constructor|destructor}2 " 750 "is %select{not volatile|volatile}4|" 751 "%select{method %3|constructor|destructor}2 " 752 "is %select{not const|const}4|" 753 "%select{method %3|constructor|destructor}2 " 754 "is %select{not inline|inline}4|" 755 "%select{method %3|constructor|destructor}2 " 756 "with %ordinal4 parameter with%select{out|}5 a default argument|" 757 "%select{method %3|constructor|destructor}2 " 758 "with %ordinal4 parameter with a different default argument|" 759 "%select{method %3|constructor|destructor}2 " 760 "with %select{no |}4template arguments|" 761 "%select{method %3|constructor|destructor}2 " 762 "with %4 template argument%s4|" 763 "%select{method %3|constructor|destructor}2 " 764 "with %4 for %ordinal5 template argument|" 765 "%select{method %3|constructor|destructor}2 " 766 "with %select{no body|body}4|" 767 "%select{method %3|constructor|destructor}2 " 768 "with different body|" 769 "friend %select{class|function}2|" 770 "friend %2|" 771 "friend function %2|" 772 "function template %2 with %3 template parameter%s3|" 773 "function template %2 with %ordinal3 template paramter being a " 774 "%select{type|non-type|template}4 template parameter|" 775 "function template %2 with %ordinal3 template parameter " 776 "%select{with no name|named %5}4|" 777 "function template %2 with %ordinal3 template parameter with " 778 "%select{no |}4default argument|" 779 "function template %2 with %ordinal3 template parameter with " 780 "default argument %4|" 781 "function template %2 with %ordinal3 template parameter with different type|" 782 "function template %2 with %ordinal3 template parameter %select{not |}4" 783 "being a template parameter pack|" 784 "}1">; 785 786def err_module_odr_violation_field : Error< 787 "%q0 has different definitions in different modules; first difference is " 788 "%select{definition in module '%2'|defined here}1 found " 789 "%select{" 790 "field %4|" 791 "field %4 with type %5|" 792 "%select{non-|}5bitfield %4|" 793 "bitfield %4 with one width expression|" 794 "%select{non-|}5mutable field %4|" 795 "field %4 with %select{no|an}5 initializer|" 796 "field %4 with an initializer" 797 "}3">; 798def note_module_odr_violation_field : Note< 799 "but in %select{'%1'|definition here}0 found " 800 "%select{" 801 "field %3|" 802 "field %3 with type %4|" 803 "%select{non-|}4bitfield %3|" 804 "bitfield %3 with different width expression|" 805 "%select{non-|}4mutable field %3|" 806 "field %3 with %select{no|an}4 initializer|" 807 "field %3 with a different initializer" 808 "}2">; 809 810def err_module_odr_violation_typedef : Error< 811 "%q0 has different definitions in different modules; first difference is " 812 "%select{definition in module '%2'|defined here}1 found " 813 "%select{" 814 "%select{typedef|type alias}4 name %5|" 815 "%select{typedef|type alias}4 %5 with underlying type %6" 816 "}3">; 817def note_module_odr_violation_typedef : Note<"but in '%0' found " 818 "%select{" 819 "%select{typedef|type alias}2 name %3|" 820 "%select{typedef|type alias}2 %3 with different underlying type %4" 821 "}1">; 822 823def err_module_odr_violation_variable : Error< 824 "%q0 has different definitions in different modules; first difference is " 825 "%select{definition in module '%2'|defined here}1 found " 826 "%select{" 827 "data member with name %4|" 828 "data member %4 with type %5|" 829 "data member %4 with%select{out|}5 an initializer|" 830 "data member %4 with an initializer|" 831 "data member %4 %select{is constexpr|is not constexpr}5" 832 "}3">; 833def note_module_odr_violation_variable : Note<"but in '%0' found " 834 "%select{" 835 "data member with name %2|" 836 "data member %2 with different type %3|" 837 "data member %2 with%select{out|}3 an initializer|" 838 "data member %2 with a different initializer|" 839 "data member %2 %select{is constexpr|is not constexpr}3" 840 "}1">; 841 842def err_module_odr_violation_function : Error< 843 "%q0 has different definitions in different modules; " 844 "%select{definition in module '%2'|defined here}1 " 845 "first difference is " 846 "%select{" 847 "return type is %4|" 848 "%ordinal4 parameter with name %5|" 849 "%ordinal4 parameter with type %5%select{| decayed from %7}6|" 850 "%ordinal4 parameter with%select{out|}5 a default argument|" 851 "%ordinal4 parameter with a default argument|" 852 "function body" 853 "}3">; 854 855def note_module_odr_violation_function : Note<"but in '%0' found " 856 "%select{" 857 "different return type %2|" 858 "%ordinal2 parameter with name %3|" 859 "%ordinal2 parameter with type %3%select{| decayed from %5}4|" 860 "%ordinal2 parameter with%select{out|}3 a default argument|" 861 "%ordinal2 parameter with a different default argument|" 862 "a different body" 863 "}1">; 864 865def err_module_odr_violation_enum : Error< 866 "%q0 has different definitions in different modules; " 867 "%select{definition in module '%2'|defined here}1 " 868 "first difference is " 869 "%select{" 870 "enum that is %select{not scoped|scoped}4|" 871 "enum scoped with keyword %select{struct|class}4|" 872 "enum %select{without|with}4 specified type|" 873 "enum with specified type %4|" 874 "enum with %4 element%s4|" 875 "%ordinal4 element has name %5|" 876 "%ordinal4 element %5 %select{has|does not have}6 an initializer|" 877 "%ordinal4 element %5 has an initializer|" 878 "}3">; 879 880def note_module_odr_violation_enum : Note<"but in '%0' found " 881 "%select{" 882 "enum that is %select{not scoped|scoped}2|" 883 "enum scoped with keyword %select{struct|class}2|" 884 "enum %select{without|with}2 specified type|" 885 "enum with specified type %2|" 886 "enum with %2 element%s2|" 887 "%ordinal2 element has name %3|" 888 "%ordinal2 element %3 %select{has|does not have}4 an initializer|" 889 "%ordinal2 element %3 has different initializer|" 890 "}1">; 891 892def err_module_odr_violation_referenced_protocols : Error < 893 "%q0 has different definitions in different modules; first difference is " 894 "%select{definition in module '%2'|defined here}1 found " 895 "%select{" 896 "%4 referenced %plural{1:protocol|:protocols}4|" 897 "%ordinal4 referenced protocol with name %5" 898 "}3">; 899def note_module_odr_violation_referenced_protocols : Note < 900 "but in %select{'%1'|definition here}0 found " 901 "%select{" 902 "%3 referenced %plural{1:protocol|:protocols}3|" 903 "%ordinal3 referenced protocol with different name %4" 904 "}2">; 905 906def err_module_odr_violation_objc_method : Error< 907 "%q0 has different definitions in different modules; first difference is " 908 "%select{definition in module '%2'|defined here}1 found " 909 "%select{" 910 "method %4 with return type %5|" 911 "%select{class|instance}5 method %4|" 912 "%select{no|'required'|'optional'}4 method control|" 913 "method %4 with %select{no designated initializer|designated initializer}5|" 914 "%select{regular|direct}5 method %4|" 915 "method %4" 916 "}3">; 917def note_module_odr_violation_objc_method : Note< 918 "but in %select{'%1'|definition here}0 found " 919 "%select{" 920 "method %3 with different return type %4|" 921 "method %3 as %select{class|instance}4 method|" 922 "%select{no|'required'|'optional'}3 method control|" 923 "method %3 with %select{no designated initializer|designated initializer}4|" 924 "%select{regular|direct}4 method %3|" 925 "different method %3" 926 "}2">; 927 928def err_module_odr_violation_method_params : Error< 929 "%q0 has different definitions in different modules; first difference is " 930 "%select{definition in module '%2'|defined here}1 found " 931 "%select{" 932 "%select{method %5|constructor|destructor}4 " 933 "that has %6 parameter%s6|" 934 "%select{method %5|constructor|destructor}4 " 935 "with %ordinal6 parameter of type %7%select{| decayed from %9}8|" 936 "%select{method %5|constructor|destructor}4 " 937 "with %ordinal6 parameter named %7" 938 "}3">; 939def note_module_odr_violation_method_params : Note< 940 "but in %select{'%1'|definition here}0 found " 941 "%select{" 942 "%select{method %4|constructor|destructor}3 " 943 "that has %5 parameter%s5|" 944 "%select{method %4|constructor|destructor}3 " 945 "with %ordinal5 parameter of type %6%select{| decayed from %8}7|" 946 "%select{method %4|constructor|destructor}3 " 947 "with %ordinal5 parameter named %6" 948 "}2">; 949 950def err_module_odr_violation_objc_property : Error< 951 "%q0 has different definitions in different modules; first difference is " 952 "%select{definition in module '%2'|defined here}1 found " 953 "%select{" 954 "property %4|" 955 "property %4 with type %5|" 956 "%select{no|'required'|'optional'}4 property control|" 957 "property %4 with %select{default |}6'%select{none|readonly|getter|assign|" 958 "readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|" 959 "unsafe_unretained|nullability|null_resettable|class|direct}5' attribute" 960 "}3">; 961def note_module_odr_violation_objc_property : Note< 962 "but in %select{'%1'|definition here}0 found " 963 "%select{" 964 "property %3|" 965 "property %3 with type %4|" 966 "%select{no|'required'|'optional'}3 property control|" 967 "property %3 with different '%select{none|readonly|getter|assign|" 968 "readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|" 969 "unsafe_unretained|nullability|null_resettable|class|direct}4' attribute" 970 "}2">; 971 972def err_module_odr_violation_mismatch_decl_unknown : Error< 973 "%q0 %select{with definition in module '%2'|defined here}1 has different " 974 "definitions in different modules; first difference is this " 975 "%select{||||static assert|field|method|type alias|typedef|data member|" 976 "friend declaration|function template|method|instance variable|" 977 "property|unexpected decl}3">; 978def note_module_odr_violation_mismatch_decl_unknown : Note< 979 "but in %select{'%1'|definition here}0 found " 980 "%select{||||different static assert|different field|different method|" 981 "different type alias|different typedef|different data member|" 982 "different friend declaration|different function template|different method|" 983 "different instance variable|different property|another unexpected decl}2">; 984 985 986def remark_sanitize_address_insert_extra_padding_accepted : Remark< 987 "-fsanitize-address-field-padding applied to %0">, ShowInSystemHeader, 988 InGroup<SanitizeAddressRemarks>; 989def remark_sanitize_address_insert_extra_padding_rejected : Remark< 990 "-fsanitize-address-field-padding ignored for %0 because it " 991 "%select{is not C++|is packed|is a union|is trivially copyable|" 992 "has trivial destructor|is standard layout|is in a ignorelisted file|" 993 "is ignorelisted}1">, ShowInSystemHeader, 994 InGroup<SanitizeAddressRemarks>; 995 996def warn_npot_ms_struct : Warning< 997 "ms_struct may not produce Microsoft-compatible layouts with fundamental " 998 "data types with sizes that aren't a power of two">, 999 DefaultError, InGroup<IncompatibleMSStruct>; 1000 1001// -Wpadded-bitfield 1002def warn_padded_struct_bitfield : Warning< 1003 "padding %select{struct|interface|class}0 %1 with %2 " 1004 "%select{byte|bit}3%s2 to align %4">, 1005 InGroup<PaddedBitField>, DefaultIgnore; 1006def warn_padded_struct_anon_bitfield : Warning< 1007 "padding %select{struct|interface|class}0 %1 with %2 " 1008 "%select{byte|bit}3%s2 to align anonymous bit-field">, 1009 InGroup<PaddedBitField>, DefaultIgnore; 1010 1011// -Wpadded, -Wpacked 1012def warn_padded_struct_field : Warning< 1013 "padding %select{struct|interface|class}0 %1 with %2 " 1014 "%select{byte|bit}3%s2 to align %4">, 1015 InGroup<Padded>, DefaultIgnore; 1016def warn_padded_struct_anon_field : Warning< 1017 "padding %select{struct|interface|class}0 %1 with %2 " 1018 "%select{byte|bit}3%s2 to align anonymous field">, 1019 InGroup<Padded>, DefaultIgnore; 1020def warn_padded_struct_size : Warning< 1021 "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">, 1022 InGroup<Padded>, DefaultIgnore; 1023def warn_unnecessary_packed : Warning< 1024 "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore; 1025def warn_unpacked_field 1026 : Warning< 1027 "not packing field %0 as it is non-POD for the purposes of layout">, 1028 InGroup<PackedNonPod>, 1029 DefaultIgnore; 1030 1031// -Wunaligned-access 1032def warn_unaligned_access : Warning< 1033 "field %1 within %0 is less aligned than %2 and is usually due to %0 being " 1034 "packed, which can lead to unaligned accesses">, InGroup<UnalignedAccess>, DefaultIgnore; 1035} 1036