1 //==--- DiagnosticCommonKinds.td - common 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 //===----------------------------------------------------------------------===// 11 // Common Helpers 12 //===----------------------------------------------------------------------===// 13 14 let Component = "Common" in { 15 16 // Basic. 17 18 def fatal_too_many_errors 19 : Error<"too many errors emitted, stopping now">, DefaultFatal; 20 21 def note_declared_at : Note<"declared here">; 22 def note_previous_definition : Note<"previous definition is here">; 23 def note_previous_declaration : Note<"previous declaration is here">; 24 def note_previous_implicit_declaration : Note< 25 "previous implicit declaration is here">; 26 def note_previous_use : Note<"previous use is here">; 27 def note_duplicate_case_prev : Note<"previous case defined here">; 28 def note_forward_declaration : Note<"forward declaration of %0">; 29 def note_type_being_defined : Note< 30 "definition of %0 is not complete until the closing '}'">; 31 /// note_matching - this is used as a continuation of a previous diagnostic, 32 /// e.g. to specify the '(' when we expected a ')'. 33 def note_matching : Note<"to match this '%0'">; 34 35 def note_using : Note<"using">; 36 def note_possibility : Note<"one possibility">; 37 def note_also_found : Note<"also found">; 38 39 // Parse && Lex 40 41 let CategoryName = "Lexical or Preprocessor Issue" in { 42 43 def err_expected_colon : Error<"expected ':'">; 44 def err_expected_colon_after_setter_name : Error< 45 "method name referenced in property setter attribute " 46 "must end with ':'">; 47 def err_expected_string_literal : Error<"expected string literal " 48 "%select{in %1|for diagnostic message in static_assert|" 49 "for optional message in 'availability' attribute}0">; 50 def err_invalid_string_udl : Error< 51 "string literal with user-defined suffix cannot be used here">; 52 def err_invalid_character_udl : Error< 53 "character literal with user-defined suffix cannot be used here">; 54 def err_invalid_numeric_udl : Error< 55 "numeric literal with user-defined suffix cannot be used here">; 56 57 } 58 59 // Parse && Sema 60 61 let CategoryName = "Parse Issue" in { 62 63 def err_param_redefinition : Error<"redefinition of parameter %0">; 64 def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">; 65 def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">, 66 InGroup<DuplicateArgDecl>, DefaultIgnore; 67 def err_invalid_storage_class_in_func_decl : Error< 68 "invalid storage class specifier in function declarator">; 69 def err_expected_namespace_name : Error<"expected namespace name">; 70 def ext_variadic_templates : ExtWarn< 71 "variadic templates are a C++11 extension">, InGroup<CXX11>; 72 def warn_cxx98_compat_variadic_templates : 73 Warning<"variadic templates are incompatible with C++98">, 74 InGroup<CXX98Compat>, DefaultIgnore; 75 def err_default_special_members : Error< 76 "only special member functions may be defaulted">; 77 def err_deleted_non_function : Error< 78 "only functions can have deleted definitions">; 79 def err_module_not_found : Error<"module '%0' not found">, DefaultFatal; 80 def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal; 81 def err_module_cycle : Error<"cyclic dependency in module '%0': %1">, 82 DefaultFatal; 83 def note_pragma_entered_here : Note<"#pragma entered here">; 84 def note_decl_hiding_tag_type : Note< 85 "%1 %0 is hidden by a non-type declaration of %0 here">; 86 def err_attribute_not_type_attr : Error< 87 "%0 attribute cannot be applied to types">; 88 def err_enum_template : Error<"enumeration cannot be a template">; 89 90 } 91 92 // Sema && Lex 93 def ext_c99_longlong : Extension< 94 "'long long' is an extension when C99 mode is not enabled">, 95 InGroup<LongLong>; 96 def ext_cxx11_longlong : Extension< 97 "'long long' is a C++11 extension">, 98 InGroup<CXX11LongLong>; 99 def warn_cxx98_compat_longlong : Warning< 100 "'long long' is incompatible with C++98">, 101 InGroup<CXX98CompatPedantic>, DefaultIgnore; 102 def err_integer_too_large : Error< 103 "integer constant is larger than the largest unsigned integer type">; 104 def warn_integer_too_large_for_signed : Warning< 105 "integer constant is larger than the largest signed integer type">; 106 107 // Sema && AST 108 def note_invalid_subexpr_in_const_expr : Note< 109 "subexpression not valid in a constant expression">; 110 111 // Targets 112 113 def err_target_unknown_triple : Error< 114 "unknown target triple '%0', please use -triple or -arch">; 115 def err_target_unknown_cpu : Error<"unknown target CPU '%0'">; 116 def err_target_unknown_abi : Error<"unknown target ABI '%0'">; 117 def err_target_unknown_cxxabi : Error<"unknown C++ ABI '%0'">; 118 def err_target_invalid_feature : Error<"invalid target feature '%0'">; 119 120 // Source manager 121 def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal; 122 def err_file_modified : Error< 123 "file '%0' modified since it was first processed">, DefaultFatal; 124 def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but " 125 "encoding is not supported">, DefaultFatal; 126 def err_unable_to_rename_temp : Error< 127 "unable to rename temporary '%0' to output file '%1': '%2'">; 128 def err_unable_to_make_temp : Error< 129 "unable to make temporary file: %0">; 130 131 // Modules 132 def err_module_file_conflict : Error<"module '%0' found in both '%1' and '%2'">; 133 134 } 135