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}0">;
49 def err_invalid_string_udl : Error<
50 "string literal with user-defined suffix cannot be used here">;
51 def err_invalid_character_udl : Error<
52 "character literal with user-defined suffix cannot be used here">;
53 def err_invalid_numeric_udl : Error<
54 "numeric literal with user-defined suffix cannot be used here">;
60 let CategoryName = "Parse Issue" in {
62 def err_expected : Error<"expected %0">;
63 def err_expected_either : Error<"expected %0 or %1">;
64 def err_expected_after : Error<"expected %1 after %0">;
66 def err_param_redefinition : Error<"redefinition of parameter %0">;
67 def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">;
68 def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">,
69 InGroup<DuplicateArgDecl>, DefaultIgnore;
70 def err_invalid_storage_class_in_func_decl : Error<
71 "invalid storage class specifier in function declarator">;
72 def err_expected_namespace_name : Error<"expected namespace name">;
73 def ext_variadic_templates : ExtWarn<
74 "variadic templates are a C++11 extension">, InGroup<CXX11>;
75 def warn_cxx98_compat_variadic_templates :
76 Warning<"variadic templates are incompatible with C++98">,
77 InGroup<CXX98Compat>, DefaultIgnore;
78 def err_default_special_members : Error<
79 "only special member functions may be defaulted">;
80 def err_deleted_non_function : Error<
81 "only functions can have deleted definitions">;
82 def err_module_not_found : Error<"module '%0' not found">, DefaultFatal;
83 def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal;
84 def err_module_lock_failure : Error<
85 "could not acquire lock file for module '%0'">, DefaultFatal;
86 def err_module_cycle : Error<"cyclic dependency in module '%0': %1">,
88 def note_pragma_entered_here : Note<"#pragma entered here">;
89 def note_decl_hiding_tag_type : Note<
90 "%1 %0 is hidden by a non-type declaration of %0 here">;
91 def err_attribute_not_type_attr : Error<
92 "%0 attribute cannot be applied to types">;
93 def err_enum_template : Error<"enumeration cannot be a template">;
98 def ext_c99_longlong : Extension<
99 "'long long' is an extension when C99 mode is not enabled">,
101 def ext_cxx11_longlong : Extension<
102 "'long long' is a C++11 extension">,
103 InGroup<CXX11LongLong>;
104 def warn_cxx98_compat_longlong : Warning<
105 "'long long' is incompatible with C++98">,
106 InGroup<CXX98CompatPedantic>, DefaultIgnore;
107 def err_integer_literal_too_large : Error<
108 "integer literal is too large to be represented in any %select{signed |}0"
110 def ext_integer_literal_too_large_for_signed : ExtWarn<
111 "integer literal is too large to be represented in a signed integer type, "
112 "interpreting as unsigned">,
113 InGroup<DiagGroup<"implicitly-unsigned-literal">>;
116 def note_invalid_subexpr_in_const_expr : Note<
117 "subexpression not valid in a constant expression">;
121 def err_target_unknown_triple : Error<
122 "unknown target triple '%0', please use -triple or -arch">;
123 def err_target_unknown_cpu : Error<"unknown target CPU '%0'">;
124 def err_target_unknown_abi : Error<"unknown target ABI '%0'">;
125 def err_target_unknown_fpmath : Error<"unknown FP unit '%0'">;
126 def err_target_unsupported_fpmath : Error<
127 "the '%0' unit is not supported with this instruction set">;
128 def err_target_unsupported_unaligned : Error<
129 "the %0 sub-architecture does not support unaligned accesses">;
132 def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
133 def err_file_modified : Error<
134 "file '%0' modified since it was first processed">, DefaultFatal;
135 def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
136 "encoding is not supported">, DefaultFatal;
137 def err_unable_to_rename_temp : Error<
138 "unable to rename temporary '%0' to output file '%1': '%2'">;
139 def err_unable_to_make_temp : Error<
140 "unable to make temporary file: %0">;
143 def err_module_file_conflict : Error<"module '%0' found in both '%1' and '%2'">;
146 // TODO: Use a custom category name to distinguish rewriter errors.
147 def err_mt_message : Error<"[rewriter] %0">, SuppressInSystemHeader;
148 def warn_mt_message : Warning<"[rewriter] %0">;
149 def note_mt_message : Note<"[rewriter] %0">;
152 def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
153 def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;