1 //==--- DiagnosticASTKinds.td - libast diagnostics ------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 let Component = "AST" in {
12 //def note_comma_in_ice : Note<
13 // "C does not permit evaluated commas in an integer constant expression">;
14 def note_expr_divide_by_zero : Note<"division by zero">;
16 // inline asm related.
17 let CategoryName = "Inline Assembly Issue" in {
18 def err_asm_invalid_escape : Error<
19 "invalid %% escape in inline assembly string">;
20 def err_asm_unknown_symbolic_operand_name : Error<
21 "unknown symbolic operand name in inline assembly string">;
23 def err_asm_unterminated_symbolic_operand_name : Error<
24 "unterminated symbolic operand name in inline assembly string">;
25 def err_asm_empty_symbolic_operand_name : Error<
26 "empty symbolic operand name in inline assembly string">;
27 def err_asm_invalid_operand_number : Error<
28 "invalid operand number in inline asm string">;
33 def err_odr_variable_type_inconsistent : Error<
34 "external variable %0 declared with incompatible types in different "
35 "translation units (%1 vs. %2)">;
36 def err_odr_variable_multiple_def : Error<
37 "external variable %0 defined in multiple translation units">;
38 def note_odr_value_here : Note<"declared here with type %0">;
39 def note_odr_defined_here : Note<"also defined here">;
40 def err_odr_function_type_inconsistent : Error<
41 "external function %0 declared with incompatible types in different "
42 "translation units (%1 vs. %2)">;
43 def warn_odr_tag_type_inconsistent : Warning<
44 "type %0 has incompatible definitions in different translation units">;
45 def note_odr_tag_kind_here: Note<
46 "%0 is a %select{struct|union|class|enum}1 here">;
47 def note_odr_field : Note<"field %0 has type %1 here">;
48 def note_odr_missing_field : Note<"no corresponding field here">;
49 def note_odr_bit_field : Note<"bit-field %0 with type %1 and length %2 here">;
50 def note_odr_not_bit_field : Note<"field %0 is not a bit-field">;
51 def note_odr_base : Note<"class has base type %0">;
52 def note_odr_virtual_base : Note<
53 "%select{non-virtual|virtual}0 derivation here">;
54 def note_odr_missing_base : Note<"no corresponding base class here">;
55 def note_odr_number_of_bases : Note<
56 "class has %0 base %plural{1:class|:classes}0">;
57 def note_odr_enumerator : Note<"enumerator %0 with value %1 here">;
58 def note_odr_missing_enumerator : Note<"no corresponding enumerator here">;
60 // Importing Objective-C ASTs
61 def err_odr_ivar_type_inconsistent : Error<
62 "instance variable %0 declared with incompatible types in different "
63 "translation units (%1 vs. %2)">;
64 def err_odr_objc_superclass_inconsistent : Error<
65 "class %0 has incompatible superclasses">;
66 def note_odr_objc_superclass : Note<"inherits from superclass %0 here">;
67 def note_odr_objc_missing_superclass : Note<"no corresponding superclass here">;
68 def err_odr_objc_method_result_type_inconsistent : Error<
69 "%select{class|instance}0 method %1 has incompatible result types in "
70 "different translation units (%2 vs. %3)">;
71 def err_odr_objc_method_num_params_inconsistent : Error<
72 "%select{class|instance}0 method %1 has a different number of parameters in "
73 "different translation units (%2 vs. %3)">;
74 def err_odr_objc_method_param_type_inconsistent : Error<
75 "%select{class|instance}0 method %1 has a parameter with a different types "
76 "in different translation units (%2 vs. %3)">;
77 def err_odr_objc_method_variadic_inconsistent : Error<
78 "%select{class|instance}0 method %1 is variadic in one translation unit "
79 "and not variadic in another">;
80 def note_odr_objc_method_here : Note<
81 "%select{class|instance}0 method %1 also declared here">;
82 def err_odr_objc_property_type_inconsistent : Error<
83 "property %0 declared with incompatible types in different "
84 "translation units (%1 vs. %2)">;
85 def err_odr_objc_property_impl_kind_inconsistent : Error<
86 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one "
87 "translation but %select{@dynamic|@synthesize}1 in another translation unit">;
88 def note_odr_objc_property_impl_kind : Note<
89 "property %0 is implemented with %select{@synthesize|@dynamic}1 here">;
90 def err_odr_objc_synthesize_ivar_inconsistent : Error<
91 "property %0 is synthesized to different ivars in different translation "
93 def note_odr_objc_synthesize_ivar_here : Note<
94 "property is synthesized to ivar %0 here">;
97 def err_odr_different_num_template_parameters : Error<
98 "template parameter lists have a different number of parameters (%0 vs %1)">;
99 def note_odr_template_parameter_list : Note<
100 "template parameter list also declared here">;
101 def err_odr_different_template_parameter_kind : Error<
102 "template parameter has different kinds in different translation units">;
103 def note_odr_template_parameter_here : Note<
104 "template parameter declared here">;
105 def err_odr_parameter_pack_non_pack : Error<
106 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">;
107 def note_odr_parameter_pack_non_pack : Note<
108 "%select{parameter|parameter pack}0 declared here">;
109 def err_odr_non_type_parameter_type_inconsistent : Error<
110 "non-type template parameter declared with incompatible types in different "
111 "translation units (%0 vs. %1)">;
112 def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">;