[clang] [analyzer] Variant checker bindings (PR #87886)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 6 11:28:14 PDT 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 b5f2db940643af3837c77adde1dadb7208922211 b250e2db91515b33c427bfa1b9faf6f376010bf0 -- clang/lib/StaticAnalyzer/Checkers/StdVariantChecker.cpp clang/lib/StaticAnalyzer/Checkers/TaggedUnionModeling.h clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/test/Analysis/Inputs/system-header-simulator-cxx.h clang/test/Analysis/std-variant-checker.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 5bdbc0e755c..11b9fbd9656 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -45,15 +45,15 @@ static SVal conjureOffsetSymbolOnLocation(
 
 // Update the SVal bound to the Cast expression with the SVal
 // bound to the casted expression
-static ProgramStateRef updateStateAfterSimpleCast(StmtNodeBuilder& Bldr,
-                                       ExplodedNode *Pred,
-                                       const CastExpr *CastE,
-                                       const Expr *CastedE) {
+static ProgramStateRef updateStateAfterSimpleCast(StmtNodeBuilder &Bldr,
+                                                  ExplodedNode *Pred,
+                                                  const CastExpr *CastE,
+                                                  const Expr *CastedE) {
   ProgramStateRef state = Pred->getState();
   const LocationContext *LCtx = Pred->getLocationContext();
   SVal V = state->getSVal(CastedE, LCtx);
   return state->BindExpr(CastE, LCtx, V);
-  //Bldr.generateNode(CastE, Pred, state);
+  // Bldr.generateNode(CastE, Pred, state);
 }
 
 void ExprEngine::VisitBinaryOperator(const BinaryOperator* B,

``````````

</details>


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


More information about the cfe-commits mailing list