[clang] [NFC] [dataflow] generalize smart pointer caching (PR #133350)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 27 21:04:23 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 89cfeeb062577069d1da236d33810bb0416f1102 9839bc69c6b33155dba13b0bc50c9859641ac107 --extensions cpp,h -- clang/include/clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h clang/lib/Analysis/FlowSensitive/SmartPointerAccessorCaching.cpp clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp b/clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp
index 2c316249b8..5d3d5b0cfe 100644
--- a/clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp
@@ -377,16 +377,16 @@ TEST(SmartPointerAccessorCachingTest, Renamed) {
   EXPECT_TRUE(matches(Decls,
                       "int target(std::unique_ptr<S> P) { return P.Get()->i; }",
                       isSmartPointerLikeGetMethodCall("Get")));
-  EXPECT_TRUE(
-      matches(Decls, "int target(UniquePtrAlias<S> P) { return P.Get()->i; }",
-              isSmartPointerLikeGetMethodCall("Get")));
+  EXPECT_TRUE(matches(Decls,
+                      "int target(UniquePtrAlias<S> P) { return P.Get()->i; }",
+                      isSmartPointerLikeGetMethodCall("Get")));
 
   EXPECT_TRUE(
       matches(Decls, "int target(std::unique_ptr<S> P) { return P.Value().i; }",
               isSmartPointerLikeValueMethodCall("Value")));
-  EXPECT_TRUE(
-      matches(Decls, "int target(UniquePtrAlias<S> P) { return P.Value().i; }",
-              isSmartPointerLikeValueMethodCall("Value")));
+  EXPECT_TRUE(matches(Decls,
+                      "int target(UniquePtrAlias<S> P) { return P.Value().i; }",
+                      isSmartPointerLikeValueMethodCall("Value")));
 
   EXPECT_TRUE(matches(Decls, "int target(UniquePtrAlias<S> P) { return P->i; }",
                       isPointerLikeOperatorArrow()));

``````````

</details>


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


More information about the cfe-commits mailing list