| 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 | |
| 9 | class BackendInfo : CatBackend, ShowInSystemHeader; |
| 10 | |
| 11 | let Component = "Frontend" in { |
| 12 | |
| 13 | def err_fe_error_opening : Error<"error opening '%0': %1">; |
| 14 | def err_fe_error_reading : Error<"error reading '%0'">; |
| 15 | def err_fe_error_reading_stdin : Error<"error reading stdin: %0">; |
| 16 | def err_fe_error_backend : Error<"error in backend: %0">, DefaultFatal; |
| 17 | |
| 18 | def err_fe_inline_asm : Error<"%0">, CatInlineAsm; |
| 19 | def warn_fe_inline_asm : Warning<"%0">, CatInlineAsm, InGroup<BackendInlineAsm>; |
| 20 | def note_fe_inline_asm : Note<"%0">, CatInlineAsm; |
| 21 | def note_fe_inline_asm_here : Note<"instantiated into assembly here">; |
| 22 | def err_fe_cannot_link_module : Error<"cannot link module '%0': %1">, |
| 23 | DefaultFatal; |
| 24 | |
| 25 | def warn_fe_frame_larger_than : Warning<"stack frame size of %0 bytes in %q1">, |
| 26 | BackendInfo, InGroup<BackendFrameLargerThanEQ>; |
| 27 | def warn_fe_backend_frame_larger_than: Warning<"%0">, |
| 28 | BackendInfo, InGroup<BackendFrameLargerThanEQ>; |
| 29 | def err_fe_backend_frame_larger_than: Error<"%0">, BackendInfo; |
| 30 | def note_fe_backend_frame_larger_than: Note<"%0">, BackendInfo; |
| 31 | |
| 32 | def warn_fe_backend_plugin: Warning<"%0">, BackendInfo, InGroup<BackendPlugin>; |
| 33 | def err_fe_backend_plugin: Error<"%0">, BackendInfo; |
| 34 | def remark_fe_backend_plugin: Remark<"%0">, BackendInfo, InGroup<RemarkBackendPlugin>; |
| 35 | def note_fe_backend_plugin: Note<"%0">, BackendInfo; |
| 36 | |
| 37 | def warn_fe_override_module : Warning< |
| 38 | "overriding the module target triple with %0">, |
| 39 | InGroup<DiagGroup<"override-module">>; |
| 40 | |
| 41 | def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo, |
| 42 | InGroup<BackendOptimizationRemark>; |
| 43 | def remark_fe_backend_optimization_remark_missed : Remark<"%0">, BackendInfo, |
| 44 | InGroup<BackendOptimizationRemarkMissed>; |
| 45 | def remark_fe_backend_optimization_remark_analysis : Remark<"%0">, BackendInfo, |
| 46 | InGroup<BackendOptimizationRemarkAnalysis>; |
| 47 | def remark_fe_backend_optimization_remark_analysis_fpcommute : Remark<"%0; " |
| 48 | "allow reordering by specifying '#pragma clang loop vectorize(enable)' " |
| 49 | "before the loop or by providing the compiler option '-ffast-math'.">, |
| 50 | BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>; |
| 51 | def remark_fe_backend_optimization_remark_analysis_aliasing : Remark<"%0; " |
| 52 | "allow reordering by specifying '#pragma clang loop vectorize(enable)' " |
| 53 | "before the loop. If the arrays will always be independent specify " |
| 54 | "'#pragma clang loop vectorize(assume_safety)' before the loop or provide " |
| 55 | "the '__restrict__' qualifier with the independent array arguments. " |
| 56 | "Erroneous results will occur if these options are incorrectly applied!">, |
| 57 | BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>; |
| 58 | def warn_fe_backend_optimization_failure : Warning<"%0">, BackendInfo, |
| 59 | InGroup<BackendOptimizationFailure>, DefaultWarn; |
| 60 | def note_fe_backend_invalid_loc : Note<"could " |
| 61 | "not determine the original source location for %0:%1:%2">, BackendInfo; |
| 62 | |
| 63 | def err_fe_backend_unsupported : Error<"%0">, BackendInfo; |
| 64 | |
| 65 | def err_fe_invalid_code_complete_file : Error< |
| 66 | "cannot locate code-completion file %0">, DefaultFatal; |
| 67 | def err_fe_stdout_binary : Error<"unable to change standard output to binary">, |
| 68 | DefaultFatal; |
| 69 | def err_fe_dependency_file_requires_MT : Error< |
| 70 | "-dependency-file requires at least one -MT or -MQ option">; |
| 71 | def err_fe_invalid_plugin_name : Error< |
| 72 | "unable to find plugin '%0'">; |
| 73 | def err_fe_expected_compiler_job : Error< |
| 74 | "unable to handle compilation, expected exactly one compiler job in '%0'">; |
| 75 | def err_fe_expected_clang_command : Error< |
| 76 | "expected a clang compiler command">; |
| 77 | def err_fe_remap_missing_to_file : Error< |
| 78 | "could not remap file '%0' to the contents of file '%1'">, DefaultFatal; |
| 79 | def err_fe_remap_missing_from_file : Error< |
| 80 | "could not remap from missing file '%0'">, DefaultFatal; |
| 81 | def err_fe_unable_to_load_pch : Error< |
| 82 | "unable to load PCH file">; |
| 83 | def err_fe_unable_to_load_plugin : Error< |
| 84 | "unable to load plugin '%0': '%1'">; |
| 85 | def err_fe_unable_to_create_target : Error< |
| 86 | "unable to create target: '%0'">; |
| 87 | def err_fe_unable_to_interface_with_target : Error< |
| 88 | "unable to interface with target machine">; |
| 89 | def err_fe_unable_to_open_output : Error< |
| 90 | "unable to open output file '%0': '%1'">; |
| 91 | def warn_fe_macro_contains_embedded_newline : Warning< |
| 92 | "macro '%0' contains embedded newline; text after the newline is ignored">; |
| 93 | def warn_fe_cc_print_header_failure : Warning< |
| 94 | "unable to open CC_PRINT_HEADERS file: %0 (using stderr)">; |
| 95 | def warn_fe_cc_log_diagnostics_failure : Warning< |
| 96 | "unable to open CC_LOG_DIAGNOSTICS file: %0 (using stderr)">; |
| 97 | def warn_fe_unable_to_open_stats_file : Warning< |
| 98 | "unable to open statistics output file '%0': '%1'">, |
| 99 | InGroup<DiagGroup<"unable-to-open-stats-file">>; |
| 100 | def err_fe_no_pch_in_dir : Error< |
| 101 | "no suitable precompiled header file found in directory '%0'">; |
| 102 | def err_fe_action_not_available : Error< |
| 103 | "action %0 not compiled in">; |
| 104 | def err_fe_invalid_alignment : Error< |
| 105 | "invalid value '%1' in '%0'; alignment must be a power of 2">; |
| 106 | def err_fe_invalid_wchar_type |
| 107 | : Error<"invalid wchar_t type '%0'; must be one of 'char', 'short', 'int'">; |
| 108 | def err_fe_invalid_exception_model |
| 109 | : Error<"invalid exception model '%0' for target '%1'">; |
| 110 | |
| 111 | def warn_fe_serialized_diag_merge_failure : Warning< |
| 112 | "unable to merge a subprocess's serialized diagnostics">, |
| 113 | InGroup<SerializedDiagnostics>; |
| 114 | def warn_fe_serialized_diag_failure : Warning< |
| 115 | "unable to open file %0 for serializing diagnostics (%1)">, |
| 116 | InGroup<SerializedDiagnostics>; |
| 117 | |
| 118 | def err_verify_missing_line : Error< |
| 119 | "missing or invalid line number following '@' in expected %0">; |
| 120 | def err_verify_missing_file : Error< |
| 121 | "file '%0' could not be located in expected %1">; |
| 122 | def err_verify_invalid_range : Error< |
| 123 | "invalid range following '-' in expected %0">; |
| 124 | def err_verify_missing_start : Error< |
| 125 | "cannot find start ('{{') of expected %0">; |
| 126 | def err_verify_missing_end : Error< |
| 127 | "cannot find end ('}}') of expected %0">; |
| 128 | def err_verify_invalid_content : Error< |
| 129 | "invalid expected %0: %1">; |
| 130 | def err_verify_missing_regex : Error< |
| 131 | "cannot find start of regex ('{{') in %0">; |
| 132 | def err_verify_inconsistent_diags : Error< |
| 133 | "'%0' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: " |
| 134 | "%2">; |
| 135 | def err_verify_invalid_no_diags : Error< |
| 136 | "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " |
| 137 | "%select{'expected-no-diagnostics' directive|other expected directives}0">; |
| 138 | def err_verify_no_directives : Error< |
| 139 | "no expected directives found: consider use of 'expected-no-diagnostics'">; |
| 140 | |
| 141 | def note_fixit_applied : Note<"FIX-IT applied suggested code changes">; |
| 142 | def note_fixit_in_macro : Note< |
| 143 | "FIX-IT unable to apply suggested code changes in a macro">; |
| 144 | def note_fixit_failed : Note< |
| 145 | "FIX-IT unable to apply suggested code changes">; |
| 146 | def note_fixit_unfixed_error : Note<"FIX-IT detected an error it cannot fix">; |
| 147 | def warn_fixit_no_changes : Note< |
| 148 | "FIX-IT detected errors it could not fix; no output will be generated">; |
| 149 | |
| 150 | // PCH reader |
| 151 | def err_relocatable_without_isysroot : Error< |
| 152 | "must specify system root with -isysroot when building a relocatable " |
| 153 | "PCH file">; |
| 154 | |
| 155 | def warn_unknown_diag_option : Warning< |
| 156 | "unknown %select{warning|remark}0 option '%1'%select{|; did you mean '%3'?}2">, |
| 157 | InGroup<UnknownWarningOption>; |
| 158 | def warn_unknown_warning_specifier : Warning< |
| 159 | "unknown %0 warning specifier: '%1'">, |
| 160 | InGroup<UnknownWarningOption>; |
| 161 | |
| 162 | def warn_incompatible_analyzer_plugin_api : Warning< |
| 163 | "checker plugin '%0' is not compatible with this version of the analyzer">, |
| 164 | InGroup<DiagGroup<"analyzer-incompatible-plugin"> >; |
| 165 | def note_incompatible_analyzer_plugin_api : Note< |
| 166 | "current API version is '%0', but plugin was compiled with version '%1'">; |
| 167 | |
| 168 | def err_module_build_requires_fmodules : Error< |
| 169 | "module compilation requires '-fmodules'">; |
| 170 | def err_module_interface_requires_modules_ts : Error< |
| 171 | "module interface compilation requires '-fmodules-ts'">; |
| 172 | def err_header_module_requires_modules : Error< |
| 173 | "header module compilation requires '-fmodules' or '-fmodules-ts'">; |
| 174 | def warn_module_config_mismatch : Warning< |
| 175 | "module file %0 cannot be loaded due to a configuration mismatch with the current " |
| 176 | "compilation">, InGroup<DiagGroup<"module-file-config-mismatch">>, DefaultError; |
| 177 | def err_module_map_not_found : Error<"module map file '%0' not found">, |
| 178 | DefaultFatal; |
| 179 | def err_missing_module_name : Error< |
| 180 | "no module name provided; specify one with -fmodule-name=">, |
| 181 | DefaultFatal; |
| 182 | def err_missing_module : Error< |
| 183 | "no module named '%0' declared in module map file '%1'">, DefaultFatal; |
| 184 | def err_no_submodule : Error<"no submodule named %0 in module '%1'">; |
| 185 | def err_no_submodule_suggest : Error< |
| 186 | "no submodule named %0 in module '%1'; did you mean '%2'?">; |
| 187 | def warn_no_priv_submodule_use_toplevel : Warning< |
| 188 | "no submodule named %0 in module '%1'; using top level '%2'">, |
| 189 | InGroup<PrivateModule>; |
| 190 | def note_private_top_level_defined : Note< |
| 191 | "module defined here">; |
| 192 | def warn_missing_submodule : Warning<"missing submodule '%0'">, |
| 193 | InGroup<IncompleteUmbrella>; |
| 194 | def note_module_import_here : Note<"module imported here">; |
| 195 | def err_module_cannot_create_includes : Error< |
| 196 | "cannot create includes file for module %0: %1">; |
| 197 | def warn_module_config_macro_undef : Warning< |
| 198 | "%select{definition|#undef}0 of configuration macro '%1' has no effect on " |
| 199 | "the import of '%2'; pass '%select{-D%1=...|-U%1}0' on the command line " |
| 200 | "to configure the module">, |
| 201 | InGroup<ConfigMacros>; |
| 202 | def note_module_def_undef_here : Note< |
| 203 | "macro was %select{defined|#undef'd}0 here">; |
| 204 | def remark_module_build : Remark<"building module '%0' as '%1'">, |
| 205 | InGroup<ModuleBuild>; |
| 206 | def remark_module_build_done : Remark<"finished building module '%0'">, |
| 207 | InGroup<ModuleBuild>; |
| 208 | def err_modules_embed_file_not_found : |
| 209 | Error<"file '%0' specified by '-fmodules-embed-file=' not found">, |
| 210 | DefaultFatal; |
| 211 | def err_module_header_file_not_found : |
| 212 | Error<"module header file '%0' not found">, DefaultFatal; |
| 213 | def err_module_header_file_invalid : |
| 214 | Error<"unexpected module header file input '%0'">, DefaultFatal; |
| 215 | |
| 216 | def err_test_module_file_extension_version : Error< |
| 217 | "test module file extension '%0' has different version (%1.%2) than expected " |
| 218 | "(%3.%4)">; |
| 219 | |
| 220 | def err_missing_vfs_overlay_file : Error< |
| 221 | "virtual filesystem overlay file '%0' not found">, DefaultFatal; |
| 222 | def err_invalid_vfs_overlay : Error< |
| 223 | "invalid virtual filesystem overlay file '%0'">, DefaultFatal; |
| 224 | |
| 225 | def warn_option_invalid_ocl_version : Warning< |
| 226 | "OpenCL version %0 does not support the option '%1'">, InGroup<Deprecated>; |
| 227 | |
| 228 | def warn_stdlibcxx_not_found : Warning< |
| 229 | "include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the " |
| 230 | "command line to use the libc++ standard library instead">, |
| 231 | InGroup<DiagGroup<"stdlibcxx-not-found">>; |
| 232 | |
| 233 | def err_builtin_needs_feature : Error<"%0 needs target feature %1">; |
| 234 | def err_function_needs_feature : Error< |
| 235 | "always_inline function %1 requires target feature '%2', but would " |
| 236 | "be inlined into function %0 that is compiled without support for '%2'">; |
| 237 | |
| 238 | def err_alias_to_undefined : Error< |
| 239 | "%select{alias|ifunc}0 must point to a defined " |
| 240 | "%select{variable or |}1function">; |
| 241 | def warn_alias_to_weak_alias : Warning< |
| 242 | "%select{alias|ifunc}2 will always resolve to %0 even if weak definition of " |
| 243 | "%1 is overridden">, |
| 244 | InGroup<IgnoredAttributes>; |
| 245 | def err_duplicate_mangled_name : Error< |
| 246 | "definition with same mangled name '%0' as another definition">; |
| 247 | def err_cyclic_alias : Error< |
| 248 | "%select{alias|ifunc}0 definition is part of a cycle">; |
| 249 | def err_ifunc_resolver_return : Error< |
| 250 | "ifunc resolver function must return a pointer">; |
| 251 | |
| 252 | def warn_atomic_op_misaligned : Warning< |
| 253 | "%select{large|misaligned}0 atomic operation may incur " |
| 254 | "significant performance penalty">, InGroup<DiagGroup<"atomic-alignment">>; |
| 255 | |
| 256 | def warn_alias_with_section : Warning< |
| 257 | "%select{alias|ifunc}1 will not be in section '%0' but in the same section " |
| 258 | "as the %select{aliasee|resolver}2">, |
| 259 | InGroup<IgnoredAttributes>; |
| 260 | |
| 261 | let CategoryName = "Instrumentation Issue" in { |
| 262 | def warn_profile_data_out_of_date : Warning< |
| 263 | "profile data may be out of date: of %0 function%s0, %1 %plural{1:has|:have}1" |
| 264 | " mismatched data that will be ignored">, |
| 265 | InGroup<ProfileInstrOutOfDate>; |
| 266 | def warn_profile_data_missing : Warning< |
| 267 | "profile data may be incomplete: of %0 function%s0, %1 %plural{1:has|:have}1" |
| 268 | " no data">, |
| 269 | InGroup<ProfileInstrMissing>, |
| 270 | DefaultIgnore; |
| 271 | def warn_profile_data_unprofiled : Warning< |
| 272 | "no profile data available for file \"%0\"">, |
| 273 | InGroup<ProfileInstrUnprofiled>; |
| 274 | |
| 275 | } // end of instrumentation issue category |
| 276 | |
| 277 | } |
| 278 | |