1 //==--- DiagnosticASTKinds.td - libast diagnostics ------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 let Component = "AST" in { 11 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">; 15 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">; 22 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">; 29 } 30 31 32 // Importing ASTs 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">; 59 60 def err_odr_field_type_inconsistent : Error< 61 "field %0 declared with incompatible types in different " 62 "translation units (%1 vs. %2)">; 63 64 // Importing Objective-C ASTs 65 def err_odr_ivar_type_inconsistent : Error< 66 "instance variable %0 declared with incompatible types in different " 67 "translation units (%1 vs. %2)">; 68 def err_odr_objc_superclass_inconsistent : Error< 69 "class %0 has incompatible superclasses">; 70 def note_odr_objc_superclass : Note<"inherits from superclass %0 here">; 71 def note_odr_objc_missing_superclass : Note<"no corresponding superclass here">; 72 def err_odr_objc_method_result_type_inconsistent : Error< 73 "%select{class|instance}0 method %1 has incompatible result types in " 74 "different translation units (%2 vs. %3)">; 75 def err_odr_objc_method_num_params_inconsistent : Error< 76 "%select{class|instance}0 method %1 has a different number of parameters in " 77 "different translation units (%2 vs. %3)">; 78 def err_odr_objc_method_param_type_inconsistent : Error< 79 "%select{class|instance}0 method %1 has a parameter with a different types " 80 "in different translation units (%2 vs. %3)">; 81 def err_odr_objc_method_variadic_inconsistent : Error< 82 "%select{class|instance}0 method %1 is variadic in one translation unit " 83 "and not variadic in another">; 84 def note_odr_objc_method_here : Note< 85 "%select{class|instance}0 method %1 also declared here">; 86 def err_odr_objc_property_type_inconsistent : Error< 87 "property %0 declared with incompatible types in different " 88 "translation units (%1 vs. %2)">; 89 def err_odr_objc_property_impl_kind_inconsistent : Error< 90 "property %0 is implemented with %select{@synthesize|@dynamic}1 in one " 91 "translation but %select{@dynamic|@synthesize}1 in another translation unit">; 92 def note_odr_objc_property_impl_kind : Note< 93 "property %0 is implemented with %select{@synthesize|@dynamic}1 here">; 94 def err_odr_objc_synthesize_ivar_inconsistent : Error< 95 "property %0 is synthesized to different ivars in different translation " 96 "units (%1 vs. %2)">; 97 def note_odr_objc_synthesize_ivar_here : Note< 98 "property is synthesized to ivar %0 here">; 99 100 // Importing C++ ASTs 101 def err_odr_different_num_template_parameters : Error< 102 "template parameter lists have a different number of parameters (%0 vs %1)">; 103 def note_odr_template_parameter_list : Note< 104 "template parameter list also declared here">; 105 def err_odr_different_template_parameter_kind : Error< 106 "template parameter has different kinds in different translation units">; 107 def note_odr_template_parameter_here : Note< 108 "template parameter declared here">; 109 def err_odr_parameter_pack_non_pack : Error< 110 "parameter kind mismatch; parameter is %select{not a|a}0 parameter pack">; 111 def note_odr_parameter_pack_non_pack : Note< 112 "%select{parameter|parameter pack}0 declared here">; 113 def err_odr_non_type_parameter_type_inconsistent : Error< 114 "non-type template parameter declared with incompatible types in different " 115 "translation units (%0 vs. %1)">; 116 def err_unsupported_ast_node: Error<"cannot import unsupported AST node %0">; 117 } 118