]> granicus.if.org Git - clang/commitdiff
Revert r110317, and add a comment why the assertion is not an invariant.
authorTed Kremenek <kremenek@apple.com>
Thu, 5 Aug 2010 15:03:30 +0000 (15:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 5 Aug 2010 15:03:30 +0000 (15:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110330 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/GRExprEngine.cpp

index d4ee0efb54bae4d371891ca3172356802e2e7ddf..4ecc75f105dae1d7eb9f5c770ad09f2f64209522 100644 (file)
@@ -236,11 +236,11 @@ void GRExprEngine::CheckerVisit(const Stmt *S, ExplodedNodeSet &Dst,
   
   // If we built NewCO, check if we called all the checkers.  This is important
   // so that we know that we accurately determined the entire set of checkers
-  // that responds to this callback.
-  if (NewCO.get()) { 
-    assert(checkersEvaluated == Checkers.size());
+  // that responds to this callback.  Note that 'checkersEvaluated' might
+  // not be the same as Checkers.size() if one of the Checkers generates
+  // a sink node.
+  if (NewCO.get() && checkersEvaluated == Checkers.size())
     CO_Ref = NewCO.take();
-  }
 
   // Don't autotransition.  The CheckerContext objects should do this
   // automatically.