]> granicus.if.org Git - clang/commitdiff
Teach GRExprEngine to handle the initialization of the condition variable of a ForStmt.
authorTed Kremenek <kremenek@apple.com>
Thu, 24 Dec 2009 01:49:25 +0000 (01:49 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 24 Dec 2009 01:49:25 +0000 (01:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92114 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index 06621af19ec8319d247978739c95121041342c5c..4fafcf5647b79760229d1d1f72f3954d435d6179 100644 (file)
@@ -655,6 +655,12 @@ void GRExprEngine::Visit(Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst) {
       VisitDeclStmt(cast<DeclStmt>(S), Pred, Dst);
       break;
 
+    case Stmt::ForStmtClass:
+      // This case isn't for branch processing, but for handling the
+      // initialization of a condition variable.
+      VisitCondInit(cast<ForStmt>(S)->getConditionVariable(), S, Pred, Dst);
+      break;      
+
     case Stmt::ImplicitCastExprClass:
     case Stmt::CStyleCastExprClass: {
       CastExpr* C = cast<CastExpr>(S);