[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 20 23:26:10 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 5e92fa69eaf0a3d18ff9a8ba0fb27726b38ba035 48684cf6397ddc7d1a941fdbfbb9e28591bf0240 -- clang/test/Driver/sycl-sanitize-target.cpp clang/include/clang/Basic/Sanitizers.h clang/include/clang/Driver/SanitizerArgs.h clang/lib/Basic/Sanitizers.cpp clang/lib/CodeGen/BackendUtil.cpp clang/lib/Driver/SanitizerArgs.cpp llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Driver/SanitizerArgs.h b/clang/include/clang/Driver/SanitizerArgs.h
index aaa896a02e..25da511f02 100644
--- a/clang/include/clang/Driver/SanitizerArgs.h
+++ b/clang/include/clang/Driver/SanitizerArgs.h
@@ -84,7 +84,8 @@ public:
bool needsAsanRt() const {
bool AsanIsNotDeviceOnly =
!(AsanTargetsToEnable == llvm::AsanTargetsToEnable::Device);
- return Sanitizers.has(SanitizerKind::Address) && AsanIsNotDeviceOnly; }
+ return Sanitizers.has(SanitizerKind::Address) && AsanIsNotDeviceOnly;
+ }
bool needsHwasanRt() const {
return Sanitizers.has(SanitizerKind::HWAddress);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/76127
More information about the cfe-commits
mailing list