aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-10-14 05:22:59 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-10-14 05:22:59 +0000
commit830a7fe0eefee4687aa5f1d355ae39fadfd1b2ab (patch)
treeb7bbb0f2c0e6ff9b9acedacec2148468c2a4aa0e /lib/Checker/GRExprEngine.cpp
parent71c3673d1e3756d8ef3cbc559fcad1d0b2f18a1f (diff)
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r--lib/Checker/GRExprEngine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp
index 9c1eef23b5..0c3a7bbc15 100644
--- a/lib/Checker/GRExprEngine.cpp
+++ b/lib/Checker/GRExprEngine.cpp
@@ -2682,7 +2682,14 @@ void GRExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
if (getContext().getLangOptions().CPlusPlus && InitTy->isRecordType()) {
// Delegate expressions of C++ record type evaluation to AggExprVisitor.
VisitAggExpr(InitEx, GetState(Pred)->getLValue(VD,
- Pred->getLocationContext()), Pred, Dst);
+ Pred->getLocationContext()), Pred, Tmp);
+
+ // FIXME: remove later when all paths through VisitAggExpr work properly
+ if (Tmp.empty())
+ Tmp.Add(Pred);
+ // Call checkers for initialized aggregates
+ CheckerVisit(DS, Dst, Tmp, PreVisitStmtCallback);
+
return;
} else if (VD->getType()->isReferenceType())
VisitLValue(InitEx, Pred, Tmp);