[llvm-branch-commits] [cfe-branch] r156677 - in /cfe/branches/release_31: ./ lib/Sema/SemaType.cpp test/SemaCXX/warn-unreachable.cpp test/SemaObjCXX/ivar-construct.mm

Bill Wendling isanbard at gmail.com
Fri May 11 17:25:32 PDT 2012


Author: void
Date: Fri May 11 19:25:32 2012
New Revision: 156677

URL: http://llvm.org/viewvc/llvm-project?rev=156677&view=rev
Log:
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>.

------------------------------------------------------------------------

Modified:
    cfe/branches/release_31/   (props changed)
    cfe/branches/release_31/lib/Sema/SemaType.cpp
    cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp   (props changed)
    cfe/branches/release_31/test/SemaObjCXX/ivar-construct.mm

Propchange: cfe/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:25:32 2012
@@ -1,3 +1,3 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
+/cfe/trunk:155076,155278-155279,155342,155356,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047,156322
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_31/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/lib/Sema/SemaType.cpp?rev=156677&r1=156676&r2=156677&view=diff
==============================================================================
--- cfe/branches/release_31/lib/Sema/SemaType.cpp (original)
+++ cfe/branches/release_31/lib/Sema/SemaType.cpp Fri May 11 19:25:32 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

Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:25:32 2012
@@ -1,2 +1,2 @@
 /cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155356,155534-155535,155576,155670,155728,155788,155803,155823,155860,155910,155975,156047

Modified: cfe/branches/release_31/test/SemaObjCXX/ivar-construct.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/SemaObjCXX/ivar-construct.mm?rev=156677&r1=156676&r2=156677&view=diff
==============================================================================
--- cfe/branches/release_31/test/SemaObjCXX/ivar-construct.mm (original)
+++ cfe/branches/release_31/test/SemaObjCXX/ivar-construct.mm Fri May 11 19:25:32 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





More information about the llvm-branch-commits mailing list