]> granicus.if.org Git - clang/commitdiff
[analyzer] In UndefBranchChecker, use a node generator which does not create an edge...
authorAnna Zaks <ganna@apple.com>
Mon, 3 Oct 2011 21:55:56 +0000 (21:55 +0000)
committerAnna Zaks <ganna@apple.com>
Mon, 3 Oct 2011 21:55:56 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141034 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp

index 93518277027509b1f2b127d81c6155c3a54bd2db..e2ea13d1c52476e3929f964a48fcc1ac069e4636 100644 (file)
@@ -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);
index a7a4b5a11db4f7b270f091c7f10a7d5acd3f9ab7..b860b34ff35931337a7096ca5cb9a9c764986f19 100644 (file)
@@ -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)