aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/c99-variable-length-array.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-24 17:22:01 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-24 17:22:01 +0000
commit836adf6771d5170d936599dfcce21687e37e9bbf (patch)
treef4e55e181309cece8d807605f492d96b601f4c91 /test/SemaCXX/c99-variable-length-array.cpp
parent94a615718d06704816c6e31a811f823c05e39f52 (diff)
Make sure that we instantiate variably modified types, even if they
aren't dependent. Fixes <rdar://problem/8020206>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r--test/SemaCXX/c99-variable-length-array.cpp10
1 files changed, 10 insertions, 0 deletions
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<typename T>
+ 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>(int); // expected-note{{instantiation of}}
+}