summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Analysis/PathSensitive/CheckerVisitor.def1
-rw-r--r--clang/lib/Analysis/GRExprEngine.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.def b/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.def
index 27c316897bc..4144d1a0a73 100644
--- a/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.def
+++ b/clang/include/clang/Analysis/PathSensitive/CheckerVisitor.def
@@ -28,6 +28,7 @@ PREVISIT(ObjCMessageExpr)
PREVISIT(ReturnStmt)
POSTVISIT(CallExpr)
+POSTVISIT(BlockExpr)
POSTVISIT(BinaryOperator)
#undef PREVISIT
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index a0040f4e874..cb3f68b41df 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/lib/Analysis/GRExprEngine.cpp
@@ -1103,10 +1103,16 @@ void GRExprEngine::VisitLogicalExpr(BinaryOperator* B, ExplodedNode* Pred,
void GRExprEngine::VisitBlockExpr(BlockExpr *BE, ExplodedNode *Pred,
ExplodedNodeSet &Dst) {
+
+ ExplodedNodeSet Tmp;
+
CanQualType T = getContext().getCanonicalType(BE->getType());
SVal V = ValMgr.getBlockPointer(BE->getBlockDecl(), T);
- MakeNode(Dst, BE, Pred, GetState(Pred)->BindExpr(BE, V),
+ MakeNode(Tmp, BE, Pred, GetState(Pred)->BindExpr(BE, V),
ProgramPoint::PostLValueKind);
+
+ // Post-visit the BlockExpr.
+ CheckerVisit(BE, Dst, Tmp, false);
}
void GRExprEngine::VisitDeclRefExpr(DeclRefExpr *Ex, ExplodedNode *Pred,
OpenPOWER on IntegriCloud