[all-commits] [llvm/llvm-project] 882122: clang: Refactor handling of offload sanitizer argu...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Sat May 9 10:16:09 PDT 2026
Branch: refs/heads/users/arsenm/clang/refactor-offload-sanitizer-arg-diagnostics
Home: https://github.com/llvm/llvm-project
Commit: 882122f1254331686f6e49b8d71e4c4a505d2b00
https://github.com/llvm/llvm-project/commit/882122f1254331686f6e49b8d71e4c4a505d2b00
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-05-09 (Sat, 09 May 2026)
Changed paths:
M clang/include/clang/Driver/SanitizerArgs.h
M clang/include/clang/Driver/ToolChain.h
M clang/lib/Driver/SanitizerArgs.cpp
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/AMDGPU.cpp
M clang/lib/Driver/ToolChains/AMDGPU.h
M clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
M clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/HIPAMD.cpp
M clang/lib/Driver/ToolChains/HIPAMD.h
M clang/test/Driver/amdgpu-openmp-sanitize-options.c
A clang/test/Driver/amdgpu-validate-sanitize.cl
M clang/test/Driver/hip-sanitize-options.hip
Log Message:
-----------
clang: Refactor handling of offload sanitizer arguments
Previously the AMDGPU toolchains hackily handled -fsanitize arguments.
They would lie and report that all host side sanitizers are available,
then TranslateArgs would filter out the device side cases that do not
work, providing diagnostics for the skipped cases. Move that logic
into the base sanitizer argument parsing.
This makes the produced diagnostics more consistent. Previously we
would get repeated warnings when a sanitizer is fully unsupported
by amdgpu, which should now be once for the toolchain. These could
be further improved; we're printing the specific field of -fsanitize
in more cases where it could be skipped. In other cases we have the
opposite problem, where we aren't reporting the exact sanitizer
from the -f flag in the case that depends on a subtarget feature.
This will help fix other broken target specific flag forwarding bugs
in the future.
Co-authored-by: Claude Sonnet 4 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list