[clang] [clang][analyzer][NFCi] Pass if bind is to a Decl or not to checkBind (PR #152137)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 02:49:00 PDT 2025
Endre =?utf-8?q?Fülöp?= <endre.fulop at sigmatechnology.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/152137 at github.com>
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 cpp,h -- clang/include/clang/StaticAnalyzer/Core/Checker.h clang/include/clang/StaticAnalyzer/Core/CheckerManager.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp clang/lib/StaticAnalyzer/Checkers/BoolAssignmentChecker.cpp clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h clang/lib/StaticAnalyzer/Checkers/StoreToImmutableChecker.cpp clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp clang/lib/StaticAnalyzer/Core/CheckerManager.cpp clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/unittests/StaticAnalyzer/ExprEngineVisitTest.cpp clang/unittests/StaticAnalyzer/SValTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index a1bf61bfa..c853c0001 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -3714,8 +3714,7 @@ ExprEngine::notifyCheckersOfPointerEscape(ProgramStateRef State,
/// evalBind - Handle the semantics of binding a value to a specific location.
/// This method is used by evalStore and (soon) VisitDeclStmt, and others.
void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE,
- ExplodedNode *Pred,
- SVal location, SVal Val,
+ ExplodedNode *Pred, SVal location, SVal Val,
bool AtDeclInit, const ProgramPoint *PP) {
const LocationContext *LC = Pred->getLocationContext();
PostStmt PS(StoreE, LC);
@@ -3748,8 +3747,8 @@ void ExprEngine::evalBind(ExplodedNodeSet &Dst, const Stmt *StoreE,
// When binding the value, pass on the hint that this is a initialization.
// For initializations, we do not need to inform clients of region
// changes.
- state = state->bindLoc(location.castAs<Loc>(),
- Val, LC, /* notifyChanges = */ !AtDeclInit);
+ state = state->bindLoc(location.castAs<Loc>(), Val, LC,
+ /* notifyChanges = */ !AtDeclInit);
const MemRegion *LocReg = nullptr;
if (std::optional<loc::MemRegionVal> LocRegVal =
``````````
</details>
https://github.com/llvm/llvm-project/pull/152137
More information about the cfe-commits
mailing list