[clang] [Clang] Improve error for `-fsanitize=function/kcfi -mexecute-only` incompatibility (PR #118816)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 06:48:56 PST 2024


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 ffb1c21bd4697ab5a6f11e2f2eba4fefaa298f2a 691a26b6602a4f7c9f2ea5eaf27bb8d1a0be11a6 --extensions cpp,c -- clang/lib/Driver/SanitizerArgs.cpp clang/test/Driver/fsanitize.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp
index 6d87e25b49..6a2d376e93 100644
--- a/clang/lib/Driver/SanitizerArgs.cpp
+++ b/clang/lib/Driver/SanitizerArgs.cpp
@@ -418,7 +418,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
                 Add & NotAllowedWithExecuteOnly & ~DiagnosedKinds) {
           if (DiagnoseErrors) {
             std::string Desc = describeSanitizeArg(Arg, KindsToDiagnose);
-                llvm::opt::Arg *A = Args.getLastArgNoClaim(
+            llvm::opt::Arg *A = Args.getLastArgNoClaim(
                 options::OPT_mexecute_only, options::OPT_mno_execute_only);
             if (A && A->getOption().matches(options::OPT_mexecute_only))
               D.Diag(diag::err_drv_argument_not_allowed_with)

``````````

</details>


https://github.com/llvm/llvm-project/pull/118816


More information about the cfe-commits mailing list