aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-10-28 19:04:36 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-10-28 19:04:36 +0000
commit680a3f3581fe9f17802522eeafa403b9c9dfa34a (patch)
tree694e90e91ce63ce96946ceccab547791b0ccdcb6
parentc0fcce461435fb906fbc0352484d0011a3c2957c (diff)
Use array's base element type in getting to its
constructor. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85420 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaDecl.cpp2
-rw-r--r--lib/Sema/SemaDeclCXX.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 5e433de3bb..a86857990a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3443,7 +3443,7 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl,
if (getLangOptions().CPlusPlus) {
QualType InitType = Type;
if (const ArrayType *Array = Context.getAsArrayType(Type))
- InitType = Array->getElementType();
+ InitType = Context.getBaseElementType(Array);
if ((!Var->hasExternalStorage() && !Var->isExternC()) &&
InitType->isRecordType() && !InitType->isDependentType()) {
if (!RequireCompleteType(Var->getLocation(), InitType,
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 4c7705b815..01ab0a7241 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -3236,7 +3236,7 @@ void Sema::AddCXXDirectInitializerToDecl(DeclPtrTy Dcl,
// class type.
QualType DeclInitType = VDecl->getType();
if (const ArrayType *Array = Context.getAsArrayType(DeclInitType))
- DeclInitType = Array->getElementType();
+ DeclInitType = Context.getBaseElementType(Array);
// FIXME: This isn't the right place to complete the type.
if (RequireCompleteType(VDecl->getLocation(), VDecl->getType(),