1 //==--- DiagnosticASTKinds.td - libast diagnostics ------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 let Component = "AST" in {
11 // Constant expression diagnostics. These (and their users) belong in Sema.
12 def note_expr_divide_by_zero : Note<"division by zero">;
13 def note_constexpr_invalid_cast : Note<
14 "%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of"
15 " a reinterpret_cast|cast from %1}0 is not allowed in a constant expression"
16 "%select{| in C++ standards before C++2a||}0">;
17 def note_constexpr_invalid_downcast : Note<
18 "cannot cast object of dynamic type %0 to type %1">;
19 def note_constexpr_overflow : Note<
20 "value %0 is outside the range of representable values of type %1">;
21 def note_constexpr_negative_shift : Note<"negative shift count %0">;
22 def note_constexpr_large_shift : Note<
23 "shift count %0 >= width of type %1 (%2 bit%s2)">;
24 def note_constexpr_lshift_of_negative : Note<"left shift of negative value %0">;
25 def note_constexpr_lshift_discards : Note<"signed left shift discards bits">;
26 def note_constexpr_invalid_function : Note<
27 "%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot "
28 "be used in a constant expression">;
29 def note_constexpr_invalid_inhctor : Note<
30 "constructor inherited from base class %0 cannot be used in a "
31 "constant expression; derived class cannot be implicitly initialized">;
32 def note_constexpr_no_return : Note<
33 "control reached end of constexpr function">;
34 def note_constexpr_virtual_call : Note<
35 "cannot evaluate call to virtual function in a constant expression "
36 "in C++ standards before C++2a">;
37 def note_constexpr_pure_virtual_call : Note<
38 "pure virtual function %q0 called">;
39 def note_constexpr_polymorphic_unknown_dynamic_type : Note<
40 "%select{|||||virtual function called on|dynamic_cast applied to|"
41 "typeid applied to|construction of|destruction of}0 object '%1' "
42 "whose dynamic type is not constant">;
43 def note_constexpr_dynamic_cast_to_reference_failed : Note<
44 "reference dynamic_cast failed: %select{"
45 "static type %1 of operand is a non-public base class of dynamic type %2|"
46 "dynamic type %2 of operand does not have a base class of type %3|"
47 "%3 is an ambiguous base class of dynamic type %2 of operand|"
48 "%3 is a non-public base class of dynamic type %2 of operand}0">;
49 def note_constexpr_virtual_base : Note<
50 "cannot construct object of type %0 with virtual base class "
51 "in a constant expression">;
52 def note_constexpr_nonliteral : Note<
53 "non-literal type %0 cannot be used in a constant expression">;
54 def note_constexpr_non_global : Note<
55 "%select{pointer|reference}0 to %select{|subobject of }1"
56 "%select{temporary|%3}2 is not a constant expression">;
57 def note_constexpr_dynamic_alloc : Note<
58 "%select{pointer|reference}0 to %select{|subobject of }1"
59 "heap-allocated object is not a constant expression">;
60 def note_constexpr_uninitialized : Note<
61 "%select{|sub}0object of type %1 is not initialized">;
62 def note_constexpr_subobject_declared_here : Note<
63 "subobject declared here">;
64 def note_constexpr_array_index : Note<"cannot refer to element %0 of "
65 "%select{array of %2 element%plural{1:|:s}2|non-array object}1 "
66 "in a constant expression">;
67 def note_constexpr_float_arithmetic : Note<
68 "floating point arithmetic produces %select{an infinity|a NaN}0">;
69 def note_constexpr_pointer_subtraction_not_same_array : Note<
70 "subtracted pointers are not elements of the same array">;
71 def note_constexpr_pointer_subtraction_zero_size : Note<
72 "subtraction of pointers to type %0 of zero size">;
73 def note_constexpr_pointer_comparison_base_classes : Note<
74 "comparison of addresses of subobjects of different base classes "
75 "has unspecified value">;
76 def note_constexpr_pointer_comparison_base_field : Note<
77 "comparison of address of base class subobject %0 of class %1 to field %2 "
78 "has unspecified value">;
79 def note_constexpr_pointer_comparison_differing_access : Note<
80 "comparison of address of fields %0 and %2 of %4 with differing access "
81 "specifiers (%1 vs %3) has unspecified value">;
82 def note_constexpr_compare_virtual_mem_ptr : Note<
83 "comparison of pointer to virtual member function %0 has unspecified value">;
84 def note_constexpr_past_end : Note<
85 "dereferenced pointer past the end of %select{|subobject of }0"
86 "%select{temporary|%2}1 is not a constant expression">;
87 def note_constexpr_past_end_subobject : Note<
88 "cannot %select{access base class of|access derived class of|access field of|"
89 "access array element of|ERROR|"
90 "access real component of|access imaginary component of}0 "
91 "pointer past the end of object">;
92 def note_non_null_attribute_failed : Note<
93 "null passed to a callee that requires a non-null argument">;
94 def note_constexpr_null_subobject : Note<
95 "cannot %select{access base class of|access derived class of|access field of|"
96 "access array element of|perform pointer arithmetic on|"
97 "access real component of|"
98 "access imaginary component of}0 null pointer">;
99 def note_constexpr_var_init_non_constant : Note<
100 "initializer of %0 is not a constant expression">;
101 def note_constexpr_typeid_polymorphic : Note<
102 "typeid applied to expression of polymorphic type %0 is "
103 "not allowed in a constant expression in C++ standards before C++2a">;
104 def note_constexpr_void_comparison : Note<
105 "comparison between unequal pointers to void has unspecified result">;
106 def note_constexpr_temporary_here : Note<"temporary created here">;
107 def note_constexpr_dynamic_alloc_here : Note<"heap allocation performed here">;
108 def note_constexpr_conditional_never_const : Note<
109 "both arms of conditional operator are unable to produce a "
110 "constant expression">;
111 def note_constexpr_depth_limit_exceeded : Note<
112 "constexpr evaluation exceeded maximum depth of %0 calls">;
113 def note_constexpr_call_limit_exceeded : Note<
114 "constexpr evaluation hit maximum call limit">;
115 def note_constexpr_step_limit_exceeded : Note<
116 "constexpr evaluation hit maximum step limit; possible infinite loop?">;
117 def note_constexpr_heap_alloc_limit_exceeded : Note<
118 "constexpr evaluation hit maximum heap allocation limit">;
119 def note_constexpr_this : Note<
120 "%select{|implicit }0use of 'this' pointer is only allowed within the "
121 "evaluation of a call to a 'constexpr' member function">;
122 def note_constexpr_lifetime_ended : Note<
123 "%select{read of|read of|assignment to|increment of|decrement of|"
124 "member call on|dynamic_cast of|typeid applied to|construction of|"
125 "destruction of}0 %select{temporary|variable}1 whose "
126 "%plural{8:storage duration|:lifetime}0 has ended">;
127 def note_constexpr_access_uninit : Note<
128 "%select{read of|read of|assignment to|increment of|decrement of|"
129 "member call on|dynamic_cast of|typeid applied to|"
130 "construction of subobject of|destruction of}0 "
131 "%select{object outside its lifetime|uninitialized object}1 "
132 "is not allowed in a constant expression">;
133 def note_constexpr_use_uninit_reference : Note<
134 "use of reference outside its lifetime "
135 "is not allowed in a constant expression">;
136 def note_constexpr_modify_const_type : Note<
137 "modification of object of const-qualified type %0 is not allowed "
138 "in a constant expression">;
139 def note_constexpr_access_volatile_type : Note<
140 "%select{read of|read of|assignment to|increment of|decrement of|"
141 "<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 "
142 "volatile-qualified type %1 is not allowed in a constant expression">;
143 def note_constexpr_access_volatile_obj : Note<
144 "%select{read of|read of|assignment to|increment of|decrement of|"
145 "<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 "
146 "volatile %select{temporary|object %2|member %2}1 is not allowed in "
147 "a constant expression">;
148 def note_constexpr_volatile_here : Note<
149 "volatile %select{temporary created|object declared|member declared}0 here">;
150 def note_constexpr_access_mutable : Note<
151 "%select{read of|read of|assignment to|increment of|decrement of|"
152 "member call on|dynamic_cast of|typeid applied to|construction of|"
154 "mutable member %1 is not allowed in a constant expression">;
155 def note_constexpr_ltor_non_const_int : Note<
156 "read of non-const variable %0 is not allowed in a constant expression">;
157 def note_constexpr_ltor_non_constexpr : Note<
158 "read of non-constexpr variable %0 is not allowed in a constant expression">;
159 def note_constexpr_ltor_incomplete_type : Note<
160 "read of incomplete type %0 is not allowed in a constant expression">;
161 def note_constexpr_access_null : Note<
162 "%select{read of|read of|assignment to|increment of|decrement of|"
163 "member call on|dynamic_cast of|typeid applied to|construction of|"
165 "dereferenced null pointer is not allowed in a constant expression">;
166 def note_constexpr_access_past_end : Note<
167 "%select{read of|read of|assignment to|increment of|decrement of|"
168 "member call on|dynamic_cast of|typeid applied to|construction of|"
170 "dereferenced one-past-the-end pointer is not allowed "
171 "in a constant expression">;
172 def note_constexpr_access_unsized_array : Note<
173 "%select{read of|read of|assignment to|increment of|decrement of|"
174 "member call on|dynamic_cast of|typeid applied to|construction of|"
176 "element of array without known bound "
177 "is not allowed in a constant expression">;
178 def note_constexpr_access_inactive_union_member : Note<
179 "%select{read of|read of|assignment to|increment of|decrement of|"
180 "member call on|dynamic_cast of|typeid applied to|"
181 "construction of subobject of|destruction of}0 "
182 "member %1 of union with %select{active member %3|no active member}2 "
183 "is not allowed in a constant expression">;
184 def note_constexpr_access_static_temporary : Note<
185 "%select{read of|read of|assignment to|increment of|decrement of|"
186 "member call on|dynamic_cast of|typeid applied to|reconstruction of|"
187 "destruction of}0 temporary "
188 "is not allowed in a constant expression outside the expression that "
189 "created the temporary">;
190 def note_constexpr_access_unreadable_object : Note<
191 "%select{read of|read of|assignment to|increment of|decrement of|"
192 "member call on|dynamic_cast of|typeid applied to|construction of|"
194 "object '%1' whose value is not known">;
195 def note_constexpr_access_deleted_object : Note<
196 "%select{read of|read of|assignment to|increment of|decrement of|"
197 "member call on|dynamic_cast of|typeid applied to|construction of|"
199 "heap allocated object that has been deleted">;
200 def note_constexpr_modify_global : Note<
201 "a constant expression cannot modify an object that is visible outside "
203 def note_constexpr_stmt_expr_unsupported : Note<
204 "this use of statement expressions is not supported in a "
205 "constant expression">;
206 def note_constexpr_calls_suppressed : Note<
207 "(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to "
209 def note_constexpr_call_here : Note<"in call to '%0'">;
210 def note_constexpr_inherited_ctor_call_here : Note<
211 "in implicit initialization for inherited constructor of %0">;
212 def note_constexpr_baa_insufficient_alignment : Note<
213 "%select{alignment of|offset of the aligned pointer from}0 the base pointee "
214 "object (%1 %plural{1:byte|:bytes}1) is %select{less than|not a multiple of}0 the "
215 "asserted %2 %plural{1:byte|:bytes}2">;
216 def note_constexpr_baa_value_insufficient_alignment : Note<
217 "value of the aligned pointer (%0) is not a multiple of the asserted %1 "
218 "%plural{1:byte|:bytes}1">;
219 def note_constexpr_destroy_out_of_lifetime : Note<
220 "destroying object '%0' whose lifetime has already ended">;
221 def note_constexpr_unsupported_destruction : Note<
222 "non-trivial destruction of type %0 in a constant expression is not supported">;
223 def note_constexpr_unsupported_tempoarary_nontrivial_dtor : Note<
224 "non-trivial destruction of lifetime-extended temporary with type %0 "
225 "used in the result of a constant expression is not yet supported">;
226 def note_constexpr_unsupported_unsized_array : Note<
227 "array-to-pointer decay of array member without known bound is not supported">;
228 def note_constexpr_unsized_array_indexed : Note<
229 "indexing of array without known bound is not allowed "
230 "in a constant expression">;
231 def note_constexpr_memcpy_null : Note<
232 "%select{source|destination}2 of "
233 "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' "
235 def note_constexpr_memcpy_type_pun : Note<
236 "cannot constant evaluate '%select{memcpy|memmove}0' from object of "
237 "type %1 to object of type %2">;
238 def note_constexpr_memcpy_nontrivial : Note<
239 "cannot constant evaluate '%select{memcpy|memmove}0' between objects of "
240 "non-trivially-copyable type %1">;
241 def note_constexpr_memcpy_incomplete_type : Note<
242 "cannot constant evaluate '%select{memcpy|memmove}0' between objects of "
243 "incomplete type %1">;
244 def note_constexpr_memcpy_overlap : Note<
245 "'%select{memcpy|wmemcpy}0' between overlapping memory regions">;
246 def note_constexpr_memcpy_unsupported : Note<
247 "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' "
248 "not supported: %select{"
249 "size to copy (%4) is not a multiple of size of element type %3 (%5)|"
250 "source is not a contiguous array of at least %4 elements of type %3|"
251 "destination is not a contiguous array of at least %4 elements of type %3}2">;
252 def note_constexpr_bit_cast_unsupported_type : Note<
253 "constexpr bit_cast involving type %0 is not yet supported">;
254 def note_constexpr_bit_cast_unsupported_bitfield : Note<
255 "constexpr bit_cast involving bit-field is not yet supported">;
256 def note_constexpr_bit_cast_invalid_type : Note<
257 "bit_cast %select{from|to}0 a %select{|type with a }1"
258 "%select{union|pointer|member pointer|volatile|reference}2 "
259 "%select{type|member}1 is not allowed in a constant expression">;
260 def note_constexpr_bit_cast_invalid_subtype : Note<
261 "invalid type %0 is a %select{member|base}1 of %2">;
262 def note_constexpr_bit_cast_indet_dest : Note<
263 "indeterminate value can only initialize an object of type 'unsigned char'"
264 "%select{, 'char',|}1 or 'std::byte'; %0 is invalid">;
265 def note_constexpr_pseudo_destructor : Note<
266 "pseudo-destructor call is not permitted in constant expressions "
268 def note_constexpr_construct_complex_elem : Note<
269 "construction of individual component of complex number is not yet supported "
270 "in constant expressions">;
271 def note_constexpr_destroy_complex_elem : Note<
272 "destruction of individual component of complex number is not yet supported "
273 "in constant expressions">;
274 def note_constexpr_new : Note<
275 "dynamic memory allocation is not permitted in constant expressions "
277 def note_constexpr_new_non_replaceable : Note<
278 "call to %select{placement|class-specific}0 %1">;
279 def note_constexpr_new_placement : Note<
280 "this placement new expression is not yet supported in constant expressions">;
281 def note_constexpr_placement_new_wrong_type : Note<
282 "placement new would change type of storage from %0 to %1">;
283 def note_constexpr_new_negative : Note<
284 "cannot allocate array; evaluated array bound %0 is negative">;
285 def note_constexpr_new_too_large : Note<
286 "cannot allocate array; evaluated array bound %0 is too large">;
287 def note_constexpr_new_too_small : Note<
288 "cannot allocate array; evaluated array bound %0 is too small to hold "
289 "%1 explicitly initialized elements">;
290 def note_constexpr_new_untyped : Note<
291 "cannot allocate untyped memory in a constant expression; "
292 "use 'std::allocator<T>::allocate' to allocate memory of type 'T'">;
293 def note_constexpr_new_not_complete_object_type : Note<
294 "cannot allocate memory of %select{incomplete|function}0 type %1">;
295 def note_constexpr_operator_new_bad_size : Note<
296 "allocated size %0 is not a multiple of size %1 of element type %2">;
297 def note_constexpr_delete_not_heap_alloc : Note<
298 "delete of pointer '%0' that does not point to a heap-allocated object">;
299 def note_constexpr_double_delete : Note<
300 "delete of pointer that has already been deleted">;
301 def note_constexpr_double_destroy : Note<
302 "destruction of object that is already being destroyed">;
303 def note_constexpr_new_delete_mismatch : Note<
304 "%plural{2:'delete' used to delete pointer to object "
305 "allocated with 'std::allocator<...>::allocate'|"
306 ":%select{non-array delete|array delete|'std::allocator<...>::deallocate'}0 "
307 "used to delete pointer to "
308 "%select{array object of type %2|non-array object of type %2|"
309 "object allocated with 'new'}0}1">;
310 def note_constexpr_delete_subobject : Note<
311 "delete of pointer%select{ to subobject|}1 '%0' "
312 "%select{|that does not point to complete object}1">;
313 def note_constexpr_delete_base_nonvirt_dtor : Note<
314 "delete of object with dynamic type %1 through pointer to "
315 "base class type %0 with non-virtual destructor">;
316 def note_constexpr_memory_leak : Note<
317 "allocation performed here was not deallocated"
318 "%plural{0:|: (along with %0 other memory leak%s0)}0">;
319 def err_experimental_clang_interp_failed : Error<
320 "the experimental clang interpreter failed to evaluate an expression">;
322 def warn_integer_constant_overflow : Warning<
323 "overflow in expression; result is %0 with type %1">,
324 InGroup<DiagGroup<"integer-overflow">>;
326 // This is a temporary diagnostic, and shall be removed once our
327 // implementation is complete, and like the preceding constexpr notes belongs
329 def note_unimplemented_constexpr_lambda_feature_ast : Note<
330 "unimplemented constexpr lambda feature: %0 (coming soon!)">;
332 // inline asm related.
333 let CategoryName = "Inline Assembly Issue" in {
334 def err_asm_invalid_escape : Error<
335 "invalid %% escape in inline assembly string">;
336 def err_asm_unknown_symbolic_operand_name : Error<
337 "unknown symbolic operand name in inline assembly string">;
339 def err_asm_unterminated_symbolic_operand_name : Error<
340 "unterminated symbolic operand name in inline assembly string">;
341 def err_asm_empty_symbolic_operand_name : Error<
342 "empty symbolic operand name in inline assembly string">;
343 def err_asm_invalid_operand_number : Error<
344 "invalid operand number in inline asm string">;
348 let CategoryName = "VTable ABI Issue" in {
349 def err_vftable_ambiguous_component : Error<
350 "ambiguous vftable component for %0 introduced via covariant thunks; "
351 "this is an inherent limitation of the ABI">;
352 def note_covariant_thunk : Note<
353 "covariant thunk required by %0">;
357 def err_odr_variable_type_inconsistent : Error<
358 "external variable %0 declared with incompatible types in different "
359 "translation units (%1 vs. %2)">;
360 def warn_odr_variable_type_inconsistent : Warning<
361 "external variable %0 declared with incompatible types in different "
362 "translation units (%1 vs. %2)">,
364 def err_odr_variable_multiple_def : Error<
365 "external variable %0 defined in multiple translation units">;
366 def warn_odr_variable_multiple_def : Warning<
367 "external variable %0 defined in multiple translation units">,
369 def note_odr_value_here : Note<"declared here with type %0">;
370 def err_odr_function_type_inconsistent : Error<
371 "external function %0 declared with incompatible types in different "
372 "translation units (%1 vs. %2)">;
373 def warn_odr_function_type_inconsistent : Warning<
374 "external function %0 declared with incompatible types in different "
375 "translation units (%1 vs. %2)">,
377 def err_odr_tag_type_inconsistent
378 : Error<"type %0 has incompatible definitions in different translation "
380 def warn_odr_tag_type_inconsistent
381 : Warning<"type %0 has incompatible definitions in different translation "
384 def note_odr_tag_kind_here: Note<
385 "%0 is a %select{struct|interface|union|class|enum}1 here">;
386 def note_odr_field : Note<"field %0 has type %1 here">;
387 def note_odr_field_name : Note<"field has name %0 here">;
388 def note_odr_missing_field : Note<"no corresponding field here">;
389 def note_odr_bit_field : Note<"bit-field %0 with type %1 and length %2 here">;
390 def note_odr_not_bit_field : Note<"field %0 is not a bit-field">;
391 def note_odr_base : Note<"class has base type %0">;
392 def note_odr_virtual_base : Note<
393 "%select{non-virtual|virtual}0 derivation here">;
394 def note_odr_missing_base : Note<"no corresponding base class here">;
395 def note_odr_number_of_bases : Note<
396 "class has %0 base %plural{1:class|:classes}0">;
397 def note_odr_enumerator : Note<"enumerator %0 with value %1 here">;
398 def note_odr_missing_enumerator : Note<"no corresponding enumerator here">;
399 def err_odr_field_type_inconsistent : Error<
400 "field %0 declared with incompatible types in different "
401 "translation units (%1 vs. %2)">;
402 def warn_odr_field_type_inconsistent : Warning<
403 "field %0 declared with incompatible types in different "
404 "translation units (%1 vs. %2)">,
407 // Importing Objective-C ASTs
408 def err_odr_ivar_type_inconsistent : Error<
409 "instance variable %0 declared with incompatible types in different "
410 "translation units (%1 vs. %2)">;
411 def warn_odr_ivar_type_inconsistent : Warning<
412 "instance variable %0 declared with incompatible types in different "
413 "translation units (%1 vs. %2)">,
415 def err_odr_objc_superclass_inconsistent : Error<
416 "class %0 has incompatible superclasses">;
417 def warn_odr_objc_superclass_inconsistent : Warning<
418 "class %0 has incompatible superclasses">,
420 def note_odr_objc_superclass : Note<"inherits from superclass %0 here">;
421 def note_odr_objc_missing_superclass : Note<"no corresponding superclass here">;
422 def err_odr_objc_method_result_type_inconsistent : Error<
423 "%select{class|instance}0 method %1 has incompatible result types in "
424 "different translation units (%2 vs. %3)">;
425 def warn_odr_objc_method_result_type_inconsistent : Warning<
426 "%select{class|instance}0 method %1 has incompatible result types in "
427 "different translation units (%2 vs. %3)">,
429 def err_odr_objc_method_num_params_inconsistent : Error<
430 "%select{class|instance}0 method %1 has a different number of parameters in "
431 "different translation units (%2 vs. %3)">;
432 def warn_odr_objc_method_num_params_inconsistent : Warning<
433 "%select{class|instance}0 method %1 has a different number of parameters in "
434 "different translation units (%2 vs. %3)">,
436 def err_odr_objc_method_param_type_inconsistent : Error<
437 "%select{class|instance}0 method %1 has a parameter with a different types "
438 "in different translation units (%2 vs. %3)">;
439 def warn_odr_objc_method_param_type_inconsistent : Warning<
440 "%select{class|instance}0 method %1 has a parameter with a different types "
441 "in different translation units (%2 vs. %3)">,
443 def err_odr_objc_method_variadic_inconsistent : Error<
444 "%select{class|instance}0 method %1 is variadic in one translation unit "
445 "and not variadic in another">;
446 def warn_odr_objc_method_variadic_inconsistent : Warning<
447 "%select{class|instance}0 method %1 is variadic in one translation unit "
448 "and not variadic in another">,
450 def note_odr_objc_method_here : Note<
451 "%select{class|instance}0 method %1 also declared here">;
452 def err_odr_objc_property_type_inconsistent : Error<
453 "property %0 declared with incompatible types in different "
454 "translation units (%1 vs. %2)">;
455 def warn_odr_objc_property_type_inconsistent : Warning<
456 "property %0 declared with incompatible types in different "
457 "translation units (%1 vs. %2)">,
459 def err_odr_objc_property_impl_kind_inconsistent : Error<
460 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one "
461 "translation but %select{@dynamic|@synthesize}1 in another translation unit">;
462 def warn_odr_objc_property_impl_kind_inconsistent : Warning<
463 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one "
464 "translation but %select{@dynamic|@synthesize}1 in another translation unit">,
466 def note_odr_objc_property_impl_kind : Note<
467 "property %0 is implemented with %select{@synthesize|@dynamic}1 here">;
468 def err_odr_objc_synthesize_ivar_inconsistent : Error<
469 "property %0 is synthesized to different ivars in different translation "
470 "units (%1 vs. %2)">;
471 def warn_odr_objc_synthesize_ivar_inconsistent : Warning<
472 "property %0 is synthesized to different ivars in different translation "
473 "units (%1 vs. %2)">,
475 def note_odr_objc_synthesize_ivar_here : Note<
476 "property is synthesized to ivar %0 here">;
478 // Importing C++ ASTs
479 def note_odr_friend : Note<"friend declared here">;
480 def note_odr_missing_friend : Note<"no corresponding friend here">;
481 def err_odr_different_num_template_parameters : Error<
482 "template parameter lists have a different number of parameters (%0 vs %1)">;
483 def warn_odr_different_num_template_parameters : Warning<
484 "template parameter lists have a different number of parameters (%0 vs %1)">,
486 def note_odr_template_parameter_list : Note<
487 "template parameter list also declared here">;
488 def err_odr_different_template_parameter_kind : Error<
489 "template parameter has different kinds in different translation units">;
490 def warn_odr_different_template_parameter_kind : Warning<
491 "template parameter has different kinds in different translation units">,
493 def note_odr_template_parameter_here : Note<
494 "template parameter declared here">;
495 def err_odr_parameter_pack_non_pack : Error<
496 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">;
497 def warn_odr_parameter_pack_non_pack : Warning<
498 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">,
500 def note_odr_parameter_pack_non_pack : Note<
501 "%select{parameter|parameter pack}0 declared here">;
502 def err_odr_non_type_parameter_type_inconsistent : Error<
503 "non-type template parameter declared with incompatible types in different "
504 "translation units (%0 vs. %1)">;
505 def warn_odr_non_type_parameter_type_inconsistent : Warning<
506 "non-type template parameter declared with incompatible types in different "
507 "translation units (%0 vs. %1)">,
509 def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">;
511 def remark_sanitize_address_insert_extra_padding_accepted : Remark<
512 "-fsanitize-address-field-padding applied to %0">, ShowInSystemHeader,
513 InGroup<SanitizeAddressRemarks>;
514 def remark_sanitize_address_insert_extra_padding_rejected : Remark<
515 "-fsanitize-address-field-padding ignored for %0 because it "
516 "%select{is not C++|is packed|is a union|is trivially copyable|"
517 "has trivial destructor|is standard layout|is in a blacklisted file|"
518 "is blacklisted}1">, ShowInSystemHeader,
519 InGroup<SanitizeAddressRemarks>;
521 def warn_npot_ms_struct : Warning<
522 "ms_struct may not produce Microsoft-compatible layouts with fundamental "
523 "data types with sizes that aren't a power of two">,
524 DefaultError, InGroup<IncompatibleMSStruct>;
526 // -Wpadded, -Wpacked
527 def warn_padded_struct_field : Warning<
528 "padding %select{struct|interface|class}0 %1 with %2 "
529 "%select{byte|bit}3%s2 to align %4">,
530 InGroup<Padded>, DefaultIgnore;
531 def warn_padded_struct_anon_field : Warning<
532 "padding %select{struct|interface|class}0 %1 with %2 "
533 "%select{byte|bit}3%s2 to align anonymous bit-field">,
534 InGroup<Padded>, DefaultIgnore;
535 def warn_padded_struct_size : Warning<
536 "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">,
537 InGroup<Padded>, DefaultIgnore;
538 def warn_unnecessary_packed : Warning<
539 "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore;