[cfe-commits] r155356 - in /cfe/trunk: lib/Sema/SemaType.cpp test/SemaObjCXX/ivar-construct.mm
Douglas Gregor
dgregor at apple.com
Fri Apr 27 10:28:06 PDT 2012
Bill, please pull this into the 3.1 release. It's come up again as PR12673.
- Doug
On Apr 23, 2012, at 9:42 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Author: dgregor
> Date: Mon Apr 23 11:42:52 2012
> New Revision: 155356
>
> URL: http://llvm.org/viewvc/llvm-project?rev=155356&view=rev
> Log:
> Teach RequireCompleteType about multi-dimensional arrays. Fixes
> <rdar://problem/11284902>.
>
> Modified:
> cfe/trunk/lib/Sema/SemaType.cpp
> cfe/trunk/test/SemaObjCXX/ivar-construct.mm
>
> Modified: cfe/trunk/lib/Sema/SemaType.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=155356&r1=155355&r2=155356&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaType.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaType.cpp Mon Apr 23 11:42:52 2012
> @@ -4195,7 +4195,8 @@
> // 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
>
> Modified: cfe/trunk/test/SemaObjCXX/ivar-construct.mm
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/ivar-construct.mm?rev=155356&r1=155355&r2=155356&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjCXX/ivar-construct.mm (original)
> +++ cfe/trunk/test/SemaObjCXX/ivar-construct.mm Mon Apr 23 11:42:52 2012
> @@ -27,3 +27,11 @@
>
> @implementation B
> @end
> +
> +// <rdar://problem/11284902>
> +template<typename T> struct Incomplete; // expected-note{{declared here}}
> +
> + at interface C {
> + Incomplete<int> a[4][4][4]; // expected-error{{implicit instantiation of undefined template 'Incomplete<int>'}}
> +}
> + at end
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list