]> granicus.if.org Git - clang/commitdiff
Fix array initialization test.
authorAnders Carlsson <andersca@mac.com>
Fri, 5 Feb 2010 07:00:11 +0000 (07:00 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 5 Feb 2010 07:00:11 +0000 (07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95375 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprConstant.cpp

index 436c41723d7f6439fcccc25d1d4f665fabca4fea..a2073e66738f3b45bb727bfb352ab3de6d74934d 100644 (file)
@@ -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());