Skip to content
Snippets Groups Projects
Commit 1e9775d3 authored by Anna Zaks's avatar Anna Zaks
Browse files

[analyzer] In UndefBranchChecker, use a node generator which does not create...

[analyzer] In UndefBranchChecker, use a node generator which does not create an edge/branching. (ExprEngine should be in charge of generating edges. The checkers should examine the condition and generate PostCondition node if needed.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141034 91177308-0d34-0410-b5e6-96231b3b80d8
parent 9c81bc27
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment