diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-01 03:47:27 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-01 03:47:27 +0000 |
commit | 3a3e584cc2db4ef44a63b5903b2a98986234da54 (patch) | |
tree | c5faa768ffb9899bd8816a1948babef57061b3dc /lib/Checker/GRExprEngine.cpp | |
parent | 6e92883368fd676f8fc7bc854031f853cfc2ead5 (diff) |
Improve C++ constructor handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 04f8cc6142..2e40a93470 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -2363,8 +2363,10 @@ void GRExprEngine::VisitDeclStmt(DeclStmt *DS, ExplodedNode *Pred, ExplodedNodeSet Tmp; if (InitEx) { - if (const CXXConstructExpr *E = dyn_cast<CXXConstructExpr>(InitEx)) { - VisitCXXConstructExpr(E, GetState(Pred)->getLValue(VD, + QualType InitTy = InitEx->getType(); + 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); return; } else if (VD->getType()->isReferenceType()) |