1//==--- DiagnosticDriverKinds.td - libdriver diagnostics ------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9let Component = "Driver" in {
10
11def err_drv_no_such_file : Error<"no such file or directory: '%0'">;
12def err_drv_no_such_file_with_suggestion : Error<
13  "no such file or directory: '%0'; did you mean '%1'?">;
14def err_drv_unsupported_opt : Error<"unsupported option '%0'">;
15def err_drv_unsupported_opt_with_suggestion : Error<
16  "unsupported option '%0'; did you mean '%1'?">;
17def err_drv_unsupported_opt_for_target : Error<
18  "unsupported option '%0' for target '%1'">;
19def err_drv_unsupported_opt_for_language_mode : Error<
20  "unsupported option '%0' for language mode '%1'">;
21def err_drv_unsupported_option_argument : Error<
22  "unsupported argument '%1' to option '%0'">;
23def err_drv_unknown_stdin_type : Error<
24  "-E or -x required when input is from standard input">;
25def err_drv_unknown_stdin_type_clang_cl : Error<
26  "use /Tc or /Tp to set input type for standard input">;
27def err_drv_unknown_language : Error<"language not recognized: '%0'">;
28def err_drv_invalid_arch_name : Error<
29  "invalid arch name '%0'">;
30def err_drv_invalid_riscv_arch_name : Error<
31  "invalid arch name '%0', %1">;
32def warn_drv_invalid_arch_name_with_suggestion : Warning<
33  "ignoring invalid /arch: argument '%0'; for %select{64|32}1-bit expected one of %2">,
34  InGroup<UnusedCommandLineArgument>;
35def warn_drv_avr_mcu_not_specified : Warning<
36  "no target microcontroller specified on command line, cannot "
37  "link standard libraries, please pass -mmcu=<mcu name>">,
38  InGroup<AVRRtlibLinkingQuirks>;
39def warn_drv_avr_libc_not_found: Warning<
40  "no avr-libc installation can be found on the system, "
41  "cannot link standard libraries">,
42  InGroup<AVRRtlibLinkingQuirks>;
43def warn_drv_avr_family_linking_stdlibs_not_implemented: Warning<
44  "support for linking stdlibs for microcontroller '%0' is not implemented">,
45  InGroup<AVRRtlibLinkingQuirks>;
46def warn_drv_avr_linker_section_addresses_not_implemented: Warning<
47  "support for passing the data section address to the linker for "
48  "microcontroller '%0' is not implemented">,
49  InGroup<AVRRtlibLinkingQuirks>;
50def warn_drv_avr_stdlib_not_linked: Warning<
51  "standard library not linked and so no interrupt vector table or "
52  "compiler runtime routines will be linked">,
53  InGroup<AVRRtlibLinkingQuirks>;
54def err_drv_cuda_bad_gpu_arch : Error<"unsupported CUDA gpu architecture: %0">;
55def err_drv_offload_bad_gpu_arch : Error<"unsupported %0 gpu architecture: %1">;
56def err_drv_no_cuda_installation : Error<
57  "cannot find CUDA installation; provide its path via '--cuda-path', or pass "
58  "'-nocudainc' to build without CUDA includes">;
59def err_drv_no_cuda_libdevice : Error<
60  "cannot find libdevice for %0; provide path to different CUDA installation "
61  "via '--cuda-path', or pass '-nocudalib' to build without linking with "
62  "libdevice">;
63
64def err_drv_no_rocm_device_lib : Error<
65  "cannot find ROCm device library%select{| for %1|for ABI version %1}0; provide its path via "
66  "'--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build "
67  "without ROCm device library">;
68def err_drv_no_hip_runtime : Error<
69  "cannot find HIP runtime; provide its path via '--rocm-path', or pass "
70  "'-nogpuinc' to build without HIP runtime">;
71
72def err_drv_no_hipspv_device_lib : Error<
73  "cannot find HIP device library%select{| for %1}0; provide its path via "
74  "'--hip-path' or '--hip-device-lib-path', or pass '-nogpulib' to build "
75  "without HIP device library">;
76def err_drv_hipspv_no_hip_path : Error<
77  "'--hip-path' must be specified when offloading to "
78  "SPIR-V%select{| unless %1 is given}0.">;
79
80def err_drv_undetermined_gpu_arch : Error<
81  "cannot determine %0 architecture: %1; consider passing it via "
82  "'%2'">;
83def err_drv_cuda_version_unsupported : Error<
84  "GPU arch %0 is supported by CUDA versions between %1 and %2 (inclusive), "
85  "but installation at %3 is %4; use '--cuda-path' to specify a different CUDA "
86  "install, pass a different GPU arch with '--cuda-gpu-arch', or pass "
87  "'--no-cuda-version-check'">;
88def warn_drv_new_cuda_version: Warning<
89  "CUDA version%0 is newer than the latest%select{| partially}1 supported version %2">,
90  InGroup<CudaUnknownVersion>;
91def warn_drv_partially_supported_cuda_version: Warning<
92  "CUDA version %0 is only partially supported">,
93  InGroup<CudaUnknownVersion>;
94def err_drv_cuda_host_arch : Error<
95  "unsupported architecture '%0' for host compilation">;
96def err_drv_mix_cuda_hip : Error<
97  "mixed CUDA and HIP compilation is not supported">;
98def err_drv_bad_target_id : Error<
99  "invalid target ID '%0'; format is a processor name followed by an optional "
100  "colon-delimited list of features followed by an enable/disable sign (e.g., "
101  "'gfx908:sramecc+:xnack-')">;
102def err_drv_bad_offload_arch_combo : Error<
103  "invalid offload arch combinations: '%0' and '%1' (for a specific processor, "
104  "a feature should either exist in all offload archs, or not exist in any "
105  "offload archs)">;
106def warn_drv_unsupported_option_for_offload_arch_req_feature : Warning<
107  "ignoring '%0' option for offload arch '%1' as it is not currently supported "
108  "there. Use it with an offload arch containing '%2' instead">,
109  InGroup<OptionIgnored>;
110def warn_drv_unsupported_option_for_target : Warning<
111  "ignoring '%0' option as it is not currently supported for target '%1'">,
112  InGroup<OptionIgnored>;
113def warn_drv_unsupported_option_for_flang : Warning<
114  "the argument '%0' is not supported for option '%1'. Mapping to '%1%2'">,
115  InGroup<OptionIgnored>;
116
117def err_drv_invalid_thread_model_for_target : Error<
118  "invalid thread model '%0' in '%1' for this target">;
119def err_drv_invalid_linker_name : Error<
120  "invalid linker name in argument '%0'">;
121def err_drv_invalid_rtlib_name : Error<
122  "invalid runtime library name in argument '%0'">;
123def err_drv_unsupported_rtlib_for_platform : Error<
124  "unsupported runtime library '%0' for platform '%1'">;
125def err_drv_invalid_unwindlib_name : Error<
126  "invalid unwind library name in argument '%0'">;
127def err_drv_incompatible_unwindlib : Error<
128  "--rtlib=libgcc requires --unwindlib=libgcc">;
129def err_drv_incompatible_options : Error<
130  "The combination of '%0' and '%1' is incompatible">;
131def err_drv_invalid_stdlib_name : Error<
132  "invalid library name in argument '%0'">;
133def err_drv_invalid_output_with_multiple_archs : Error<
134  "cannot use '%0' output with multiple -arch options">;
135def err_drv_no_input_files : Error<"no input files">;
136def err_drv_output_argument_with_multiple_files : Error<
137  "cannot specify -o when generating multiple output files">;
138def err_drv_out_file_argument_with_multiple_sources : Error<
139  "cannot specify '%0%1' when compiling multiple source files">;
140def err_no_external_assembler : Error<
141  "there is no external assembler that can be used on this platform">;
142def err_drv_unable_to_remove_file : Error<
143  "unable to remove file: %0">;
144def err_drv_unable_to_set_working_directory : Error <
145  "unable to set working directory: %0">;
146def err_drv_command_failure : Error<
147  "unable to execute command: %0">;
148def err_drv_invalid_darwin_version : Error<
149  "invalid Darwin version number: %0">;
150def err_drv_invalid_diagnotics_hotness_threshold : Error<
151  "invalid argument in '%0', only integer or 'auto' is supported">;
152def err_drv_invalid_diagnotics_misexpect_tolerance : Error<
153  "invalid argument in '%0', only integers are supported">;
154def err_drv_missing_argument : Error<
155  "argument to '%0' is missing (expected %1 value%s1)">;
156def err_drv_invalid_Xarch_argument_with_args : Error<
157  "invalid Xarch argument: '%0', options requiring arguments are unsupported">;
158def err_drv_Xopenmp_target_missing_triple : Error<
159  "cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target=<triple>">;
160def err_drv_invalid_Xopenmp_target_with_args : Error<
161  "invalid -Xopenmp-target argument: '%0', options requiring arguments are unsupported">;
162def err_drv_argument_only_allowed_with : Error<
163  "invalid argument '%0' only allowed with '%1'">;
164def err_drv_minws_unsupported_input_type : Error<
165  "'-fminimize-whitespace' invalid for input of type %0">;
166def err_drv_amdgpu_ieee_without_no_honor_nans : Error<
167  "invalid argument '-mno-amdgpu-ieee' only allowed with relaxed NaN handling">;
168def err_drv_argument_not_allowed_with : Error<
169  "invalid argument '%0' not allowed with '%1'">;
170def err_drv_cannot_open_randomize_layout_seed_file : Error<
171  "cannot read randomize layout seed file '%0'">;
172def err_drv_invalid_version_number : Error<
173  "invalid version number in '%0'">;
174def err_drv_no_linker_llvm_support : Error<
175  "'%0': unable to pass LLVM bit-code files to linker">;
176def err_drv_no_ast_support : Error<
177  "'%0': unable to use AST files with this tool">;
178def err_drv_no_module_support : Error<
179  "'%0': unable to use module files with this tool">;
180def err_drv_clang_unsupported : Error<
181  "the clang compiler does not support '%0'">;
182def err_drv_clang_unsupported_opt_cxx_darwin_i386 : Error<
183  "the clang compiler does not support '%0' for C++ on Darwin/i386">;
184def err_drv_clang_unsupported_opt_pg_darwin: Error<
185  "the clang compiler does not support -pg option on %select{Darwin|versions of OS X 10.9 and later}0">;
186def err_drv_clang_unsupported_opt_faltivec : Error<
187  "the clang compiler does not support '%0', %1">;
188def err_drv_command_failed : Error<
189  "%0 command failed with exit code %1 (use -v to see invocation)">;
190def err_drv_compilationdatabase : Error<
191  "compilation database '%0' could not be opened: %1">;
192def err_drv_command_signalled : Error<
193  "%0 command failed due to signal (use -v to see invocation)">;
194def err_drv_force_crash : Error<
195  "failing because %select{environment variable 'FORCE_CLANG_DIAGNOSTICS_CRASH' is set|'-gen-reproducer' is used}0">;
196def err_drv_invalid_mfloat_abi : Error<
197  "invalid float ABI '%0'">;
198def err_drv_invalid_mtp : Error<
199  "invalid thread pointer reading mode '%0'">;
200def err_drv_missing_arg_mtp : Error<
201  "missing argument to '%0'">;
202def warn_drv_missing_plugin_name : Warning<
203  "missing plugin name in %0">,
204  InGroup<InvalidCommandLineArgument>;
205def warn_drv_missing_plugin_arg : Warning<
206  "missing plugin argument for plugin %0 in %1">,
207  InGroup<InvalidCommandLineArgument>;
208def err_drv_invalid_argument_to_option : Error<
209  "invalid argument '%0' to -%1">;
210def err_drv_missing_sanitizer_ignorelist : Error<
211  "missing sanitizer ignorelist: '%0'">;
212def err_drv_malformed_sanitizer_ignorelist : Error<
213  "malformed sanitizer ignorelist: '%0'">;
214def err_drv_malformed_sanitizer_coverage_allowlist : Error<
215  "malformed sanitizer coverage allowlist: '%0'">;
216def err_drv_malformed_sanitizer_coverage_ignorelist : Error<
217  "malformed sanitizer coverage ignorelist: '%0'">;
218def err_drv_unsupported_static_ubsan_darwin : Error<
219  "static UndefinedBehaviorSanitizer runtime is not supported on darwin">;
220def err_drv_duplicate_config : Error<
221  "no more than one option '--config' is allowed">;
222def err_drv_cannot_open_config_file : Error<
223  "configuration file '%0' cannot be opened: %1">;
224def err_drv_config_file_not_found : Error<
225  "configuration file '%0' cannot be found">;
226def note_drv_config_file_searched_in : Note<
227  "was searched for in the directory: %0">;
228def err_drv_cannot_read_config_file : Error<
229  "cannot read configuration file '%0': %1">;
230def err_drv_arg_requires_bitcode_input: Error<
231  "option '%0' requires input to be LLVM bitcode">;
232
233def err_target_unsupported_arch
234  : Error<"the target architecture '%0' is not supported by the target '%1'">;
235def err_cpu_unsupported_isa
236  : Error<"CPU '%0' does not support '%1' execution mode">;
237def err_arch_unsupported_isa
238  : Error<"architecture '%0' does not support '%1' execution mode">;
239
240def err_drv_I_dash_not_supported : Error<
241  "'%0' not supported, please use -iquote instead">;
242def err_drv_unknown_argument : Error<"unknown argument: '%0'">;
243def err_drv_unknown_argument_with_suggestion : Error<
244  "unknown argument '%0'; did you mean '%1'?">;
245def warn_drv_unknown_argument_clang_cl : Warning<
246  "unknown argument ignored in clang-cl: '%0'">,
247  InGroup<UnknownArgument>;
248def warn_drv_unknown_argument_clang_cl_with_suggestion : Warning<
249  "unknown argument ignored in clang-cl '%0'; did you mean '%1'?">,
250  InGroup<UnknownArgument>;
251
252def warn_drv_ycyu_different_arg_clang_cl : Warning<
253  "support for '/Yc' and '/Yu' with different filenames not implemented yet; flags ignored">,
254  InGroup<ClangClPch>;
255def warn_drv_yc_multiple_inputs_clang_cl : Warning<
256  "support for '/Yc' with more than one source file not implemented yet; flag ignored">,
257  InGroup<ClangClPch>;
258
259def warn_drv_potentially_misspelled_joined_argument : Warning<
260  "joined argument treated as '%0'; did you mean '%1'?">, InGroup<UnknownArgument>;
261
262def err_drv_invalid_value : Error<"invalid value '%1' in '%0'">;
263def err_drv_invalid_int_value : Error<"invalid integral value '%1' in '%0'">;
264def err_drv_invalid_value_with_suggestion : Error<
265    "invalid value '%1' in '%0', expected one of: %2">;
266def err_drv_alignment_not_power_of_two : Error<"alignment is not a power of 2 in '%0'">;
267def err_drv_invalid_remap_file : Error<
268    "invalid option '%0' not of the form <from-file>;<to-file>">;
269def err_drv_invalid_gcc_install_dir : Error<"'%0' does not contain a GCC installation">;
270def err_drv_invalid_gcc_output_type : Error<
271    "invalid output type '%0' for use with gcc tool">;
272def err_drv_cc_print_options_failure : Error<
273    "unable to open CC_PRINT_OPTIONS file: %0">;
274def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">;
275def err_drv_preamble_format : Error<
276    "incorrect format for -preamble-bytes=N,END">;
277def err_drv_header_unit_extra_inputs : Error<
278    "multiple inputs are not valid for header units (first extra '%0')">;
279def warn_invalid_ios_deployment_target : Warning<
280  "invalid iOS deployment version '%0', iOS 10 is the maximum deployment "
281  "target for 32-bit targets">, InGroup<InvalidIOSDeploymentTarget>,
282  DefaultError;
283def err_invalid_macos_32bit_deployment_target : Error<
284  "32-bit targets are not supported when building for Mac Catalyst">;
285def err_drv_invalid_os_in_arg : Error<"invalid OS value '%0' in '%1'">;
286def err_drv_conflicting_deployment_targets : Error<
287  "conflicting deployment targets, both '%0' and '%1' are present in environment">;
288def err_arc_unsupported_on_runtime : Error<
289  "-fobjc-arc is not supported on platforms using the legacy runtime">;
290def err_arc_unsupported_on_toolchain : Error< // feel free to generalize this
291  "-fobjc-arc is not supported on versions of OS X prior to 10.6">;
292def err_objc_weak_with_gc : Error<
293  "-fobjc-weak is not supported in Objective-C garbage collection">;
294def err_objc_weak_unsupported : Error<
295  "-fobjc-weak is not supported on the current deployment target">;
296def err_drv_mg_requires_m_or_mm : Error<
297  "option '-MG' requires '-M' or '-MM'">;
298def err_drv_unknown_objc_runtime : Error<
299  "unknown or ill-formed Objective-C runtime '%0'">;
300def err_drv_invalid_cf_runtime_abi
301  : Error<"invalid CoreFoundation Runtime ABI '%0'; must be one of "
302          "'objc', 'standalone', 'swift', 'swift-5.0', 'swift-4.2', 'swift-4.1'">;
303def err_drv_gnustep_objc_runtime_incompatible_binary : Error<
304  "GNUstep Objective-C runtime version %0 incompatible with target binary format">;
305def err_drv_emit_llvm_link : Error<
306   "-emit-llvm cannot be used when linking">;
307def err_drv_optimization_remark_pattern : Error<
308  "in pattern '%1': %0">;
309def err_drv_optimization_remark_format : Error<
310  "unknown remark serializer format: '%0'">;
311def err_drv_no_neon_modifier : Error<"[no]neon is not accepted as modifier, please use [no]simd instead">;
312def err_drv_invalid_omp_target : Error<"OpenMP target is invalid: '%0'">;
313def err_drv_incompatible_omp_arch : Error<"OpenMP target architecture '%0' pointer size is incompatible with host '%1'">;
314def err_drv_omp_host_ir_file_not_found : Error<
315  "provided host compiler IR file '%0' is required to generate code for OpenMP "
316  "target regions but cannot be found">;
317def err_drv_omp_host_target_not_supported : Error<
318  "target '%0' is not a supported OpenMP host target">;
319def err_drv_expecting_fopenmp_with_fopenmp_targets : Error<
320  "'-fopenmp-targets' must be used in conjunction with a '-fopenmp' option "
321  "compatible with offloading; e.g., '-fopenmp=libomp' or '-fopenmp=libiomp5'">;
322def err_drv_failed_to_deduce_target_from_arch : Error<
323  "failed to deduce triple for target architecture '%0'; specify the triple "
324  "using '-fopenmp-targets' and '-Xopenmp-target' instead.">;
325def err_drv_omp_offload_target_missingbcruntime : Error<
326  "no library '%0' found in the default clang lib directory or in LIBRARY_PATH"
327  "; use '--libomptarget-%1-bc-path' to specify %1 bitcode library">;
328def err_drv_omp_offload_target_bcruntime_not_found : Error<
329  "bitcode library '%0' does not exist">;
330def err_drv_omp_offload_target_cuda_version_not_support : Error<
331  "NVPTX target requires CUDA 9.2 or above; CUDA %0 detected">;
332def warn_drv_omp_offload_target_duplicate : Warning<
333  "OpenMP offloading target '%0' is similar to target '%1' already specified; "
334  "will be ignored">, InGroup<OpenMPTarget>;
335def err_drv_unsupported_embed_bitcode
336    : Error<"%0 is not supported with -fembed-bitcode">;
337def err_drv_bitcode_unsupported_on_toolchain : Error<
338  "-fembed-bitcode is not supported on versions of iOS prior to 6.0">;
339def err_drv_negative_columns : Error<
340  "invalid value '%1' in '%0', value must be 'none' or a positive integer">;
341def err_drv_small_columns : Error<
342  "invalid value '%1' in '%0', value must be '%2' or greater">;
343
344def err_drv_invalid_malign_branch_EQ : Error<
345  "invalid argument '%0' to -malign-branch=; each element must be one of: %1">;
346
347def err_drv_print_header_env_var : Error<
348  "environment variable CC_PRINT_HEADERS_%select{FORMAT|FILTERING}0 has invalid value %1">;
349def err_drv_print_header_env_var_combination : Error<
350  "unsupported combination: CC_PRINT_HEADERS_FORMAT=%0 and CC_PRINT_HEADERS_FILTERING=%1">;
351def err_drv_print_header_env_var_combination_cc1 : Error<
352  "unsupported combination: -header-include-format=%0 and -header-include-filtering=%1">;
353
354def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
355def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">,
356  InGroup<InvalidCommandLineArgument>;
357def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">,
358  InGroup<IgnoredOptimizationArgument>;
359def warn_ignored_clang_option : Warning<"the flag '%0' has been deprecated and will be ignored">,
360  InGroup<UnusedCommandLineArgument>;
361def warn_drv_unsupported_opt_for_target : Warning<
362  "optimization flag '%0' is not supported for target '%1'">,
363  InGroup<IgnoredOptimizationArgument>;
364def warn_drv_unsupported_debug_info_opt_for_target : Warning<
365  "debug information option '%0' is not supported for target '%1'">,
366  InGroup<UnsupportedTargetOpt>;
367def warn_drv_dwarf_version_limited_by_target : Warning<
368  "debug information option '%0' is not supported; requires DWARF-%2 but "
369  "target '%1' only provides DWARF-%3">,
370  InGroup<UnsupportedTargetOpt>;
371def warn_c_kext : Warning<
372  "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">;
373def warn_ignoring_fdiscard_for_bitcode : Warning<
374  "ignoring -fdiscard-value-names for LLVM Bitcode">,
375  InGroup<UnusedCommandLineArgument>;
376def warn_drv_input_file_unused : Warning<
377  "%0: '%1' input unused%select{ when '%3' is present|}2">,
378  InGroup<UnusedCommandLineArgument>;
379def warn_drv_input_file_unused_by_cpp : Warning<
380  "%0: '%1' input unused in cpp mode">,
381  InGroup<UnusedCommandLineArgument>;
382def warn_drv_preprocessed_input_file_unused : Warning<
383  "%0: previously preprocessed input%select{ unused when '%2' is present|}1">,
384  InGroup<UnusedCommandLineArgument>;
385def warn_drv_unused_argument : Warning<
386  "argument unused during compilation: '%0'">,
387  InGroup<UnusedCommandLineArgument>;
388def warn_drv_unused_x : Warning<
389  "'-x %0' after last input file has no effect">,
390  InGroup<UnusedCommandLineArgument>;
391def warn_drv_empty_joined_argument : Warning<
392  "joined argument expects additional value: '%0'">,
393  InGroup<UnusedCommandLineArgument>;
394def warn_drv_diagnostics_hotness_requires_pgo : Warning<
395  "argument '%0' requires profile-guided optimization information">,
396  InGroup<UnusedCommandLineArgument>;
397def warn_drv_diagnostics_misexpect_requires_pgo : Warning<
398  "argument '%0' requires profile-guided optimization information">,
399  InGroup<UnusedCommandLineArgument>;
400def warn_drv_clang_unsupported : Warning<
401  "the clang compiler does not support '%0'">;
402def warn_drv_deprecated_arg : Warning<
403  "argument '%0' is deprecated, use '%1' instead">, InGroup<Deprecated>;
404def warn_drv_assuming_mfloat_abi_is : Warning<
405  "unknown platform, assuming -mfloat-abi=%0">;
406def warn_drv_unsupported_float_abi_by_lib : Warning<
407  "float ABI '%0' is not supported by current library">,
408  InGroup<DiagGroup<"unsupported-abi">>;
409def warn_ignoring_ftabstop_value : Warning<
410  "ignoring invalid -ftabstop value '%0', using default value %1">;
411def warn_drv_overriding_flag_option : Warning<
412  "overriding '%0' option with '%1'">,
413  InGroup<DiagGroup<"overriding-t-option">>;
414def warn_drv_treating_input_as_cxx : Warning<
415  "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">,
416  InGroup<Deprecated>;
417def warn_drv_pch_not_first_include : Warning<
418  "precompiled header '%0' was ignored because '%1' is not first '-include'">;
419def warn_missing_sysroot : Warning<"no such sysroot directory: '%0'">,
420  InGroup<DiagGroup<"missing-sysroot">>;
421def warn_incompatible_sysroot : Warning<"using sysroot for '%0' but targeting '%1'">,
422  InGroup<DiagGroup<"incompatible-sysroot">>;
423def warn_debug_compression_unavailable : Warning<"cannot compress debug sections (%0 not enabled)">,
424  InGroup<DiagGroup<"debug-compression-unavailable">>;
425def warn_drv_disabling_vptr_no_rtti_default : Warning<
426  "implicitly disabling vptr sanitizer because rtti wasn't enabled">,
427  InGroup<AutoDisableVptrSanitizer>;
428def warn_drv_object_size_disabled_O0 : Warning<
429  "the object size sanitizer has no effect at -O0, but is explicitly enabled: %0">,
430  InGroup<InvalidCommandLineArgument>, DefaultWarnNoWerror;
431def warn_ignoring_verify_debuginfo_preserve_export : Warning<
432  "ignoring -fverify-debuginfo-preserve-export=%0 because "
433  "-fverify-debuginfo-preserve wasn't enabled">,
434  InGroup<UnusedCommandLineArgument>;
435def warn_unsupported_branch_protection: Warning <
436  "invalid branch protection option '%0' in '%1'">, InGroup<BranchProtection>;
437def err_sls_hardening_arm_not_supported : Error<
438  "-mharden-sls is only supported on armv7-a or later">;
439
440def note_drv_command_failed_diag_msg : Note<
441  "diagnostic msg: %0">;
442def note_drv_t_option_is_global : Note<
443  "the last '/TC' or '/TP' option takes precedence over earlier instances">;
444def note_drv_address_sanitizer_debug_runtime : Note<
445  "AddressSanitizer doesn't support linking with debug runtime libraries yet">;
446def note_drv_use_standard : Note<"use '%0'"
447  "%select{| or '%3'|, '%3', or '%4'|, '%3', '%4', or '%5'}2 "
448  "for '%1' standard">;
449
450def err_analyzer_config_no_value : Error<
451  "analyzer-config option '%0' has a key but no value">;
452def err_analyzer_config_multiple_values : Error<
453  "analyzer-config option '%0' should contain only one '='">;
454def err_analyzer_config_invalid_input : Error<
455  "invalid input for analyzer-config option '%0', that expects %1 value">;
456def err_analyzer_config_unknown : Error<"unknown analyzer-config '%0'">;
457def err_analyzer_checker_option_unknown : Error<
458  "checker '%0' has no option called '%1'">;
459def err_analyzer_checker_option_invalid_input : Error<
460  "invalid input for checker option '%0', that expects %1">;
461def err_analyzer_checker_incompatible_analyzer_option : Error<
462  "checker cannot be enabled with analyzer option '%0' == %1">;
463def err_analyzer_not_built_with_z3 : Error<
464  "analyzer constraint manager 'z3' is only available if LLVM was built with "
465  "-DLLVM_ENABLE_Z3_SOLVER=ON">;
466def warn_analyzer_deprecated_option : Warning<
467  "analyzer option '%0' is deprecated. This flag will be removed in %1, and "
468  "passing this option will be an error.">,
469  InGroup<DeprecatedStaticAnalyzerFlag>;
470def warn_analyzer_deprecated_option_with_alternative : Warning<
471  "analyzer option '%0' is deprecated. This flag will be removed in %1, and "
472  "passing this option will be an error. Use '%2' instead.">,
473  InGroup<DeprecatedStaticAnalyzerFlag>;
474
475def warn_drv_needs_hvx : Warning<
476  "%0 requires HVX, use -mhvx/-mhvx= to enable it">,
477  InGroup<OptionIgnored>;
478def err_drv_needs_hvx : Error<
479  "%0 requires HVX, use -mhvx/-mhvx= to enable it">;
480def err_drv_needs_hvx_version : Error<
481  "%0 is not supported on HVX %1">;
482
483def err_drv_module_header_wrong_kind : Error<
484  "header file '%0' input type '%1' does not match type of prior input "
485  "in module compilation; use '-x %2' to override">;
486def err_drv_modules_validate_once_requires_timestamp : Error<
487  "option '-fmodules-validate-once-per-build-session' requires "
488  "'-fbuild-session-timestamp=<seconds since Epoch>' or '-fbuild-session-file=<file>'">;
489
490def err_test_module_file_extension_format : Error<
491  "-ftest-module-file-extension argument '%0' is not of the required form "
492  "'blockname:major:minor:hashed:user info'">;
493
494def err_drv_module_output_with_multiple_arch : Error<
495  "option '-fmodule-output' can't be used with multiple arch options">;
496
497def err_drv_extract_api_wrong_kind : Error<
498  "header file '%0' input '%1' does not match the type of prior input "
499  "in api extraction; use '-x %2' to override">;
500
501def warn_slash_u_filename : Warning<"'/U%0' treated as the '/U' option">,
502  InGroup<DiagGroup<"slash-u-filename">>;
503def note_use_dashdash : Note<
504  "use '--' to treat subsequent arguments as filenames">;
505
506def err_drv_ropi_rwpi_incompatible_with_pic : Error<
507  "embedded and GOT-based position independence are incompatible">;
508def err_drv_ropi_incompatible_with_cxx : Error<
509  "ROPI is not compatible with c++">;
510
511def err_stack_tagging_requires_hardware_feature : Error<
512  "'-fsanitize=memtag-stack' requires hardware support (+memtag). For Armv8 or "
513  "Armv9, try compiling with -march=armv8a+memtag or -march=armv9a+memtag">;
514
515def err_cmse_pi_are_incompatible : Error<
516  "cmse is not compatible with %select{RWPI|ROPI}0">;
517
518def warn_target_unsupported_nan2008 : Warning<
519  "ignoring '-mnan=2008' option because the '%0' architecture does not support it">,
520  InGroup<UnsupportedNan>;
521def warn_target_unsupported_nanlegacy : Warning<
522  "ignoring '-mnan=legacy' option because the '%0' architecture does not support it">,
523  InGroup<UnsupportedNan>;
524def warn_target_unsupported_abslegacy : Warning<
525  "ignoring '-mabs=legacy' option because the '%0' architecture does not support it">,
526  InGroup<UnsupportedAbs>;
527def warn_target_unsupported_abs2008 : Warning<
528  "ignoring '-mabs=2008' option because the '%0' architecture does not support it">,
529  InGroup<UnsupportedAbs>;
530def warn_target_unsupported_compact_branches : Warning<
531  "ignoring '-mcompact-branches=' option because the '%0' architecture does not"
532  " support it">, InGroup<UnsupportedCB>;
533def warn_target_unsupported_extension : Warning<
534  "ignoring extension '%0' because the '%1' architecture does not support it">,
535   InGroup<InvalidCommandLineArgument>;
536def warn_drv_unsupported_gpopt : Warning<
537  "ignoring '-mgpopt' option as it cannot be used with %select{|the implicit"
538  " usage of }0-mabicalls">,
539  InGroup<UnsupportedGPOpt>;
540def warn_drv_unsupported_sdata : Warning<
541  "ignoring '-msmall-data-limit=' with -mcmodel=large for -fpic or RV64">,
542  InGroup<OptionIgnored>;
543def warn_drv_unsupported_longcalls : Warning<
544  "ignoring '-mlong-calls' option as it is not currently supported with "
545  "%select{|the implicit usage of }0-mabicalls">,
546  InGroup<OptionIgnored>;
547def warn_drv_unsupported_pic_with_mabicalls : Warning<
548  "ignoring '%0' option as it cannot be used with "
549  "%select{implicit usage of|}1 -mabicalls and the N64 ABI">,
550  InGroup<OptionIgnored>;
551def err_drv_unsupported_noabicalls_pic : Error<
552  "position-independent code requires '-mabicalls'">;
553def err_drv_unsupported_indirect_jump_opt : Error<
554  "'-mindirect-jump=%0' is unsupported with the '%1' architecture">;
555def err_drv_unknown_indirect_jump_opt : Error<
556  "unknown '-mindirect-jump=' option '%0'">;
557def err_drv_unsupported_fpatchable_function_entry_argument : Error<
558  "the second argument of '-fpatchable-function-entry' must be smaller than the first argument">;
559
560def warn_drv_unable_to_find_directory_expected : Warning<
561  "unable to find %0 directory, expected to be in '%1'">,
562  InGroup<InvalidOrNonExistentDirectory>, DefaultIgnore;
563
564def warn_drv_ps_force_pic : Warning<
565  "option '%0' was ignored by the %1 toolchain, using '-fPIC'">,
566  InGroup<OptionIgnored>;
567
568def warn_drv_ps_sdk_dir : Warning<
569  "environment variable '%0' is set, but points to invalid or nonexistent directory '%1'">,
570  InGroup<InvalidOrNonExistentDirectory>;
571
572def err_drv_defsym_invalid_format : Error<"defsym must be of the form: sym=value: %0">;
573def err_drv_defsym_invalid_symval : Error<"value is not an integer: %0">;
574def warn_drv_msvc_not_found : Warning<
575  "unable to find a Visual Studio installation; "
576  "try running Clang from a developer command prompt">,
577  InGroup<DiagGroup<"msvc-not-found">>;
578
579def warn_drv_fuse_ld_path : Warning<
580  "'-fuse-ld=' taking a path is deprecated; use '--ld-path=' instead">,
581  InGroup<FUseLdPath>, DefaultIgnore;
582
583def warn_drv_fine_grained_bitfield_accesses_ignored : Warning<
584  "option '-ffine-grained-bitfield-accesses' cannot be enabled together with a sanitizer; flag ignored">,
585  InGroup<OptionIgnored>;
586
587def note_drv_verify_prefix_spelling : Note<
588  "-verify prefixes must start with a letter and contain only alphanumeric"
589  " characters, hyphens, and underscores">;
590
591def warn_drv_global_isel_incomplete : Warning<
592  "-fglobal-isel support for the '%0' architecture is incomplete">,
593  InGroup<GlobalISel>;
594
595def warn_drv_global_isel_incomplete_opt : Warning<
596  "-fglobal-isel support is incomplete for this architecture at the current optimization level">,
597  InGroup<GlobalISel>;
598
599def warn_drv_moutline_unsupported_opt : Warning<
600  "'%0' does not support '-moutline'; flag ignored">,
601  InGroup<OptionIgnored>;
602
603def warn_drv_moutline_atomics_unsupported_opt : Warning<
604  "'%0' does not support '-%1'; flag ignored">,
605  InGroup<OptionIgnored>;
606
607def warn_drv_darwin_sdk_invalid_settings : Warning<
608  "SDK settings were ignored as 'SDKSettings.json' could not be parsed">,
609  InGroup<DiagGroup<"darwin-sdk-settings">>;
610
611def err_drv_trivial_auto_var_init_stop_after_missing_dependency : Error<
612  "'-ftrivial-auto-var-init-stop-after=*' is used without "
613  "'-ftrivial-auto-var-init=zero' or '-ftrivial-auto-var-init=pattern'">;
614
615def err_drv_trivial_auto_var_init_stop_after_invalid_value : Error<
616  "'-ftrivial-auto-var-init-stop-after=*' only accepts positive integers">;
617
618def warn_drv_msp430_hwmult_unsupported : Warning<
619  "the given MCU does not support hardware multiply, but '-mhwmult' is set to "
620  "%0">, InGroup<InvalidCommandLineArgument>;
621def warn_drv_msp430_hwmult_mismatch : Warning<
622  "the given MCU supports %0 hardware multiply, but '-mhwmult' is set to %1">,
623   InGroup<InvalidCommandLineArgument>;
624def warn_drv_msp430_hwmult_no_device : Warning<
625  "no MCU device specified, but '-mhwmult' is set to 'auto', assuming no "
626  "hardware multiply; use '-mmcu' to specify an MSP430 device, or '-mhwmult' "
627  "to set the hardware multiply type explicitly">,
628  InGroup<InvalidCommandLineArgument>;
629
630def warn_drv_libstdcxx_not_found : Warning<
631  "include path for libstdc++ headers not found; pass '-stdlib=libc++' on the "
632  "command line to use the libc++ standard library instead">,
633  InGroup<DiagGroup<"stdlibcxx-not-found">>;
634
635def warn_deperecated_fcoroutines_ts_flag : Warning<
636  "the '-fcoroutines-ts' flag is deprecated and it will be removed in Clang 17; "
637  "use '-std=c++20' or higher to use standard C++ coroutines instead">,
638  InGroup<DeprecatedExperimentalCoroutine>;
639def warn_deprecated_fmodules_ts_flag : Warning<
640  "the '-fmodules-ts' flag is deprecated and it will be removed in Clang 17; "
641  "use '-std=c++20' or higher to use standard C++ modules instead">,
642  InGroup<DiagGroup<"deprecated-module-ts">>;
643
644def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with '%0'">;
645
646def err_drv_invalid_object_mode : Error<
647  "OBJECT_MODE setting %0 is not recognized and is not a valid setting">;
648
649def err_aix_unsupported_tls_model : Error<"TLS model '%0' is not yet supported on AIX">;
650
651def err_invalid_cxx_abi : Error<"invalid C++ ABI name '%0'">;
652def err_unsupported_cxx_abi : Error<"C++ ABI '%0' is not supported on target triple '%1'">;
653
654def note_cc1_round_trip_original : Note<"original arguments in round-trip: %0">;
655def note_cc1_round_trip_generated : Note<
656  "generated arguments #%0 in round-trip: %1">;
657def remark_cc1_round_trip_generated : Remark<
658  "generated arguments #%0 in round-trip: %1">, InGroup<RoundTripCC1Args>;
659def err_cc1_round_trip_fail_then_ok : Error<
660  "original arguments parse failed, then succeeded in round-trip">;
661def err_cc1_round_trip_ok_then_fail : Error<
662  "generated arguments parse failed in round-trip">;
663def err_cc1_round_trip_mismatch : Error<
664  "generated arguments do not match in round-trip">;
665def err_cc1_unbounded_vscale_min : Error<
666  "minimum vscale must be an unsigned integer greater than 0">;
667
668def err_drv_ssp_missing_offset_argument : Error<
669  "'%0' is used without '-mstack-protector-guard-offset', and there is no default">;
670
671def err_drv_only_one_offload_target_supported : Error<
672  "only one offload target is supported">;
673def err_drv_invalid_or_unsupported_offload_target : Error<
674  "invalid or unsupported offload target: '%0'">;
675def err_drv_cuda_offload_only_emit_bc : Error<
676  "CUDA offload target is supported only along with --emit-llvm">;
677
678def warn_drv_jmc_requires_debuginfo : Warning<
679  "%0 requires debug info. Use %1 or debug options that enable debugger's "
680  "stepping function; option ignored">,
681  InGroup<OptionIgnored>;
682
683def warn_drv_fjmc_for_elf_only : Warning<
684  "-fjmc works only for ELF; option ignored">,
685  InGroup<OptionIgnored>;
686
687def warn_target_override_arm64ec : Warning<
688  "/arm64EC has been overridden by specified target: %0; option ignored">,
689  InGroup<OptionIgnored>;
690
691def err_drv_target_variant_invalid : Error<
692  "unsupported '%0' value '%1'; use 'ios-macabi' instead">;
693
694def err_drv_invalid_directx_shader_module : Error<
695  "invalid profile : %0">;
696def err_drv_dxc_missing_target_profile : Error<
697  "target profile option (-T) is missing">;
698def err_drv_hlsl_unsupported_target : Error<
699  "HLSL code generation is unsupported for target '%0'">;
700
701def err_drv_invalid_range_dxil_validator_version : Error<
702  "invalid validator version : %0\n"
703  "Validator version must be less than or equal to current internal version.">;
704def err_drv_invalid_format_dxil_validator_version : Error<
705  "invalid validator version : %0\n"
706  "Format of validator version is \"<major>.<minor>\" (ex:\"1.4\").">;
707def err_drv_invalid_empty_dxil_validator_version : Error<
708  "invalid validator version : %0\n"
709  "If validator major version is 0, minor version must also be 0.">;
710
711def warn_drv_sarif_format_unstable : Warning<
712  "diagnostic formatting in SARIF mode is currently unstable">,
713  InGroup<DiagGroup<"sarif-format-unstable">>;
714
715def err_drv_riscv_unsupported_with_linker_relaxation : Error<
716  "%0 is unsupported with RISC-V linker relaxation (-mrelax)">;
717
718def err_drv_loongarch_invalid_mfpu_EQ : Error<
719  "invalid argument '%0' to -mfpu=; must be one of: 64, 32, none, 0 (alias for none)">;
720}
721