[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 10:50:36 PST 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 0bfcb76be1018f7a5aec5cf968bdb5a8a46ba62c b0a283ef4bc2180201cac50eadae8c006b492567 --extensions h,c,cpp -- clang/test/CodeGen/allow-ubsan-check.c clang/test/CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp clang/test/CodeGenCXX/RelativeVTablesABI/type-info.cpp llvm/include/llvm/Analysis/CaptureTracking.h llvm/include/llvm/Support/ModRef.h llvm/lib/Analysis/CaptureTracking.cpp llvm/lib/Analysis/InstructionSimplify.cpp llvm/lib/Transforms/IPO/AttributorAttributes.cpp llvm/lib/Transforms/IPO/FunctionAttrs.cpp llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp llvm/unittests/Analysis/CaptureTrackingTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/CaptureTracking.cpp b/llvm/lib/Analysis/CaptureTracking.cpp
index 99709a66d0..516648bcee 100644
--- a/llvm/lib/Analysis/CaptureTracking.cpp
+++ b/llvm/lib/Analysis/CaptureTracking.cpp
@@ -399,9 +399,9 @@ CaptureInfo llvm::DetermineUseCaptureKind(
return CaptureInfo::none();
}
- // Check whether this is a comparison of the base pointer against
- // null. We can also strip inbounds GEPs, as inbounds preserves
- // the null-ness of the pointer.
+ // Check whether this is a comparison of the base pointer against
+ // null. We can also strip inbounds GEPs, as inbounds preserves
+ // the null-ness of the pointer.
Value *Stripped = U.get();
if (!NullPointerIsDefined(I->getFunction(),
U->getType()->getPointerAddressSpace()))
``````````
</details>
https://github.com/llvm/llvm-project/pull/125880
More information about the cfe-commits
mailing list