[clang] [cfi] Fix one -fno-sanitize-merge case, and add two TODOs (PR #135438)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 13:56:29 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/CGClass.cpp clang/lib/CodeGen/CGExpr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 91ab54257..93166ebcc 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -3890,7 +3890,8 @@ void CodeGenFunction::EmitCfiCheckFail() {
// TODO: since there is no data, we don't know the CheckKind, and therefore
// cannot inspect CGM.getCodeGenOpts().SanitizeMergeHandlers. We default to
// NoMerge = false. Users can disable merging by disabling optimization.
- EmitTrapCheck(DataIsNotNullPtr, SanitizerHandler::CFICheckFail, /*NoMerge=*/ false);
+ EmitTrapCheck(DataIsNotNullPtr, SanitizerHandler::CFICheckFail,
+ /*NoMerge=*/false);
llvm::StructType *SourceLocationTy =
llvm::StructType::get(VoidPtrTy, Int32Ty, Int32Ty);
@@ -3933,7 +3934,7 @@ void CodeGenFunction::EmitCfiCheckFail() {
// Although the compiler allows SanitizeMergeHandlers to be set
// independently of CGM.getLangOpts().Sanitize, Driver/SanitizerArgs.cpp
// requires that SanitizeMergeHandlers is a subset of Sanitize.
- EmitTrapCheck(Cond, SanitizerHandler::CFICheckFail, /*NoMerge=*/ false);
+ EmitTrapCheck(Cond, SanitizerHandler::CFICheckFail, /*NoMerge=*/false);
}
FinishFunction();
``````````
</details>
https://github.com/llvm/llvm-project/pull/135438
More information about the cfe-commits
mailing list