diff options
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 2 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index 9351827702..e2ea13d1c5 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -316,6 +316,8 @@ public: BlockCounter getBlockCounter() const { return Eng.WList->getBlockCounter();} + /// This function generates a new ExplodedNode but not a new + /// branch(block edge). ExplodedNode *generateNode(const Stmt *Condition, const ProgramState *State); ExplodedNode *generateNode(const ProgramState *State, bool branch); diff --git a/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp index a7a4b5a11d..b860b34ff3 100644 --- a/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp @@ -61,7 +61,7 @@ void UndefBranchChecker::checkBranchCondition(const Stmt *Condition, const ProgramState *state = Builder.getState(); SVal X = state->getSVal(Condition); if (X.isUndef()) { - ExplodedNode *N = Builder.generateNode(state, true); + ExplodedNode *N = Builder.generateNode(Condition, state); if (N) { N->markAsSink(); if (!BT) |