aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-04-01 03:47:27 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-04-01 03:47:27 +0000
commit3a3e584cc2db4ef44a63b5903b2a98986234da54 (patch)
treec5faa768ffb9899bd8816a1948babef57061b3dc /lib/Checker/GRExprEngine.cpp
parent6e92883368fd676f8fc7bc854031f853cfc2ead5 (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.cpp6
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())