File: DiagnosticCommonKinds.td

package info (click to toggle)
llvm-toolchain-5.0 1:5.0.1-2~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 553,688 kB
  • sloc: cpp: 2,878,786; ansic: 584,110; asm: 246,252; python: 124,751; objc: 106,925; sh: 21,542; lisp: 8,628; pascal: 5,885; ml: 5,544; perl: 5,312; makefile: 2,208; cs: 2,022; xml: 686; php: 212; csh: 117
file content (230 lines) | stat: -rw-r--r-- 9,911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
//==--- DiagnosticCommonKinds.td - common diagnostics ---------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//===----------------------------------------------------------------------===//
// Common Helpers
//===----------------------------------------------------------------------===//

let Component = "Common" in {

// Basic.

def fatal_too_many_errors
  : Error<"too many errors emitted, stopping now">, DefaultFatal; 

def note_declared_at : Note<"declared here">;
def note_previous_definition : Note<"previous definition is here">;
def note_previous_declaration : Note<"previous declaration is here">;
def note_previous_implicit_declaration : Note<
  "previous implicit declaration is here">;
def note_previous_use : Note<"previous use is here">;
def note_duplicate_case_prev : Note<"previous case defined here">;
def note_forward_declaration : Note<"forward declaration of %0">;
def note_type_being_defined : Note<
  "definition of %0 is not complete until the closing '}'">;
/// note_matching - this is used as a continuation of a previous diagnostic,
/// e.g. to specify the '(' when we expected a ')'.
def note_matching : Note<"to match this %0">;

def note_using : Note<"using">;
def note_possibility : Note<"one possibility">;
def note_also_found : Note<"also found">;

// Parse && Lex

let CategoryName = "Lexical or Preprocessor Issue" in {

def err_expected_colon_after_setter_name : Error<
  "method name referenced in property setter attribute "
  "must end with ':'">;
def err_expected_string_literal : Error<"expected string literal "
  "%select{in %1|for diagnostic message in static_assert|"
          "for optional message in 'availability' attribute|"
          "for %select{language|source container}1 name in "
          "'external_source_symbol' attribute}0">;
def err_invalid_string_udl : Error<
  "string literal with user-defined suffix cannot be used here">;
def err_invalid_character_udl : Error<
  "character literal with user-defined suffix cannot be used here">;
def err_invalid_numeric_udl : Error<
  "numeric literal with user-defined suffix cannot be used here">;

}

// Parse && Sema

let CategoryName = "Parse Issue" in {

def err_expected : Error<"expected %0">;
def err_expected_either : Error<"expected %0 or %1">;
def err_expected_after : Error<"expected %1 after %0">;

def err_param_redefinition : Error<"redefinition of parameter %0">;
def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">;
def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">,
  InGroup<DuplicateArgDecl>, DefaultIgnore;
def err_invalid_storage_class_in_func_decl : Error<
  "invalid storage class specifier in function declarator">;
def err_expected_namespace_name : Error<"expected namespace name">;
def ext_variadic_templates : ExtWarn<
  "variadic templates are a C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_variadic_templates :
  Warning<"variadic templates are incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_default_special_members : Error<
  "only special member functions may be defaulted">;
def err_deleted_non_function : Error<
  "only functions can have deleted definitions">;
def err_module_not_found : Error<"module '%0' not found">, DefaultFatal;
def err_module_not_built : Error<"could not build module '%0'">, DefaultFatal;
def err_module_build_disabled: Error<
  "module '%0' is needed but has not been provided, and implicit use of module "
  "files is disabled">, DefaultFatal;
def err_module_unavailable : Error<
  "module '%0' %select{is incompatible with|requires}1 feature '%2'">;
def err_module_header_missing : Error<
  "%select{|umbrella }0header '%1' not found">;
def remark_module_lock_failure : Remark<
  "could not acquire lock file for module '%0': %1">, InGroup<ModuleBuild>;
def remark_module_lock_timeout : Remark<
  "timed out waiting to acquire lock file for module '%0'">, InGroup<ModuleBuild>;
def err_module_cycle : Error<"cyclic dependency in module '%0': %1">, 
  DefaultFatal;
def err_module_prebuilt : Error<
  "error in loading module '%0' from prebuilt module path">, DefaultFatal;
def note_pragma_entered_here : Note<"#pragma entered here">;  
def note_decl_hiding_tag_type : Note<
  "%1 %0 is hidden by a non-type declaration of %0 here">;
def err_attribute_not_type_attr : Error<
  "%0 attribute cannot be applied to types">;
def err_enum_template : Error<"enumeration cannot be a template">;

}

let CategoryName = "Nullability Issue" in {

def warn_nullability_duplicate : Warning<
  "duplicate nullability specifier %0">,
  InGroup<Nullability>;
  
def warn_conflicting_nullability_attr_overriding_ret_types : Warning<
  "conflicting nullability specifier on return types, %0 "
  "conflicts with existing specifier %1">,
  InGroup<Nullability>;

def warn_conflicting_nullability_attr_overriding_param_types : Warning<
  "conflicting nullability specifier on parameter types, %0 "
  "conflicts with existing specifier %1">,
  InGroup<Nullability>;

def err_nullability_conflicting : Error<
  "nullability specifier %0 conflicts with existing specifier %1">;

}

// Sema && Lex
def ext_c99_longlong : Extension<
  "'long long' is an extension when C99 mode is not enabled">,
  InGroup<LongLong>;
def ext_cxx11_longlong : Extension<
  "'long long' is a C++11 extension">,
  InGroup<CXX11LongLong>;
def warn_cxx98_compat_longlong : Warning<
  "'long long' is incompatible with C++98">,
  InGroup<CXX98CompatPedantic>, DefaultIgnore;
def err_integer_literal_too_large : Error<
  "integer literal is too large to be represented in any %select{signed |}0"
  "integer type">;
def ext_integer_literal_too_large_for_signed : ExtWarn<
  "integer literal is too large to be represented in a signed integer type, "
  "interpreting as unsigned">,
  InGroup<ImplicitlyUnsignedLiteral>;
def warn_old_implicitly_unsigned_long : Warning<
  "integer literal is too large to be represented in type 'long', "
  "interpreting as 'unsigned long' per C89; this literal will "
  "%select{have type 'long long'|be ill-formed}0 in C99 onwards">,
  InGroup<C99Compat>;
def warn_old_implicitly_unsigned_long_cxx : Warning<
  "integer literal is too large to be represented in type 'long', "
  "interpreting as 'unsigned long' per C++98; this literal will "
  "%select{have type 'long long'|be ill-formed}0 in C++11 onwards">,
  InGroup<CXX11Compat>;
def ext_old_implicitly_unsigned_long_cxx : ExtWarn<
  "integer literal is too large to be represented in type 'long' and is "
  "subject to undefined behavior under C++98, interpreting as 'unsigned long'; "
  "this literal will %select{have type 'long long'|be ill-formed}0 "
  "in C++11 onwards">,
  InGroup<CXX11Compat>;
def ext_clang_enable_if : Extension<"'enable_if' is a clang extension">,
                          InGroup<GccCompat>;
def ext_clang_diagnose_if : Extension<"'diagnose_if' is a clang extension">,
                            InGroup<GccCompat>;

// SEH
def err_seh_expected_handler : Error<
  "expected '__except' or '__finally' block">;
def err_seh___except_block : Error<
  "%0 only allowed in __except block or filter expression">;
def err_seh___except_filter : Error<
  "%0 only allowed in __except filter expression">;
def err_seh___finally_block : Error<
  "%0 only allowed in __finally block">;

// Sema && AST
def note_invalid_subexpr_in_const_expr : Note<
  "subexpression not valid in a constant expression">;

// Targets

def err_target_unknown_triple : Error<
  "unknown target triple '%0', please use -triple or -arch">;
def err_target_unknown_cpu : Error<"unknown target CPU '%0'">;
def err_target_unknown_abi : Error<"unknown target ABI '%0'">;
def err_target_unsupported_abi : Error<"ABI '%0' is not supported on CPU '%1'">;
def err_target_unsupported_abi_for_triple : Error<
  "ABI '%0' is not supported for '%1'">;
def err_target_unknown_fpmath : Error<"unknown FP unit '%0'">;
def err_target_unsupported_fpmath : Error<
    "the '%0' unit is not supported with this instruction set">;
def err_target_unsupported_unaligned : Error<
  "the %0 sub-architecture does not support unaligned accesses">;
def err_target_unsupported_execute_only : Error<
  "execute only is not supported for the %0 sub-architecture">;
def err_opt_not_valid_with_opt : Error<
  "option '%0' cannot be specified with '%1'">;

// Source manager
def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
def err_file_modified : Error<
  "file '%0' modified since it was first processed">, DefaultFatal;
def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
  "encoding is not supported">, DefaultFatal;
def err_unable_to_rename_temp : Error<
  "unable to rename temporary '%0' to output file '%1': '%2'">;
def err_unable_to_make_temp : Error<
  "unable to make temporary file: %0">;
  
// Modules
def err_module_format_unhandled : Error<
  "no handler registered for module format '%0'">, DefaultFatal;

// TransformActions
// TODO: Use a custom category name to distinguish rewriter errors.
def err_mt_message : Error<"[rewriter] %0">, SuppressInSystemHeader;
def warn_mt_message : Warning<"[rewriter] %0">;
def note_mt_message : Note<"[rewriter] %0">;

// ARCMigrate
def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;

// OpenMP
def err_omp_more_one_clause : Error<
  "directive '#pragma omp %0' cannot contain more than one '%1' clause%select{| with '%3' name modifier| with 'source' dependence}2">;
}