[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 10:41:21 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 6ef4990daa1da215b25b1802f5d03cf1044f72bf f5e2453dd5d96ee8038fb07cbf5f49098e2ac41e --extensions cpp -- clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp clang/lib/StaticAnalyzer/Core/MemRegion.cpp clang/lib/StaticAnalyzer/Core/SVals.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
index 050d82a383..df23735e46 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
@@ -211,7 +211,8 @@ public:
           continue;
 
         const TypeSourceInfo *TSI = nullptr;
-        if (const auto *VD = dyn_cast<const VarDecl *>(CallRec.CastedExprParent)) {
+        if (const auto *VD =
+                dyn_cast<const VarDecl *>(CallRec.CastedExprParent)) {
           TSI = VD->getTypeSourceInfo();
         } else {
           TSI = CallRec.ExplicitCastType;

``````````

</details>


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


More information about the cfe-commits mailing list