Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.

llvm-svn: 116473
This commit is contained in:
Zhongxing Xu 2010-10-14 05:22:59 +00:00
parent 7f570718d3
commit 23e082d32c
1 changed files with 8 additions and 1 deletions

View File

@ -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);