[clang] [LifetimeSafety] Revamp test suite using unittests (PR #149158)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 16 13:52:34 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 h,cpp -- clang/unittests/Analysis/LifetimeSafetyTest.cpp clang/include/clang/Analysis/Analyses/LifetimeSafety.h clang/lib/Analysis/LifetimeSafety.cpp clang/lib/Sema/AnalysisBasedWarnings.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/Analysis/LifetimeSafetyTest.cpp b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
index 739851dbd..7043c65eb 100644
--- a/clang/unittests/Analysis/LifetimeSafetyTest.cpp
+++ b/clang/unittests/Analysis/LifetimeSafetyTest.cpp
@@ -367,7 +367,7 @@ TEST_F(LifetimeAnalysisTest, LoopWithBreak) {
)");
EXPECT_THAT(Origin("p"), HasLoansTo({"s1"}, "before_loop"));
EXPECT_THAT(Origin("p"), HasLoansTo({"s2"}, "inside_if"));
-// At the join point after if, s2 cannot make it to p without the if.
+ // At the join point after if, s2 cannot make it to p without the if.
EXPECT_THAT(Origin("p"), HasLoansTo({"s1"}, "after_if"));
// At the join point after the loop, p could hold a loan to s1 (if the loop
// completed normally) or to s2 (if the loop was broken).
``````````
</details>
https://github.com/llvm/llvm-project/pull/149158
More information about the cfe-commits
mailing list