]> granicus.if.org Git - clang/commitdiff
Small fix to VisitLVal: this method can be called on Block-Level expressions.
authorTed Kremenek <kremenek@apple.com>
Wed, 27 Feb 2008 07:04:16 +0000 (07:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 27 Feb 2008 07:04:16 +0000 (07:04 +0000)
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

Analysis/GRExprEngine.cpp

index 758e038865fd88e63a182e36f1a3b097e31a2f30..86bd2700d71fecfd9d223e1a0f4f60e272c663b4 100644 (file)
@@ -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();