DiagnosticFrontendKinds.td revision 204643
1//==--- DiagnosticFrontendKinds.td - frontend 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
10let Component = "Frontend" in {
11
12def err_fe_error_opening : Error<"error opening '%0': %1">;
13def err_fe_error_reading : Error<"error reading '%0'">;
14def err_fe_error_reading_stdin : Error<"error reading stdin">;
15def err_fe_error_backend : Error<"error in backend: %0">, DefaultFatal;
16def err_fe_invalid_ast_file : Error<"invalid AST file: '%0'">, DefaultFatal;
17def err_fe_invalid_ast_action : Error<"invalid action for AST input">, DefaultFatal;
18def err_fe_invalid_code_complete_file : Error<
19    "cannot locate code-completion file %0">, DefaultFatal;
20def err_fe_stdout_binary : Error<"unable to change standard output to binary">,
21  DefaultFatal;
22def err_fe_stderr_binary : Error<"unable to change standard error to binary">,
23  DefaultFatal;
24def err_fe_dependency_file_requires_MT : Error<
25    "-dependency-file requires at least one -MT option">;
26def err_fe_incompatible_options : Error<
27    "'%0' cannot be used with '%1'">, DefaultFatal;
28def err_fe_no_fixit_and_codegen : Error<
29    "FIX-ITs cannot be applied when generating code">;
30def err_fe_unable_to_find_fixit_file : Error<
31    "FIX-IT could not find file '%0'">;
32def err_fe_invalid_plugin_name : Error<
33    "unable to find plugin '%0'">;
34def err_fe_expected_compiler_job : Error<
35    "unable to handle compilation, expected exactly one compiler job in '%0'">;
36def err_fe_expected_clang_command : Error<
37    "expected a clang compiler command">;
38def err_fe_remap_missing_to_file : Error<
39    "could not remap file '%0' to the contents of file '%1'">, DefaultFatal;
40def err_fe_remap_missing_from_file : Error<
41    "could not remap from missing file '%0'">, DefaultFatal;
42def err_fe_unable_to_load_pch : Error<
43    "unable to load PCH file">;
44def err_fe_unable_to_load_plugin : Error<
45    "unable to load plugin '%0': '%1'">;
46def err_fe_unable_to_create_target : Error<
47    "unable to create target: '%0'">;
48def err_fe_unable_to_interface_with_target : Error<
49    "unable to interface with target machine">;
50def err_fe_unable_to_read_pch_file : Error<
51    "unable to read PCH file: '%0'">;
52def err_fe_not_a_pch_file : Error<
53    "input is not a PCH file: '%0'">;
54def err_fe_pch_malformed_block : Error<
55    "malformed block record in PCH file: '%0'">;
56def err_fe_pch_error_at_end_block : Error<
57    "error at end of module block in PCH file: '%0'">;
58def err_fe_unable_to_open_output : Error<
59    "unable to open output file '%0': '%1'">;
60def err_fe_pth_file_has_no_source_header : Error<
61    "PTH file '%0' does not designate an original source header file for -include-pth">;
62def warn_fe_macro_contains_embedded_newline : Warning<
63    "macro '%0' contains embedded newline, text after the newline is ignored.">;
64
65def err_verify_bogus_characters : Error<
66    "bogus characters before '{{' in expected string">;
67def err_verify_missing_start : Error<
68    "cannot find start ('{{') of expected string">;
69def err_verify_missing_end : Error<
70    "cannot find end ('}}') of expected string">;
71def err_verify_inconsistent_diags : Error<
72    "'%0' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: %2">;
73
74def note_fixit_applied : Note<"FIX-IT applied suggested code changes">;
75def note_fixit_in_macro : Note<
76    "FIX-IT unable to apply suggested code changes in a macro">;
77def note_fixit_failed : Note<
78    "FIX-IT unable to apply suggested code changes">;
79def note_fixit_unfixed_error : Note<"FIX-IT detected an error it cannot fix">;
80def note_fixit_main_file_unchanged : Note<
81    "main file unchanged">;
82def warn_fixit_no_changes : Note<
83    "FIX-IT detected errors it could not fix; no output will be generated">;
84
85def err_fe_invoking : Error<"error invoking%0: %1">, DefaultFatal;
86
87// PCH reader
88def err_relocatable_without_without_isysroot : Error<
89    "must specify system root with -isysroot when building a relocatable "
90    "PCH file">;
91def warn_pch_target_triple : Error<
92    "PCH file was compiled for the target '%0' but the current translation "
93    "unit is being compiled for target '%1'">;
94def warn_pch_c99 : Error<
95    "C99 support was %select{disabled|enabled}0 in PCH file but is "
96    "currently %select{disabled|enabled}1">;
97def warn_pch_cplusplus : Error<
98    "C++ support was %select{disabled|enabled}0 in PCH file but is "
99    "currently %select{disabled|enabled}1">;
100def warn_pch_cplusplus0x : Error<
101    "C++0x support was %select{disabled|enabled}0 in PCH file but is "
102    "currently %select{disabled|enabled}1">;
103def warn_pch_objective_c : Error<
104    "Objective-C support was %select{disabled|enabled}0 in PCH file but is "
105    "currently %select{disabled|enabled}1">;
106def warn_pch_objective_c2 : Error<
107    "Objective-C 2.0 support was %select{disabled|enabled}0 in PCH file but "
108    "is currently %select{disabled|enabled}1">;
109def warn_pch_nonfragile_abi : Error<
110    "PCH file was compiled with the %select{32-bit|non-fragile}0 Objective-C "
111    "ABI but the %select{32-bit|non-fragile}1 Objective-C ABI is selected">;
112def warn_pch_nonfragile_abi2 : Error<
113    "PCH file was compiled with the %select{32-bit|enhanced non-fragile}0 "
114    "Objective-C ABI but the %select{32-bit|enhanced non-fragile}1 "
115    "Objective-C ABI is selected">;
116def warn_pch_extensions : Error<
117    "extensions were %select{enabled|disabled}0 in PCH file but are "
118    "currently %select{enabled|disabled}1">;
119def warn_pch_gnu_extensions : Error<
120    "GNU extensions were %select{disabled|enabled}0 in PCH file but are "
121    "currently %select{disabled|enabled}1">;
122def warn_pch_microsoft_extensions : Error<
123    "Microsoft extensions were %select{disabled|enabled}0 in PCH file but are "
124    "currently %select{disabled|enabled}1">;
125def warn_pch_heinous_extensions : Error<
126    "heinous extensions were %select{disabled|enabled}0 in PCH file but are "
127    "currently %select{disabled|enabled}1">;
128def warn_pch_lax_vector_conversions : Error<
129    "lax vector conversions were %select{disabled|enabled}0 in PCH file but "
130    "are currently %select{disabled|enabled}1">;
131def warn_pch_altivec : Error<
132    "AltiVec initializers were %select{disabled|enabled}0 in PCH file but "
133    "are currently %select{disabled|enabled}1">;
134def warn_pch_opencl : Error<
135    "OpenCL language extensions were %select{disabled|enabled}0 in PCH file "
136    "but are currently %select{disabled|enabled}1">;
137def warn_pch_elide_constructors : Error<
138    "Elidable copy constructors were %select{disabled|enabled}0 in PCH file "
139    "but are currently %select{disabled|enabled}1">;
140def warn_pch_exceptions : Error<
141    "exceptions were %select{disabled|enabled}0 in PCH file but "
142    "are currently %select{disabled|enabled}1">;
143def warn_pch_sjlj_exceptions : Error<
144    "sjlj-exceptions were %select{disabled|enabled}0 in PCH file but "
145    "are currently %select{disabled|enabled}1">;
146def warn_pch_objc_runtime : Error<
147    "PCH file was compiled with the %select{NeXT|GNU}0 runtime but the "
148    "%select{NeXT|GNU}1 runtime is selected">;
149def warn_pch_freestanding : Error<
150    "PCH file was compiled with a %select{hosted|freestanding}0  "
151    "implementation but a %select{hosted|freestanding}1 implementation "
152    "is selected">;
153def warn_pch_builtins : Error<
154    "PCH file was compiled with builtins %select{enabled|disabled}0 but "
155    "builtins are currently %select{enabled|disabled}1">;
156def warn_pch_thread_safe_statics : Error<
157    "PCH file was compiled %select{without|with}0 thread-safe statics but "
158    "thread-safe statics are currently %select{disabled|enabled}1">;
159def warn_pch_posix_threads : Error<
160    "PCH file was compiled %select{without|with}0 POSIX thread support but "
161    "POSIX threads are currently %select{disabled|enabled}1">;
162def warn_pch_stack_protector : Error<
163    "stack protector was %select{off|on|required}0 in PCH file but "
164    "is currently %select{off|on|required}1">;
165def warn_pch_blocks : Error<
166    "blocks were %select{disabled|enabled}0 in PCH file but "
167    "are currently %select{disabled|enabled}1">;
168def warn_pch_math_errno : Error<
169    "math functions %select{do not respect|respect}0 'errno' in PCH "
170    "file but they are currently set to %select{not respect|respect}1 "
171    "'errno'">;
172def warn_pch_overflow_checking : Error<
173    "signed integer overflow checking was %select{disabled|enabled}0 in PCH "
174    "file but is currently %select{disabled|enabled}1">;
175def warn_pch_optimize : Error<
176    "the macro '__OPTIMIZE__' was %select{not defined|defined}0 in "
177    "the PCH file but is currently %select{undefined|defined}1">;
178def warn_pch_optimize_size : Error<
179    "the macro '__OPTIMIZE_SIZE__' was %select{not defined|defined}0 in "
180    "the PCH file but is currently %select{undefined|defined}1">;
181def warn_pch_static : Error<
182    "the PCH file was compiled %select{dynamic|static}0 but the "
183    "current translation unit is being compiled as %select{dynamic|static}1">;
184def warn_pch_pic_level : Error<
185    "PCH file was compiled with PIC level %0, but the current translation "
186    "unit will be compiled with PIC level %1">;
187def warn_pch_gnu_inline : Error<
188    "PCH file was compiled with %select{C99|GNU|}0 inline semantics but "
189    "%select{C99|GNU}1 inline semantics are currently selected">;
190def warn_pch_no_inline : Error<
191    "the macro '__NO_INLINE__' was %select{not defined|defined}0 in "
192    "the PCH file but is currently %select{undefined|defined}1">;
193def warn_pch_gc_mode : Error<
194    "the PCH file was built with %select{no||hybrid}0 garbage collection but "
195    "the current translation unit will compiled with %select{no||hybrid}1 "
196    "garbage collection">;
197def warn_pch_version_too_old : Error<
198    "PCH file uses an older PCH format that is no longer supported">;
199def warn_pch_version_too_new : Error<
200    "PCH file uses a newer PCH format that cannot be read">;
201def warn_pch_different_branch : Error<
202    "PCH file built from a different branch (%0) than the compiler (%1)">;
203def warn_cmdline_conflicting_macro_def : Error<
204    "definition of the macro '%0' conflicts with the definition used to "
205    "build the precompiled header">;
206def note_pch_macro_defined_as : Note<
207    "definition of macro '%0' in the precompiled header">;
208def warn_cmdline_missing_macro_defs : Warning<
209    "macro definitions used to build the precompiled header are missing">;
210def note_using_macro_def_from_pch : Note<
211    "using this macro definition from precompiled header">;
212def warn_macro_name_used_in_pch : Error<
213    "definition of macro %0 conflicts with an identifier used in the "
214    "precompiled header">;
215def warn_pch_compiler_options_mismatch : Error<
216    "compiler options used when building the precompiled header differ from "
217    "the options used when using the precompiled header">;
218def warn_pch_access_control : Error<
219    "C++ access control was %select{disabled|enabled}0 in the PCH file but "
220    "is currently %select{disabled|enabled}1">;
221def warn_pch_char_signed : Error<
222    "char was %select{unsigned|signed}0 in the PCH file but "
223    "is currently %select{unsigned|signed}1">;
224def warn_pch_short_wchar : Error<
225    "-fshort-wchar was %select{disabled|enabled}0 in the PCH file but "
226    "is currently %select{disabled|enabled}1">;
227
228def err_not_a_pch_file : Error<
229    "'%0' does not appear to be a precompiled header file">, DefaultFatal;
230def warn_unknown_warning_option : Warning<
231    "unknown warning option '%0'">,
232    InGroup<DiagGroup<"unknown-warning-option"> >;
233def warn_unknown_warning_specifier : Warning<
234    "unknown %0 warning specifier: '%1'">,
235    InGroup<DiagGroup<"unknown-warning-option"> >;
236}
237