Don't complain about VLAs of non-POD types when the array type is
dependent. Fixes <rdar://problem/8021385>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp
index 8267701..7dc912a 100644
--- a/test/SemaCXX/c99-variable-length-array.cpp
+++ b/test/SemaCXX/c99-variable-length-array.cpp
@@ -100,3 +100,17 @@
 
   template void f<int>(int); // expected-note{{instantiation of}}
 }
+
+namespace rdar8021385 {
+  typedef int my_int;
+  struct A { typedef int my_int; };
+  template<typename T>
+  struct B {
+    typedef typename T::my_int my_int;
+    void f0() {
+      int M = 4;
+      my_int a[M]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}}
+    }
+  };
+  B<A> a;
+}