aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-02-05 07:00:11 +0000
committerAnders Carlsson <andersca@mac.com>2010-02-05 07:00:11 +0000
commitb054e3804ca95255ecbc4521af7d2626367de0cf (patch)
tree227e2777e52db6cc61e2a673b4efef6aea40fda1 /lib/CodeGen/CGExprConstant.cpp
parent7e673c4c11cd1a26e87f666c37c744e9f0446dd9 (diff)
Fix array initialization test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 436c41723d..a2073e6673 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -675,7 +675,8 @@ public:
if (!E->getConstructor()->isTrivial())
return 0;
- QualType Ty = E->getType();
+ // FIXME: We should not have to call getBaseElementType here.
+ QualType Ty = CGM.getContext().getBaseElementType(E->getType());
const CXXRecordDecl *RD =
cast<CXXRecordDecl>(Ty->getAs<RecordType>()->getDecl());