diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-10-14 05:22:59 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-10-14 05:22:59 +0000 |
| commit | 23e082d32c8425c2ff6202a32e8a938ccd51ee39 (patch) | |
| tree | f58362d47fcc02fa60854dc5c5412beabf1568d8 /clang/lib/Checker/GRExprEngine.cpp | |
| parent | 7f570718d35c07fed4b5d2e8083d1f5447616cd9 (diff) | |
| download | bcm5719-llvm-23e082d32c8425c2ff6202a32e8a938ccd51ee39.tar.gz bcm5719-llvm-23e082d32c8425c2ff6202a32e8a938ccd51ee39.zip | |
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
llvm-svn: 116473
Diffstat (limited to 'clang/lib/Checker/GRExprEngine.cpp')
| -rw-r--r-- | clang/lib/Checker/GRExprEngine.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index 9c1eef23b5b..0c3a7bbc157 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/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); |

