Skip to content

Fix more diagnostic wording for style; NFC #93190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticCommonKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def warn_target_unrecognized_env : Warning<
"mismatch between architecture and environment in target triple '%0'; did you mean '%1'?">,
InGroup<InvalidCommandLineArgument>;
def warn_knl_knm_isa_support_removed : Warning<
"KNL, KNM related Intel Xeon Phi CPU's specific ISA's supports will be removed in LLVM 19.">,
"KNL, KNM related Intel Xeon Phi CPU's specific ISA's supports will be removed in LLVM 19">,
InGroup<DiagGroup<"knl-knm-isa-support-removed">>;
def err_target_unsupported_abi_with_fpu : Error<
"'%0' ABI is not supported with FPU">;
Expand Down
58 changes: 25 additions & 33 deletions clang/include/clang/Basic/DiagnosticDriverKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def warn_drv_avr_stdlib_not_linked: Warning<
def err_drv_cuda_bad_gpu_arch : Error<"unsupported CUDA gpu architecture: %0">;
def err_drv_offload_bad_gpu_arch : Error<"unsupported %0 gpu architecture: %1">;
def err_drv_offload_missing_gpu_arch : Error<
"Must pass in an explicit %0 gpu architecture to '%1'">;
"must pass in an explicit %0 gpu architecture to '%1'">;
def err_drv_no_cuda_installation : Error<
"cannot find CUDA installation; provide its path via '--cuda-path', or pass "
"'-nocudainc' to build without CUDA includes">;
Expand Down Expand Up @@ -90,8 +90,8 @@ def err_drv_no_hipspv_device_lib : Error<
"'--hip-path' or '--hip-device-lib-path', or pass '-nogpulib' to build "
"without HIP device library">;
def err_drv_hipspv_no_hip_path : Error<
"'--hip-path' must be specified when offloading to "
"SPIR-V%select{| unless %1 is given}0.">;
"'--hip-path' must be specified when offloading to SPIR-V unless '-nogpuinc' "
"is given">;

// TODO: Remove when COV6 is fully supported by ROCm.
def warn_drv_amdgpu_cov6: Warning<
Expand Down Expand Up @@ -137,13 +137,13 @@ def warn_drv_unsupported_option_for_flang : Warning<
"the argument '%0' is not supported for option '%1'. Mapping to '%1%2'">,
InGroup<OptionIgnored>;
def warn_drv_unsupported_diag_option_for_flang : Warning<
"The warning option '-%0' is not supported">,
"the warning option '-%0' is not supported">,
InGroup<OptionIgnored>;
def warn_drv_unsupported_option_for_processor : Warning<
"ignoring '%0' option as it is not currently supported for processor '%1'">,
InGroup<OptionIgnored>;
def warn_drv_unsupported_openmp_library : Warning<
"The library '%0=%1' is not supported, openmp is not be enabled">,
"the library '%0=%1' is not supported, OpenMP will not be enabled">,
InGroup<OptionIgnored>;

def err_drv_invalid_thread_model_for_target : Error<
Expand Down Expand Up @@ -356,7 +356,7 @@ def err_drv_expecting_fopenmp_with_fopenmp_targets : Error<
"compatible with offloading; e.g., '-fopenmp=libomp' or '-fopenmp=libiomp5'">;
def err_drv_failed_to_deduce_target_from_arch : Error<
"failed to deduce triple for target architecture '%0'; specify the triple "
"using '-fopenmp-targets' and '-Xopenmp-target' instead.">;
"using '-fopenmp-targets' and '-Xopenmp-target' instead">;
def err_drv_omp_offload_target_missingbcruntime : Error<
"no library '%0' found in the default clang lib directory or in LIBRARY_PATH"
"; use '--libomptarget-%1-bc-path' to specify %1 bitcode library">;
Expand Down Expand Up @@ -515,14 +515,6 @@ def err_analyzer_checker_incompatible_analyzer_option : Error<
def err_analyzer_not_built_with_z3 : Error<
"analyzer constraint manager 'z3' is only available if LLVM was built with "
"-DLLVM_ENABLE_Z3_SOLVER=ON">;
def warn_analyzer_deprecated_option : Warning<
"analyzer option '%0' is deprecated. This flag will be removed in %1, and "
"passing this option will be an error.">,
InGroup<DeprecatedStaticAnalyzerFlag>;
def warn_analyzer_deprecated_option_with_alternative : Warning<
"analyzer option '%0' is deprecated. This flag will be removed in %1, and "
"passing this option will be an error. Use '%2' instead.">,
InGroup<DeprecatedStaticAnalyzerFlag>;

def warn_drv_needs_hvx : Warning<
"%0 requires HVX, use -mhvx/-mhvx= to enable it">,
Expand Down Expand Up @@ -555,10 +547,12 @@ def err_drv_extract_api_wrong_kind : Error<
"in api extraction; use '-x %2' to override">;

def err_drv_missing_symbol_graph_dir: Error<
"Must provide a symbol graph output directory using --symbol-graph-dir=<directory>">;
"must provide a symbol graph output directory using "
"'--symbol-graph-dir=<directory>'">;

def err_drv_unexpected_symbol_graph_output : Error<
"Unexpected output symbol graph '%1'; please provide --symbol-graph-dir=<directory> instead">;
"unexpected output symbol graph '%1'; please provide "
"'--symbol-graph-dir=<directory>' instead">;

def warn_slash_u_filename : Warning<"'/U%0' treated as the '/U' option">,
InGroup<DiagGroup<"slash-u-filename">>;
Expand Down Expand Up @@ -767,19 +761,19 @@ def err_drv_hlsl_16bit_types_unsupported: Error<
"'%0' option requires target HLSL Version >= 2018%select{| and shader model >= 6.2}1, but HLSL Version is '%2'%select{| and shader model is '%3'}1">;
def err_drv_hlsl_bad_shader_unsupported : Error<
"%select{shader model|Vulkan environment|shader stage}0 '%1' in target '%2' is invalid for HLSL code generation">;
def warn_drv_dxc_missing_dxv : Warning<"dxv not found. "
"Resulting DXIL will not be validated or signed for use in release environments.">,
InGroup<DXILValidation>;
def warn_drv_dxc_missing_dxv : Warning<
"dxv not found; resulting DXIL will not be validated or signed for use in "
"release environment">, InGroup<DXILValidation>;

def err_drv_invalid_range_dxil_validator_version : Error<
"invalid validator version : %0\n"
"Validator version must be less than or equal to current internal version.">;
"invalid validator version : %0; validator version must be less than or "
"equal to current internal version">;
def err_drv_invalid_format_dxil_validator_version : Error<
"invalid validator version : %0\n"
"Format of validator version is \"<major>.<minor>\" (ex:\"1.4\").">;
"invalid validator version : %0; format of validator version is "
"\"<major>.<minor>\" (ex:\"1.4\")">;
def err_drv_invalid_empty_dxil_validator_version : Error<
"invalid validator version : %0\n"
"If validator major version is 0, minor version must also be 0.">;
"invalid validator version : %0; if validator major version is 0, minor "
"version must also be 0">;

def warn_drv_sarif_format_unstable : Warning<
"diagnostic formatting in SARIF mode is currently unstable">,
Expand All @@ -793,12 +787,10 @@ def warn_drv_loongarch_conflicting_implied_val : Warning<
InGroup<OptionIgnored>;
def err_drv_loongarch_invalid_mfpu_EQ : Error<
"invalid argument '%0' to -mfpu=; must be one of: 64, 32, none, 0 (alias for none)">;
def err_drv_loongarch_wrong_fpu_width_for_lsx : Error<
"wrong fpu width; LSX depends on 64-bit FPU.">;
def err_drv_loongarch_wrong_fpu_width_for_lasx : Error<
"wrong fpu width; LASX depends on 64-bit FPU.">;
def err_drv_loongarch_wrong_fpu_width : Error<
"wrong fpu width; %select{LSX|LASX}0 depends on 64-bit FPU">;
def err_drv_loongarch_invalid_simd_option_combination : Error<
"invalid option combination; LASX depends on LSX.">;
"invalid option combination; LASX depends on LSX">;

def err_drv_expand_response_file : Error<
"failed to expand response file: %0">;
Expand All @@ -810,9 +802,9 @@ def note_drv_available_multilibs : Note<
"available multilibs are:%0">;

def warn_android_unversioned_fallback : Warning<
"Using unversioned Android target directory %0 for target %1. Unversioned"
" directories will not be used in Clang 19. Provide a versioned directory"
" for the target version or lower instead.">,
"using unversioned Android target directory %0 for target %1; unversioned "
"directories will not be used in Clang 19 -- provide a versioned directory "
"for the target version or lower instead">,
InGroup<DiagGroup<"android-unversioned-fallback">>;

def err_drv_triple_version_invalid : Error<
Expand Down
23 changes: 11 additions & 12 deletions clang/include/clang/Basic/DiagnosticFrontendKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ def remark_fe_backend_optimization_remark_analysis : Remark<"%0">, BackendInfo,
InGroup<BackendOptimizationRemarkAnalysis>;
def remark_fe_backend_optimization_remark_analysis_fpcommute : Remark<"%0; "
"allow reordering by specifying '#pragma clang loop vectorize(enable)' "
"before the loop or by providing the compiler option '-ffast-math'.">,
"before the loop or by providing the compiler option '-ffast-math'">,
BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;
def remark_fe_backend_optimization_remark_analysis_aliasing : Remark<"%0; "
"allow reordering by specifying '#pragma clang loop vectorize(enable)' "
"before the loop. If the arrays will always be independent specify "
"before the loop; if the arrays will always be independent, specify "
"'#pragma clang loop vectorize(assume_safety)' before the loop or provide "
"the '__restrict__' qualifier with the independent array arguments. "
"Erroneous results will occur if these options are incorrectly applied!">,
"the '__restrict__' qualifier with the independent array arguments -- "
"erroneous results will occur if these options are incorrectly applied">,
BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;

def warn_fe_backend_optimization_failure : Warning<"%0">, BackendInfo,
Expand Down Expand Up @@ -152,8 +152,8 @@ def warn_fe_serialized_diag_merge_failure : Warning<
def warn_fe_serialized_diag_failure : Warning<
"unable to open file %0 for serializing diagnostics (%1)">,
InGroup<SerializedDiagnostics>;
def warn_fe_serialized_diag_failure_during_finalisation : Warning<
"Received warning after diagnostic serialization teardown was underway: %0">,
def warn_fe_serialized_diag_failure_during_finalization : Warning<
"received warning after diagnostic serialization teardown was underway: %0">,
InGroup<SerializedDiagnostics>;

def err_verify_missing_line : Error<
Expand Down Expand Up @@ -337,7 +337,7 @@ def warn_atomic_op_oversized : Warning<
InGroup<AtomicAlignment>;

def warn_sync_op_misaligned : Warning<
"__sync builtin operation MUST have natural alignment (consider using __atomic).">,
"__sync builtin operation must have natural alignment (consider using __atomic)">,
InGroup<SyncAlignment>;

def warn_alias_with_section : Warning<
Expand All @@ -359,17 +359,16 @@ def warn_profile_data_unprofiled : Warning<
"no profile data available for file \"%0\"">,
InGroup<ProfileInstrUnprofiled>;
def warn_profile_data_misexpect : Warning<
"Potential performance regression from use of __builtin_expect(): "
"Annotation was correct on %0 of profiled executions.">,
BackendInfo,
InGroup<MisExpect>;
"potential performance regression from use of __builtin_expect(): "
"annotation was correct on %0 of profiled executions">,
BackendInfo, InGroup<MisExpect>;
} // end of instrumentation issue category

def err_extract_api_ignores_file_not_found :
Error<"file '%0' specified by '--extract-api-ignores=' not found">, DefaultFatal;

def warn_missing_symbol_graph_dir : Warning<
"Missing symbol graph output directory, defaulting to working directory">,
"missing symbol graph output directory, defaulting to working directory">,
InGroup<ExtractAPIMisuse>;

def err_ast_action_on_llvm_ir : Error<
Expand Down
2 changes: 0 additions & 2 deletions clang/include/clang/Basic/DiagnosticGroups.td
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ def Implicit : DiagGroup<"implicit", [
ImplicitInt
]>;

def DeprecatedStaticAnalyzerFlag : DiagGroup<"deprecated-static-analyzer-flag">;

// Empty DiagGroups are recognized by clang but ignored.
def ODR : DiagGroup<"odr">;
def : DiagGroup<"abi">;
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/DiagnosticInstallAPIKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def err_platform_mismatch : Error<"platform does not match: '%0' (provided) vs '
def err_install_name_mismatch : Error<"install_name does not match: '%0' (provided) vs '%1' (found)">;
def err_current_version_mismatch : Error<"current_version does not match: '%0' (provided) vs '%1' (found)">;
def err_compatibility_version_mismatch : Error<"compatibility_version does not match: '%0' (provided) vs '%1' (found)">;
def err_appextension_safe_mismatch : Error<"ApplicationExtensionSafe flag does not match: '%0' (provided) vs '%1' (found)">;
def err_shared_cache_eligiblity_mismatch : Error<"NotForDyldSharedCache flag does not match: '%0' (provided) vs '%1' (found)">;
def err_appextension_safe_mismatch : Error<"the ApplicationExtensionSafe flag does not match: '%0' (provided) vs '%1' (found)">;
def err_shared_cache_eligiblity_mismatch : Error<"the NotForDyldSharedCache flag does not match: '%0' (provided) vs '%1' (found)">;
def err_no_twolevel_namespace : Error<"flat namespace libraries are not supported">;
def err_parent_umbrella_missing: Error<"parent umbrella missing from %0: '%1'">;
def err_parent_umbrella_mismatch : Error<"parent umbrella does not match: '%0' (provided) vs '%1' (found)">;
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticLexKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -991,5 +991,5 @@ def err_pp_unclosed_pragma_unsafe_buffer_usage :
Error<"'#pragma unsafe_buffer_usage' was not ended">;

def err_pp_pragma_unsafe_buffer_usage_syntax :
Error<"Expected 'begin' or 'end'">;
Error<"expected 'begin' or 'end'">;
}
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticParseKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ def err_availability_expected_environment : Error<

// objc_bridge_related attribute
def err_objcbridge_related_expected_related_class : Error<
"expected a related ObjectiveC class name, e.g., 'NSColor'">;
"expected a related Objective-C class name, e.g., 'NSColor'">;
def err_objcbridge_related_selector_name : Error<
"expected a class method selector with single argument, e.g., 'colorWithCGColor:'">;

Expand Down
Loading
Loading