summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-05-12 00:25:32 +0000
committerBill Wendling <isanbard@gmail.com>2012-05-12 00:25:32 +0000
commitd0702d69612e67de767cf60b0dbddcaf922199ee (patch)
tree1228228a03fa67c4b0ca159d8100eb47e4c91081 /lib
parent18479d491dead63c0b9f3b6cecfe32e665fcf2d0 (diff)
Merging r155356:
------------------------------------------------------------------------ r155356 | dgregor | 2012-04-23 09:42:52 -0700 (Mon, 23 Apr 2012) | 3 lines Teach RequireCompleteType about multi-dimensional arrays. Fixes <rdar://problem/11284902>. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@156677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaType.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index d0906ded0c..1b95f05c79 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -4195,7 +4195,8 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T,
// class template specialization, or an array with known size of such,
// try to instantiate it.
QualType MaybeTemplate = T;
- if (const ConstantArrayType *Array = Context.getAsConstantArrayType(T))
+ while (const ConstantArrayType *Array
+ = Context.getAsConstantArrayType(MaybeTemplate))
MaybeTemplate = Array->getElementType();
if (const RecordType *Record = MaybeTemplate->getAs<RecordType>()) {
if (ClassTemplateSpecializationDecl *ClassTemplateSpec