aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/c99-variable-length-array.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-24 20:42:30 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-24 20:42:30 +0000
commit204ce17e0cfd9bbe229627e1e5a20c3f2f587c8c (patch)
treecb0949ace1143329642dad7a66c25954d8c13bd8 /test/SemaCXX/c99-variable-length-array.cpp
parentceafbdeb93ecf323cca74e660bf54504c86f3b71 (diff)
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
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r--test/SemaCXX/c99-variable-length-array.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp
index 8267701880..7dc912a0d5 100644
--- a/test/SemaCXX/c99-variable-length-array.cpp
+++ b/test/SemaCXX/c99-variable-length-array.cpp
@@ -100,3 +100,17 @@ namespace rdar8020206 {
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;
+}