From 204ce17e0cfd9bbe229627e1e5a20c3f2f587c8c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 24 May 2010 20:42:30 +0000 Subject: Don't complain about VLAs of non-POD types when the array type is dependent. Fixes . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/c99-variable-length-array.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/SemaCXX/c99-variable-length-array.cpp') 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); // expected-note{{instantiation of}} } + +namespace rdar8021385 { + typedef int my_int; + struct A { typedef int my_int; }; + template + 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; +} -- cgit v1.2.3-18-g5258