1 //==--- DiagnosticCommonKinds.td - common 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 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
14 let Component = "Common" in {
18 def fatal_too_many_errors
19 : Error<"too many errors emitted, stopping now">, DefaultFatal;
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">;
35 def note_using : Note<"using">;
36 def note_possibility : Note<"one possibility">;
37 def note_also_found : Note<"also found">;
41 let CategoryName = "Lexical or Preprocessor Issue" in {
43 def err_expected_colon_after_setter_name : Error<
44 "method name referenced in property setter attribute "
46 def err_expected_string_literal : Error<"expected string literal "
47 "%select{in %1|for diagnostic message in static_assert|"
48 "for optional message in 'availability' attribute|"
49 "for %select{language|source container}1 name in "
50 "'external_source_symbol' attribute}0">;
51 def err_invalid_string_udl : Error<
52 "string literal with user-defined suffix cannot be used here">;
53 def err_invalid_character_udl : Error<
54 "character literal with user-defined suffix cannot be used here">;
55 def err_invalid_numeric_udl : Error<
56 "numeric literal with user-defined suffix cannot be used here">;
62 let CategoryName = "Parse Issue" in {
64 def err_expected : Error<"expected %0">;
65 def err_expected_either : Error<"expected %0 or %1">;
66 def err_expected_after : Error<"expected %1 after %0">;
68 def err_param_redefinition : Error<"redefinition of parameter %0">;
69 def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">;
70 def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">,
71 InGroup<DuplicateArgDecl>, DefaultIgnore;
72 def err_invalid_storage_class_in_func_decl : Error<
73 "invalid storage class specifier in function declarator">;
74 def err_expected_namespace_name : Error<"expected namespace name">;
75 def ext_variadic_templates : ExtWarn<
76 "variadic templates are a C++11 extension">, InGroup<CXX11>;
77 def warn_cxx98_compat_variadic_templates :
78 Warning<"variadic templates are incompatible with C++98">,
79 InGroup<CXX98Compat>, DefaultIgnore;
80 def err_default_special_members : Error<
81 "only special member functions may be defaulted">;
82 def err_deleted_non_function : Error<
83 "only functions can have deleted definitions">;
84 def err_module_not_found : Error<"module '%0' not found">, DefaultFatal;
85 def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal;
86 def err_module_build_disabled: Error<
87 "module '%0' is needed but has not been provided, and implicit use of module "
88 "files is disabled">, DefaultFatal;
89 def err_module_unavailable : Error<
90 "module '%0' %select{is incompatible with|requires}1 feature '%2'">;
91 def err_module_header_missing : Error<
92 "%select{|umbrella }0header '%1' not found">;
93 def remark_module_lock_failure : Remark<
94 "could not acquire lock file for module '%0': %1">, InGroup<ModuleBuild>;
95 def remark_module_lock_timeout : Remark<
96 "timed out waiting to acquire lock file for module '%0'">, InGroup<ModuleBuild>;
97 def err_module_shadowed : Error<"import of shadowed module '%0'">, DefaultFatal;
98 def err_module_build_shadowed_submodule : Error<
99 "build a shadowed submodule '%0'">, DefaultFatal;
100 def err_module_cycle : Error<"cyclic dependency in module '%0': %1">,
102 def err_module_prebuilt : Error<
103 "error in loading module '%0' from prebuilt module path">, DefaultFatal;
104 def note_pragma_entered_here : Note<"#pragma entered here">;
105 def note_decl_hiding_tag_type : Note<
106 "%1 %0 is hidden by a non-type declaration of %0 here">;
107 def err_attribute_not_type_attr : Error<
108 "%0 attribute cannot be applied to types">;
109 def err_enum_template : Error<"enumeration cannot be a template">;
113 let CategoryName = "Nullability Issue" in {
115 def warn_nullability_duplicate : Warning<
116 "duplicate nullability specifier %0">,
117 InGroup<Nullability>;
119 def warn_conflicting_nullability_attr_overriding_ret_types : Warning<
120 "conflicting nullability specifier on return types, %0 "
121 "conflicts with existing specifier %1">,
122 InGroup<Nullability>;
124 def warn_conflicting_nullability_attr_overriding_param_types : Warning<
125 "conflicting nullability specifier on parameter types, %0 "
126 "conflicts with existing specifier %1">,
127 InGroup<Nullability>;
129 def err_nullability_conflicting : Error<
130 "nullability specifier %0 conflicts with existing specifier %1">;
135 def ext_c99_longlong : Extension<
136 "'long long' is an extension when C99 mode is not enabled">,
138 def ext_cxx11_longlong : Extension<
139 "'long long' is a C++11 extension">,
140 InGroup<CXX11LongLong>;
141 def warn_cxx98_compat_longlong : Warning<
142 "'long long' is incompatible with C++98">,
143 InGroup<CXX98CompatPedantic>, DefaultIgnore;
144 def err_integer_literal_too_large : Error<
145 "integer literal is too large to be represented in any %select{signed |}0"
147 def ext_integer_literal_too_large_for_signed : ExtWarn<
148 "integer literal is too large to be represented in a signed integer type, "
149 "interpreting as unsigned">,
150 InGroup<ImplicitlyUnsignedLiteral>;
151 def warn_old_implicitly_unsigned_long : Warning<
152 "integer literal is too large to be represented in type 'long', "
153 "interpreting as 'unsigned long' per C89; this literal will "
154 "%select{have type 'long long'|be ill-formed}0 in C99 onwards">,
156 def warn_old_implicitly_unsigned_long_cxx : Warning<
157 "integer literal is too large to be represented in type 'long', "
158 "interpreting as 'unsigned long' per C++98; this literal will "
159 "%select{have type 'long long'|be ill-formed}0 in C++11 onwards">,
160 InGroup<CXX11Compat>;
161 def ext_old_implicitly_unsigned_long_cxx : ExtWarn<
162 "integer literal is too large to be represented in type 'long' and is "
163 "subject to undefined behavior under C++98, interpreting as 'unsigned long'; "
164 "this literal will %select{have type 'long long'|be ill-formed}0 "
166 InGroup<CXX11Compat>;
167 def ext_clang_enable_if : Extension<"'enable_if' is a clang extension">,
169 def ext_clang_diagnose_if : Extension<"'diagnose_if' is a clang extension">,
171 def err_too_large_for_fixed_point : Error<
172 "this value is too large for this fixed point type">;
173 def err_fixed_point_not_enabled : Error<"compile with "
174 "'-ffixed-point' to enable fixed point types">;
177 def err_seh_expected_handler : Error<
178 "expected '__except' or '__finally' block">;
179 def err_seh___except_block : Error<
180 "%0 only allowed in __except block or filter expression">;
181 def err_seh___except_filter : Error<
182 "%0 only allowed in __except filter expression">;
183 def err_seh___finally_block : Error<
184 "%0 only allowed in __finally block">;
187 def note_invalid_subexpr_in_const_expr : Note<
188 "subexpression not valid in a constant expression">;
192 def err_target_unknown_triple : Error<
193 "unknown target triple '%0', please use -triple or -arch">;
194 def err_target_unknown_cpu : Error<"unknown target CPU '%0'">;
195 def note_valid_options : Note<"valid target CPU values are: %0">;
196 def err_target_unsupported_cpu_for_micromips : Error<
197 "micromips is not supported for target CPU '%0'">;
198 def err_target_unknown_abi : Error<"unknown target ABI '%0'">;
199 def err_target_unsupported_abi : Error<"ABI '%0' is not supported on CPU '%1'">;
200 def err_target_unsupported_abi_for_triple : Error<
201 "ABI '%0' is not supported for '%1'">;
202 def err_target_unknown_fpmath : Error<"unknown FP unit '%0'">;
203 def err_target_unsupported_fpmath : Error<
204 "the '%0' unit is not supported with this instruction set">;
205 def err_target_unsupported_unaligned : Error<
206 "the %0 sub-architecture does not support unaligned accesses">;
207 def err_target_unsupported_execute_only : Error<
208 "execute only is not supported for the %0 sub-architecture">;
209 def err_opt_not_valid_with_opt : Error<
210 "option '%0' cannot be specified with '%1'">;
211 def err_opt_not_valid_without_opt : Error<
212 "option '%0' cannot be specified without '%1'">;
213 def err_opt_not_valid_on_target : Error<
214 "option '%0' cannot be specified on this target">;
217 def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
218 def err_file_modified : Error<
219 "file '%0' modified since it was first processed">, DefaultFatal;
220 def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
221 "encoding is not supported">, DefaultFatal;
222 def err_unable_to_rename_temp : Error<
223 "unable to rename temporary '%0' to output file '%1': '%2'">;
224 def err_unable_to_make_temp : Error<
225 "unable to make temporary file: %0">;
228 def err_module_format_unhandled : Error<
229 "no handler registered for module format '%0'">, DefaultFatal;
232 // TODO: Use a custom category name to distinguish rewriter errors.
233 def err_mt_message : Error<"[rewriter] %0">, SuppressInSystemHeader;
234 def warn_mt_message : Warning<"[rewriter] %0">;
235 def note_mt_message : Note<"[rewriter] %0">;
238 def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
239 def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;
242 def err_openclcxx_not_supported : Error<
243 "'%0' is not supported in OpenCL C++">;
246 def err_omp_more_one_clause : Error<
247 "directive '#pragma omp %0' cannot contain more than one '%1' clause%select{| with '%3' name modifier| with 'source' dependence}2">;