From: Ted Kremenek Date: Thu, 24 Dec 2009 01:49:25 +0000 (+0000) Subject: Teach GRExprEngine to handle the initialization of the condition variable of a ForStmt. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=919f0665c35f76636d600f0e351920f6a37ee6cf;p=clang Teach GRExprEngine to handle the initialization of the condition variable of a ForStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92114 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 06621af19e..4fafcf5647 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -655,6 +655,12 @@ void GRExprEngine::Visit(Stmt* S, ExplodedNode* Pred, ExplodedNodeSet& Dst) { VisitDeclStmt(cast(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(S)->getConditionVariable(), S, Pred, Dst); + break; + case Stmt::ImplicitCastExprClass: case Stmt::CStyleCastExprClass: { CastExpr* C = cast(S);