[cfe-commits] r116473 - /cfe/trunk/lib/Checker/GRExprEngine.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Wed Oct 13 22:22:59 PDT 2010
Author: zhongxingxu
Date: Thu Oct 14 00:22:59 2010
New Revision: 116473
URL: http://llvm.org/viewvc/llvm-project?rev=116473&view=rev
Log:
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
Modified:
cfe/trunk/lib/Checker/GRExprEngine.cpp
Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=116473&r1=116472&r2=116473&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Thu Oct 14 00:22:59 2010
@@ -2682,7 +2682,14 @@
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);
More information about the cfe-commits
mailing list