]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSerializationKinds.td
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Basic / DiagnosticSerializationKinds.td
1 //==--- DiagnosticSerializationKinds.td - serialization 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 = "Serialization" in {
11 let CategoryName = "AST Deserialization Issue" in {
12
13 def err_fe_unable_to_read_pch_file : Error<
14     "unable to read PCH file %0: '%1'">;
15 def err_fe_not_a_pch_file : Error<
16     "input is not a PCH file: '%0'">;
17 def err_fe_pch_malformed : Error<
18     "malformed or corrupted AST file: '%0'">, DefaultFatal;
19 def err_fe_pch_malformed_block : Error<
20     "malformed block record in PCH file: '%0'">, DefaultFatal;
21 def err_fe_pch_file_modified : Error<
22     "file '%0' has been modified since the precompiled header '%1' was built">,
23     DefaultFatal;
24 def err_fe_module_file_modified : Error<
25     "file '%0' has been modified since the module file '%1' was built">,
26     DefaultFatal;
27 def err_fe_ast_file_modified : Error<
28     "file '%0' has been modified since the AST file '%1' was built">,
29     DefaultFatal;
30 def err_fe_pch_file_overridden : Error<
31     "file '%0' from the precompiled header has been overridden">;
32 def note_pch_required_by : Note<"'%0' required by '%1'">;
33 def note_pch_rebuild_required : Note<"please rebuild precompiled header '%0'">;
34 def note_module_cache_path : Note<
35     "after modifying system headers, please delete the module cache at '%0'">;
36
37 def err_pch_targetopt_mismatch : Error<
38     "PCH file was compiled for the %0 '%1' but the current translation "
39     "unit is being compiled for target '%2'">;
40 def err_pch_targetopt_feature_mismatch : Error<
41     "%select{AST file was|current translation unit is}0 compiled with the target "
42     "feature '%1' but the %select{current translation unit is|AST file was}0 "
43     "not">;
44 def err_pch_langopt_mismatch : Error<"%0 was %select{disabled|enabled}1 in "
45     "PCH file but is currently %select{disabled|enabled}2">;
46 def err_pch_langopt_value_mismatch : Error<
47   "%0 differs in PCH file vs. current file">;
48 def err_pch_diagopt_mismatch : Error<"%0 is currently enabled, but was not in "
49   "the PCH file">;
50 def err_pch_modulecache_mismatch : Error<"PCH was compiled with module cache "
51   "path '%0', but the path is currently '%1'">;
52
53 def err_pch_version_too_old : Error<
54     "PCH file uses an older PCH format that is no longer supported">;
55 def err_pch_version_too_new : Error<
56     "PCH file uses a newer PCH format that cannot be read">;
57 def err_pch_different_branch : Error<
58     "PCH file built from a different branch (%0) than the compiler (%1)">;
59 def err_pch_with_compiler_errors : Error<
60     "PCH file contains compiler errors">;
61
62 def err_module_file_conflict : Error<
63   "module '%0' is defined in both '%1' and '%2'">, DefaultFatal;
64 def err_module_file_not_found : Error<
65   "%select{PCH|module|AST}0 file '%1' not found%select{|: %3}2">, DefaultFatal;
66 def err_module_file_out_of_date : Error<
67   "%select{PCH|module|AST}0 file '%1' is out of date and "
68   "needs to be rebuilt%select{|: %3}2">, DefaultFatal;
69 def err_module_file_invalid : Error<
70   "file '%1' is not a valid precompiled %select{PCH|module|AST}0 file">, DefaultFatal;
71 def note_module_file_imported_by : Note<
72   "imported by %select{|module '%2' in }1'%0'">;
73 def err_module_file_not_module : Error<
74   "AST file '%0' was not built as a module">, DefaultFatal;
75
76 def err_imported_module_not_found : Error<
77     "module '%0' in AST file '%1' (imported by AST file '%2') "
78     "is not defined in any loaded module map file; "
79     "maybe you need to load '%3'?">, DefaultFatal;
80 def note_imported_by_pch_module_not_found : Note<
81     "consider adding '%0' to the header search path">;
82 def err_imported_module_modmap_changed : Error<
83     "module '%0' imported by AST file '%1' found in a different module map file"
84     " (%2) than when the importing AST file was built (%3)">, DefaultFatal;
85 def err_imported_module_relocated : Error<
86     "module '%0' was built in directory '%1' but now resides in "
87     "directory '%2'">, DefaultFatal;
88 def err_module_different_modmap : Error<
89     "module '%0' %select{uses|does not use}1 additional module map '%2'"
90     "%select{| not}1 used when the module was built">;
91
92 def err_pch_macro_def_undef : Error<
93     "macro '%0' was %select{defined|undef'd}1 in the precompiled header but "
94     "%select{undef'd|defined}1 on the command line">;
95 def err_pch_macro_def_conflict : Error<
96     "definition of macro '%0' differs between the precompiled header ('%1') "
97     "and the command line ('%2')">;
98 def err_pch_undef : Error<
99     "%select{command line contains|precompiled header was built with}0 "
100     "'-undef' but %select{precompiled header was not built with it|"
101     "it is not present on the command line}0">;
102 def err_pch_pp_detailed_record : Error<
103     "%select{command line contains|precompiled header was built with}0 "
104     "'-detailed-preprocessing-record' but %select{precompiled header was not "
105     "built with it|it is not present on the command line}0">;
106
107 def err_module_odr_violation_missing_decl : Error<
108   "%q0 from module '%1' is not present in definition of %q2"
109   "%select{ in module '%4'| provided earlier}3">, NoSFINAE;
110 def note_module_odr_violation_no_possible_decls : Note<
111   "definition has no member %0">;
112 def note_module_odr_violation_possible_decl : Note<
113   "declaration of %0 does not match">;
114 def err_module_odr_violation_different_definitions : Error<
115   "%q0 has different definitions in different modules; "
116   "%select{definition in module '%2' is here|defined here}1">;
117 def note_first_module_difference : Note<
118   "in first definition, possible difference is here">;
119 def note_module_odr_violation_different_definitions : Note<
120   "definition in module '%0' is here">;
121 def note_second_module_difference : Note<
122   "in second definition, possible difference is here">;
123
124 def err_module_odr_violation_different_instantiations : Error<
125   "instantiation of %q0 is different in different modules">;
126
127 def err_module_odr_violation_definition_data : Error <
128   "%q0 has different definitions in different modules; first difference is "
129   "%select{definition in module '%2'|defined here}1 found "
130   "%select{"
131   "%4 base %plural{1:class|:classes}4|"
132   "%4 virtual base %plural{1:class|:classes}4|"
133   "%ordinal4 base class with type %5|"
134   "%ordinal4 %select{non-virtual|virtual}5 base class %6|"
135   "%ordinal4 base class %5 with "
136   "%select{public|protected|private|no}6 access specifier}3">;
137
138 def note_module_odr_violation_definition_data : Note <
139   "but in '%0' found "
140   "%select{"
141   "%2 base %plural{1:class|:classes}2|"
142   "%2 virtual base %plural{1:class|:classes}2|"
143   "%ordinal2 base class with different type %3|"
144   "%ordinal2 %select{non-virtual|virtual}3 base class %4|"
145   "%ordinal2 base class %3 with "
146   "%select{public|protected|private|no}4 access specifier}1">;
147
148 def err_module_odr_violation_template_parameter : Error <
149   "%q0 has different definitions in different modules; first difference is "
150   "%select{definition in module '%2'|defined here}1 found "
151   "%select{"
152   "unnamed template parameter|"
153   "template parameter %4|"
154   "template parameter with %select{no |}4default argument|"
155   "template parameter with default argument}3">;
156
157
158 def note_module_odr_violation_template_parameter : Note <
159   "but in '%0' found "
160   "%select{"
161   "unnamed template parameter %2|"
162   "template parameter %2|"
163   "template parameter with %select{no |}2default argument|"
164   "template parameter with different default argument}1">;
165
166 def err_module_odr_violation_mismatch_decl : Error<
167   "%q0 has different definitions in different modules; first difference is "
168   "%select{definition in module '%2'|defined here}1 found "
169   "%select{end of class|public access specifier|private access specifier|"
170   "protected access specifier|static assert|field|method|type alias|typedef|"
171   "data member|friend declaration|function template}3">;
172 def note_module_odr_violation_mismatch_decl : Note<"but in '%0' found "
173   "%select{end of class|public access specifier|private access specifier|"
174   "protected access specifier|static assert|field|method|type alias|typedef|"
175   "data member|friend declaration|function template}1">;
176
177 def err_module_odr_violation_mismatch_decl_diff : Error<
178   "%q0 has different definitions in different modules; first difference is "
179   "%select{definition in module '%2'|defined here}1 found "
180   "%select{"
181   "static assert with condition|"
182   "static assert with message|"
183   "static assert with %select{|no }4message|"
184   "field %4|"
185   "field %4 with type %5|"
186   "%select{non-|}5bitfield %4|"
187   "bitfield %4 with one width expression|"
188   "%select{non-|}5mutable field %4|"
189   "field %4 with %select{no|an}5 initalizer|"
190   "field %4 with an initializer|"
191   "%select{method %5|constructor|destructor}4|"
192   "%select{method %5|constructor|destructor}4 "
193     "is %select{not deleted|deleted}6|"
194   "%select{method %5|constructor|destructor}4 "
195     "is %select{not defaulted|defaulted}6|"
196   "%select{method %5|constructor|destructor}4 "
197     "is %select{|pure }6%select{not virtual|virtual}7|"
198   "%select{method %5|constructor|destructor}4 "
199     "is %select{not static|static}6|"
200   "%select{method %5|constructor|destructor}4 "
201     "is %select{not volatile|volatile}6|"
202   "%select{method %5|constructor|destructor}4 "
203     "is %select{not const|const}6|"
204   "%select{method %5|constructor|destructor}4 "
205     "is %select{not inline|inline}6|"
206   "%select{method %5|constructor|destructor}4 "
207     "that has %6 parameter%s6|"
208   "%select{method %5|constructor|destructor}4 "
209     "with %ordinal6 parameter of type %7%select{| decayed from %9}8|"
210   "%select{method %5|constructor|destructor}4 "
211     "with %ordinal6 parameter named %7|"
212   "%select{method %5|constructor|destructor}4 "
213     "with %ordinal6 parameter with%select{out|}7 a default argument|"
214   "%select{method %5|constructor|destructor}4 "
215     "with %ordinal6 parameter with a default argument|"
216   "%select{method %5|constructor|destructor}4 "
217     "with %select{no |}6template arguments|"
218   "%select{method %5|constructor|destructor}4 "
219     "with %6 template argument%s6|"
220   "%select{method %5|constructor|destructor}4 "
221     "with %6 for %ordinal7 template argument|"
222   "%select{method %5|constructor|destructor}4 "
223     "with %select{no body|body}6|"
224   "%select{method %5|constructor|destructor}4 "
225     "with body|"
226   "%select{typedef|type alias}4 name %5|"
227   "%select{typedef|type alias}4 %5 with underlying type %6|"
228   "data member with name %4|"
229   "data member %4 with type %5|"
230   "data member %4 with%select{out|}5 an initializer|"
231   "data member %4 with an initializer|"
232   "data member %4 %select{is constexpr|is not constexpr}5|"
233   "friend %select{class|function}4|"
234   "friend %4|"
235   "friend function %4|"
236   "function template %4 with %5 template parameter%s5|"
237   "function template %4 with %ordinal5 template parameter being a "
238     "%select{type|non-type|template}6 template parameter|"
239   "function template %4 with %ordinal5 template parameter "
240     "%select{with no name|named %7}6|"
241   "function template %4 with %ordinal5 template parameter with "
242     "%select{no |}6default argument|"
243   "function template %4 with %ordinal5 template parameter with "
244     "default argument %6|"
245   "function template %4 with %ordinal5 template parameter with one type|"
246   "function template %4 with %ordinal5 template parameter %select{not |}6"
247     "being a template parameter pack|"
248   "}3">;
249
250 def note_module_odr_violation_mismatch_decl_diff : Note<"but in '%0' found "
251   "%select{"
252   "static assert with different condition|"
253   "static assert with different message|"
254   "static assert with %select{|no }2message|"
255   "field %2|"
256   "field %2 with type %3|"
257   "%select{non-|}3bitfield %2|"
258   "bitfield %2 with different width expression|"
259   "%select{non-|}3mutable field %2|"
260   "field %2 with %select{no|an}3 initializer|"
261   "field %2 with a different initializer|"
262   "%select{method %3|constructor|destructor}2|"
263   "%select{method %3|constructor|destructor}2 "
264     "is %select{not deleted|deleted}4|"
265   "%select{method %3|constructor|destructor}2 "
266     "is %select{not defaulted|defaulted}4|"
267   "%select{method %3|constructor|destructor}2 "
268     "is %select{|pure }4%select{not virtual|virtual}5|"
269   "%select{method %3|constructor|destructor}2 "
270     "is %select{not static|static}4|"
271   "%select{method %3|constructor|destructor}2 "
272     "is %select{not volatile|volatile}4|"
273   "%select{method %3|constructor|destructor}2 "
274     "is %select{not const|const}4|"
275   "%select{method %3|constructor|destructor}2 "
276     "is %select{not inline|inline}4|"
277   "%select{method %3|constructor|destructor}2 "
278     "that has %4 parameter%s4|"
279   "%select{method %3|constructor|destructor}2 "
280     "with %ordinal4 parameter of type %5%select{| decayed from %7}6|"
281   "%select{method %3|constructor|destructor}2 "
282     "with %ordinal4 parameter named %5|"
283   "%select{method %3|constructor|destructor}2 "
284     "with %ordinal4 parameter with%select{out|}5 a default argument|"
285   "%select{method %3|constructor|destructor}2 "
286     "with %ordinal4 parameter with a different default argument|"
287   "%select{method %3|constructor|destructor}2 "
288     "with %select{no |}4template arguments|"
289   "%select{method %3|constructor|destructor}2 "
290     "with %4 template argument%s4|"
291   "%select{method %3|constructor|destructor}2 "
292     "with %4 for %ordinal5 template argument|"
293   "%select{method %3|constructor|destructor}2 "
294     "with %select{no body|body}4|"
295   "%select{method %3|constructor|destructor}2 "
296     "with different body|"
297   "%select{typedef|type alias}2 name %3|"
298   "%select{typedef|type alias}2 %3 with different underlying type %4|"
299   "data member with name %2|"
300   "data member %2 with different type %3|"
301   "data member %2 with%select{out|}3 an initializer|"
302   "data member %2 with a different initializer|"
303   "data member %2 %select{is constexpr|is not constexpr}3|"
304   "friend %select{class|function}2|"
305   "friend %2|"
306   "friend function %2|"
307   "function template %2 with %3 template parameter%s3|"
308   "function template %2 with %ordinal3 template paramter being a "
309     "%select{type|non-type|template}4 template parameter|"
310   "function template %2 with %ordinal3 template parameter "
311     "%select{with no name|named %5}4|"
312   "function template %2 with %ordinal3 template parameter with "
313     "%select{no |}4default argument|"
314   "function template %2 with %ordinal3 template parameter with "
315     "default argument %4|"
316   "function template %2 with %ordinal3 template parameter with different type|"
317   "function template %2 with %ordinal3 template parameter %select{not |}4"
318     "being a template parameter pack|"
319   "}1">;
320
321 def err_module_odr_violation_function : Error<
322   "%q0 has different definitions in different modules; "
323   "%select{definition in module '%2'|defined here}1 "
324   "first difference is "
325   "%select{"
326   "return type is %4|"
327   "%ordinal4 parameter with name %5|"
328   "%ordinal4 parameter with type %5%select{| decayed from %7}6|"
329   "%ordinal4 parameter with%select{out|}5 a default argument|"
330   "%ordinal4 parameter with a default argument|"
331   "function body"
332   "}3">;
333
334 def note_module_odr_violation_function : Note<"but in '%0' found "
335   "%select{"
336   "different return type %2|"
337   "%ordinal2 parameter with name %3|"
338   "%ordinal2 parameter with type %3%select{| decayed from %5}4|"
339   "%ordinal2 parameter with%select{out|}3 a default argument|"
340   "%ordinal2 parameter with a different default argument|"
341   "a different body"
342   "}1">;
343
344 def err_module_odr_violation_enum : Error<
345   "%q0 has different definitions in different modules; "
346   "%select{definition in module '%2'|defined here}1 "
347   "first difference is "
348   "%select{"
349   "enum that is %select{not scoped|scoped}4|"
350   "enum scoped with keyword %select{struct|class}4|"
351   "enum %select{without|with}4 specified type|"
352   "enum with specified type %4|"
353   "enum with %4 element%s4|"
354   "%ordinal4 element has name %5|"
355   "%ordinal4 element %5 %select{has|does not have}6 an initilizer|"
356   "%ordinal4 element %5 has an initializer|"
357   "}3">;
358
359 def note_module_odr_violation_enum : Note<"but in '%0' found "
360   "%select{"
361   "enum that is %select{not scoped|scoped}2|"
362   "enum scoped with keyword %select{struct|class}2|"
363   "enum %select{without|with}2 specified type|"
364   "enum with specified type %2|"
365   "enum with %2 element%s2|"
366   "%ordinal2 element has name %3|"
367   "%ordinal2 element %3 %select{has|does not have}4 an initializer|"
368   "%ordinal2 element %3 has different initializer|"
369   "}1">;
370
371 def err_module_odr_violation_mismatch_decl_unknown : Error<
372   "%q0 %select{with definition in module '%2'|defined here}1 has different "
373   "definitions in different modules; first difference is this "
374   "%select{||||static assert|field|method|type alias|typedef|data member|"
375   "friend declaration|unexpected decl}3">;
376 def note_module_odr_violation_mismatch_decl_unknown : Note<
377   "but in '%0' found "
378   "%select{||||different static assert|different field|different method|"
379   "different type alias|different typedef|different data member|"
380   "different friend declaration|another unexpected decl}1">;
381
382 def warn_duplicate_module_file_extension : Warning<
383   "duplicate module file extension block name '%0'">,
384   InGroup<ModuleFileExtension>;
385
386 def warn_module_system_bit_conflict : Warning<
387   "module file '%0' was validated as a system module and is now being imported "
388   "as a non-system module; any difference in diagnostic options will be ignored">,
389   InGroup<ModuleConflict>;
390 } // let CategoryName
391
392 let CategoryName = "AST Serialization Issue" in {
393 def warn_module_uses_date_time : Warning<
394   "%select{precompiled header|module}0 uses __DATE__ or __TIME__">,
395   InGroup<DiagGroup<"pch-date-time">>;
396 def err_module_no_size_mtime_for_header : Error<
397   "cannot emit module %0: %select{size|mtime}1 must be explicitly specified "
398   "for missing header file \"%2\"">;
399 } // let CategoryName
400 } // let Component
401