[cfe-commits] r130427 - /cfe/trunk/lib/CodeGen/CGExprAgg.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Apr 28 13:07:15 PDT 2011


Author: akirtzidis
Date: Thu Apr 28 15:07:15 2011
New Revision: 130427

URL: http://llvm.org/viewvc/llvm-project?rev=130427&view=rev
Log:
Get the base element type even in multidimensional arrays.

Modified:
    cfe/trunk/lib/CodeGen/CGExprAgg.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=130427&r1=130426&r2=130427&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Thu Apr 28 15:07:15 2011
@@ -624,7 +624,8 @@
 
     bool hasNonTrivialCXXConstructor = false;
     if (CGF.getContext().getLangOptions().CPlusPlus)
-      if (const RecordType *RT = ElementType->getAs<RecordType>()) {
+      if (const RecordType *RT = CGF.getContext()
+                        .getBaseElementType(ElementType)->getAs<RecordType>()) {
         const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
         hasNonTrivialCXXConstructor = !RD->hasTrivialConstructor();
       }





More information about the cfe-commits mailing list