From: Ted Kremenek Date: Wed, 27 Feb 2008 07:04:16 +0000 (+0000) Subject: Small fix to VisitLVal: this method can be called on Block-Level expressions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ad886836c3a9111f24144a8fe5da3d72958a01c;p=clang Small fix to VisitLVal: this method can be called on Block-Level expressions. In such cases, handle them just like Visit(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47665 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp index 758e038865..86bd2700d7 100644 --- a/Analysis/GRExprEngine.cpp +++ b/Analysis/GRExprEngine.cpp @@ -887,8 +887,11 @@ void GRExprEngine::VisitSizeOfExpr(UnaryOperator* U, NodeTy* Pred, } void GRExprEngine::VisitLVal(Expr* Ex, NodeTy* Pred, NodeSet& Dst) { - - assert (Ex != CurrentStmt && !getCFG().isBlkExpr(Ex)); + + if (Ex != CurrentStmt && getCFG().isBlkExpr(Ex)) { + Dst.Add(Pred); + return; + } Ex = Ex->IgnoreParens();