1//==--- DiagnosticFrontendKinds.td - frontend 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 9class BackendInfo : CatBackend, ShowInSystemHeader; 10 11let Component = "Frontend" in { 12 13def err_fe_error_opening : Error<"error opening '%0': %1">; 14def err_fe_error_reading : Error<"error reading '%0'">; 15def err_fe_error_reading_stdin : Error<"error reading stdin: %0">; 16def err_fe_error_backend : Error<"error in backend: %0">, DefaultFatal; 17 18def err_fe_inline_asm : Error<"%0">, CatInlineAsm; 19def warn_fe_inline_asm : Warning<"%0">, CatInlineAsm, InGroup<BackendInlineAsm>; 20def note_fe_inline_asm : Note<"%0">, CatInlineAsm; 21def note_fe_inline_asm_here : Note<"instantiated into assembly here">; 22def err_fe_source_mgr : Error<"%0">, CatSourceMgr; 23def warn_fe_source_mgr : Warning<"%0">, CatSourceMgr, InGroup<BackendSourceMgr>; 24def note_fe_source_mgr : Note<"%0">, CatSourceMgr; 25def err_fe_linking_module : Error<"cannot link module '%0': %1">, DefaultFatal; 26def warn_fe_linking_module : Warning<"linking module '%0': %1">, InGroup<LinkerWarnings>; 27def note_fe_linking_module : Note<"linking module '%0': %1">; 28 29def warn_fe_frame_larger_than : Warning<"stack frame size (%0) exceeds limit (%1) in '%2'">, 30 BackendInfo, InGroup<BackendFrameLargerThan>; 31def warn_fe_backend_frame_larger_than: Warning<"%0">, 32 BackendInfo, InGroup<BackendFrameLargerThan>; 33def err_fe_backend_frame_larger_than: Error<"%0">, BackendInfo; 34def note_fe_backend_frame_larger_than: Note<"%0">, BackendInfo; 35 36def warn_fe_backend_plugin: Warning<"%0">, BackendInfo, InGroup<BackendPlugin>; 37def err_fe_backend_plugin: Error<"%0">, BackendInfo; 38 39def warn_fe_backend_resource_limit: Warning<"%0 (%1) exceeds limit (%2) in '%3'">, BackendInfo, InGroup<BackendPlugin>; 40def err_fe_backend_resource_limit: Error<"%0 (%1) exceeds limit (%2) in '%3'">, BackendInfo; 41def note_fe_backend_resource_limit: Note<"%0 (%1) exceeds limit (%2) in '%3'">, BackendInfo; 42 43def remark_fe_backend_plugin: Remark<"%0">, BackendInfo, InGroup<RemarkBackendPlugin>; 44def note_fe_backend_plugin: Note<"%0">, BackendInfo; 45 46def warn_fe_override_module : Warning< 47 "overriding the module target triple with %0">, 48 InGroup<DiagGroup<"override-module">>; 49def warn_fe_backend_unsupported_fp_rounding : Warning< 50 "overriding currently unsupported rounding mode on this target">, 51 InGroup<UnsupportedFPOpt>; 52def warn_fe_backend_unsupported_fp_exceptions : Warning< 53 "overriding currently unsupported use of floating point exceptions " 54 "on this target">, InGroup<UnsupportedFPOpt>; 55def warn_fe_backend_invalid_feature_flag : Warning< 56 "feature flag '%0' must start with either '+' to enable the feature or '-'" 57 " to disable it; flag ignored">, InGroup<InvalidCommandLineArgument>; 58 59def err_incompatible_fp_eval_method_options : Error< 60 "option 'ffp-eval-method' cannot be used with option " 61 "%select{'fapprox-func'|'mreassociate'|'freciprocal'}0">; 62 63def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo, 64 InGroup<BackendOptimizationRemark>; 65def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo, 66 InGroup<BackendOptimizationRemarkMissed>; 67def remark_fe_backend_optimization_remark_analysis : Remark<"%0">, BackendInfo, 68 InGroup<BackendOptimizationRemarkAnalysis>; 69def remark_fe_backend_optimization_remark_analysis_fpcommute : Remark<"%0; " 70 "allow reordering by specifying '#pragma clang loop vectorize(enable)' " 71 "before the loop or by providing the compiler option '-ffast-math'.">, 72 BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>; 73def remark_fe_backend_optimization_remark_analysis_aliasing : Remark<"%0; " 74 "allow reordering by specifying '#pragma clang loop vectorize(enable)' " 75 "before the loop. If the arrays will always be independent specify " 76 "'#pragma clang loop vectorize(assume_safety)' before the loop or provide " 77 "the '__restrict__' qualifier with the independent array arguments. " 78 "Erroneous results will occur if these options are incorrectly applied!">, 79 BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>; 80def warn_fe_backend_optimization_failure : Warning<"%0">, BackendInfo, 81 InGroup<BackendOptimizationFailure>, DefaultWarn; 82def note_fe_backend_invalid_loc : Note<"could " 83 "not determine the original source location for %0:%1:%2">, BackendInfo; 84 85def err_fe_backend_unsupported : Error<"%0">, BackendInfo; 86def warn_fe_backend_unsupported : Warning<"%0">, BackendInfo; 87 88def err_fe_backend_error_attr : 89 Error<"call to '%0' declared with 'error' attribute: %1">, BackendInfo; 90def warn_fe_backend_warning_attr : 91 Warning<"call to '%0' declared with 'warning' attribute: %1">, BackendInfo, 92 InGroup<BackendWarningAttributes>; 93 94def err_fe_invalid_code_complete_file : Error< 95 "cannot locate code-completion file %0">, DefaultFatal; 96def err_fe_dependency_file_requires_MT : Error< 97 "-dependency-file requires at least one -MT or -MQ option">; 98def err_fe_invalid_plugin_name : Error< 99 "unable to find plugin '%0'">; 100def err_fe_expected_compiler_job : Error< 101 "unable to handle compilation, expected exactly one compiler job in '%0'">; 102def err_fe_expected_clang_command : Error< 103 "expected a clang compiler command">; 104def err_fe_remap_missing_to_file : Error< 105 "could not remap file '%0' to the contents of file '%1'">, DefaultFatal; 106def err_fe_remap_missing_from_file : Error< 107 "could not remap from missing file '%0'">, DefaultFatal; 108def err_fe_unable_to_load_pch : Error< 109 "unable to load PCH file">; 110def err_fe_unable_to_load_plugin : Error< 111 "unable to load plugin '%0': '%1'">; 112def err_fe_unable_to_create_target : Error< 113 "unable to create target: '%0'">; 114def err_fe_unable_to_interface_with_target : Error< 115 "unable to interface with target machine">; 116def err_fe_unable_to_open_output : Error< 117 "unable to open output file '%0': '%1'">; 118def warn_fe_macro_contains_embedded_newline : Warning< 119 "macro '%0' contains embedded newline; text after the newline is ignored">; 120def warn_fe_cc_print_header_failure : Warning< 121 "unable to open CC_PRINT_HEADERS file: %0 (using stderr)">; 122def warn_fe_cc_log_diagnostics_failure : Warning< 123 "unable to open CC_LOG_DIAGNOSTICS file: %0 (using stderr)">; 124def warn_fe_unable_to_open_stats_file : Warning< 125 "unable to open statistics output file '%0': '%1'">, 126 InGroup<DiagGroup<"unable-to-open-stats-file">>; 127def err_fe_no_pch_in_dir : Error< 128 "no suitable precompiled header file found in directory '%0'">; 129def err_fe_action_not_available : Error< 130 "action %0 not compiled in">; 131def err_fe_invalid_alignment : Error< 132 "invalid value '%1' in '%0'; alignment must be a power of 2">; 133def err_fe_invalid_exception_model 134 : Error<"invalid exception model '%select{none|sjlj|seh|dwarf|wasm}0' for target '%1'">; 135def err_fe_invalid_source_date_epoch : Error< 136 "environment variable 'SOURCE_DATE_EPOCH' ('%0') must be a non-negative decimal integer <= %1">; 137 138def err_fe_unable_to_load_basic_block_sections_file : Error< 139 "unable to load basic block sections function list: '%0'">; 140 141def warn_fe_serialized_diag_merge_failure : Warning< 142 "unable to merge a subprocess's serialized diagnostics">, 143 InGroup<SerializedDiagnostics>; 144def warn_fe_serialized_diag_failure : Warning< 145 "unable to open file %0 for serializing diagnostics (%1)">, 146 InGroup<SerializedDiagnostics>; 147def warn_fe_serialized_diag_failure_during_finalisation : Warning< 148 "Received warning after diagnostic serialization teardown was underway: %0">, 149 InGroup<SerializedDiagnostics>; 150 151def err_verify_missing_line : Error< 152 "missing or invalid line number following '@' in expected %0">; 153def err_verify_missing_file : Error< 154 "file '%0' could not be located in expected %1">; 155def err_verify_invalid_range : Error< 156 "invalid range following '-' in expected %0">; 157def err_verify_ambiguous_marker : Error< 158 "reference to marker '%0' is ambiguous">; 159def note_verify_ambiguous_marker : Note< 160 "ambiguous marker '%0' is defined here">; 161def err_verify_no_such_marker : Error< 162 "use of undefined marker '%0'">; 163def err_verify_missing_start : Error< 164 "cannot find start ('{{') of expected %0">; 165def err_verify_missing_end : Error< 166 "cannot find end ('}}') of expected %0">; 167def err_verify_invalid_content : Error< 168 "invalid expected %0: %1">; 169def err_verify_missing_regex : Error< 170 "cannot find start of regex ('{{') in %0">; 171def err_verify_inconsistent_diags : Error< 172 "'%0' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: " 173 "%2">; 174def err_verify_invalid_no_diags : Error< 175 "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " 176 "%select{'expected-no-diagnostics' directive|other expected directives}0">; 177def err_verify_no_directives : Error< 178 "no expected directives found: consider use of 'expected-no-diagnostics'">; 179def err_verify_nonconst_addrspace : Error< 180 "qualifier 'const' is needed for variables in address space '%0'">; 181 182def note_fixit_applied : Note<"FIX-IT applied suggested code changes">; 183def note_fixit_in_macro : Note< 184 "FIX-IT unable to apply suggested code changes in a macro">; 185def note_fixit_failed : Note< 186 "FIX-IT unable to apply suggested code changes">; 187def note_fixit_unfixed_error : Note<"FIX-IT detected an error it cannot fix">; 188def warn_fixit_no_changes : Note< 189 "FIX-IT detected errors it could not fix; no output will be generated">; 190 191// PCH reader 192def err_relocatable_without_isysroot : Error< 193 "must specify system root with -isysroot when building a relocatable " 194 "PCH file">; 195 196def warn_unknown_diag_option : Warning< 197 "unknown %select{warning|remark}0 option '%1'%select{|; did you mean '%3'?}2">, 198 InGroup<UnknownWarningOption>; 199def warn_unknown_warning_specifier : Warning< 200 "unknown %0 warning specifier: '%1'">, 201 InGroup<UnknownWarningOption>; 202 203def warn_incompatible_analyzer_plugin_api : Warning< 204 "checker plugin '%0' is not compatible with this version of the analyzer">, 205 InGroup<DiagGroup<"analyzer-incompatible-plugin"> >; 206def note_incompatible_analyzer_plugin_api : Note< 207 "current API version is '%0', but plugin was compiled with version '%1'">; 208 209def err_module_build_requires_fmodules : Error< 210 "module compilation requires '-fmodules'">; 211def err_module_interface_requires_cpp_modules : Error< 212 "module interface compilation requires '-std=c++20' or '-fmodules-ts'">; 213def warn_module_config_mismatch : Warning< 214 "module file %0 cannot be loaded due to a configuration mismatch with the current " 215 "compilation">, InGroup<DiagGroup<"module-file-config-mismatch">>, DefaultError; 216def err_module_map_not_found : Error<"module map file '%0' not found">, 217 DefaultFatal; 218def err_missing_module_name : Error< 219 "no module name provided; specify one with -fmodule-name=">, 220 DefaultFatal; 221def err_missing_module : Error< 222 "no module named '%0' declared in module map file '%1'">, DefaultFatal; 223def err_no_submodule : Error<"no submodule named %0 in module '%1'">; 224def err_no_submodule_suggest : Error< 225 "no submodule named %0 in module '%1'; did you mean '%2'?">; 226def warn_no_priv_submodule_use_toplevel : Warning< 227 "no submodule named %0 in module '%1'; using top level '%2'">, 228 InGroup<PrivateModule>; 229def note_private_top_level_defined : Note< 230 "module defined here">; 231def warn_missing_submodule : Warning<"missing submodule '%0'">, 232 InGroup<IncompleteUmbrella>; 233def note_module_import_here : Note<"module imported here">; 234def err_module_cannot_create_includes : Error< 235 "cannot create includes file for module %0: %1">; 236def warn_module_config_macro_undef : Warning< 237 "%select{definition|#undef}0 of configuration macro '%1' has no effect on " 238 "the import of '%2'; pass '%select{-D%1=...|-U%1}0' on the command line " 239 "to configure the module">, 240 InGroup<ConfigMacros>; 241def note_module_def_undef_here : Note< 242 "macro was %select{defined|#undef'd}0 here">; 243def remark_module_build : Remark<"building module '%0' as '%1'">, 244 InGroup<ModuleBuild>; 245def remark_module_build_done : Remark<"finished building module '%0'">, 246 InGroup<ModuleBuild>; 247def remark_module_lock : Remark<"locking '%0' to build module '%1'">, 248 InGroup<ModuleLock>; 249def err_modules_embed_file_not_found : 250 Error<"file '%0' specified by '-fmodules-embed-file=' not found">, 251 DefaultFatal; 252def err_module_header_file_not_found : 253 Error<"module header file '%0' not found">, DefaultFatal; 254 255def err_test_module_file_extension_version : Error< 256 "test module file extension '%0' has different version (%1.%2) than expected " 257 "(%3.%4)">; 258 259def err_missing_vfs_overlay_file : Error< 260 "virtual filesystem overlay file '%0' not found">, DefaultFatal; 261def err_invalid_vfs_overlay : Error< 262 "invalid virtual filesystem overlay file '%0'">, DefaultFatal; 263 264def warn_option_invalid_ocl_version : Warning< 265 "%0 does not support the option '%1'">, InGroup<Deprecated>; 266 267def err_builtin_needs_feature : Error<"%0 needs target feature %1">; 268def err_function_needs_feature : Error< 269 "always_inline function %1 requires target feature '%2', but would " 270 "be inlined into function %0 that is compiled without support for '%2'">; 271 272def warn_avx_calling_convention 273 : Warning<"AVX vector %select{return|argument}0 of type %1 without '%2' " 274 "enabled changes the ABI">, 275 InGroup<DiagGroup<"psabi">>; 276def err_avx_calling_convention : Error<warn_avx_calling_convention.Summary>; 277 278def err_alias_to_undefined : Error< 279 "%select{alias|ifunc}0 must point to a defined " 280 "%select{variable or |}1function">; 281def warn_alias_to_weak_alias : Warning< 282 "%select{alias|ifunc}2 will always resolve to %0 even if weak definition of " 283 "%1 is overridden">, 284 InGroup<IgnoredAttributes>; 285def err_duplicate_mangled_name : Error< 286 "definition with same mangled name '%0' as another definition">; 287def err_cyclic_alias : Error< 288 "%select{alias|ifunc}0 definition is part of a cycle">; 289def err_hidden_visibility_dllexport : Error< 290 "hidden visibility cannot be applied to 'dllexport' declaration">; 291def err_non_default_visibility_dllimport : Error< 292 "non-default visibility cannot be applied to 'dllimport' declaration">; 293def err_ifunc_resolver_return : Error< 294 "ifunc resolver function must return a pointer">; 295 296def warn_atomic_op_misaligned : Warning< 297 "misaligned atomic operation may incur " 298 "significant performance penalty" 299 "; the expected alignment (%0 bytes) exceeds the actual alignment (%1 bytes)">, 300 InGroup<AtomicAlignment>; 301 302def warn_atomic_op_oversized : Warning< 303 "large atomic operation may incur " 304 "significant performance penalty" 305 "; the access size (%0 bytes) exceeds the max lock-free size (%1 bytes)">, 306InGroup<AtomicAlignment>; 307 308def warn_alias_with_section : Warning< 309 "%select{alias|ifunc}1 will not be in section '%0' but in the same section " 310 "as the %select{aliasee|resolver}2">, 311 InGroup<IgnoredAttributes>; 312 313let CategoryName = "Instrumentation Issue" in { 314def warn_profile_data_out_of_date : Warning< 315 "profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1" 316 " mismatched data that will be ignored">, 317 InGroup<ProfileInstrOutOfDate>; 318def warn_profile_data_missing : Warning< 319 "profile data may be incomplete: of %0 function%s0, %1 %plural{1:has|:have}1" 320 " no data">, 321 InGroup<ProfileInstrMissing>, 322 DefaultIgnore; 323def warn_profile_data_unprofiled : Warning< 324 "no profile data available for file \"%0\"">, 325 InGroup<ProfileInstrUnprofiled>; 326def warn_profile_data_misexpect : Warning< 327 "Potential performance regression from use of __builtin_expect(): " 328 "Annotation was correct on %0 of profiled executions.">, 329 BackendInfo, 330 InGroup<MisExpect>; 331} // end of instrumentation issue category 332 333def err_extract_api_ignores_file_not_found : 334 Error<"file '%0' specified by '--extract-api-ignores=' not found">, DefaultFatal; 335 336} 337