Author: zaks
Date: Mon Oct  3 16:55:56 2011
New Revision: 141034

URL: http://llvm.org/viewvc/llvm-project?rev=141034&view=rev
Log:
[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.)

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
    cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h?rev=141034&r1=141033&r2=141034&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h 
(original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h Mon 
Oct  3 16:55:56 2011
@@ -316,6 +316,8 @@
 
   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);

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp?rev=141034&r1=141033&r2=141034&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp Mon Oct  3 
16:55:56 2011
@@ -61,7 +61,7 @@
   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)


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to