From 836adf6771d5170d936599dfcce21687e37e9bbf Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 24 May 2010 17:22:01 +0000 Subject: Make sure that we instantiate variably modified types, even if they aren't dependent. Fixes . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104511 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/c99-variable-length-array.cpp | 10 ++++++++++ 1 file changed, 10 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 8a9bcb38cb..8267701880 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -90,3 +90,13 @@ namespace PR7206 { struct edge_info edgeInfo[x]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} } } + +namespace rdar8020206 { + template + void f(int i) { + const unsigned value = i; + int array[value * i]; // expected-warning 2{{variable length arrays are a C99 feature, accepted as an extension}} + } + + template void f(int); // expected-note{{instantiation of}} +} -- cgit v1.2.3-18-g5258