summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/dependent-sized_array.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerdim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit056abd2059c65a3e908193aeae16fad98017437c (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/SemaTemplate/dependent-sized_array.cpp
parentcc73504950eb7b5dff2dded9bedd67bc36d64641 (diff)
downloadFreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip
FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/SemaTemplate/dependent-sized_array.cpp')
-rw-r--r--test/SemaTemplate/dependent-sized_array.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-sized_array.cpp b/test/SemaTemplate/dependent-sized_array.cpp
index cf0e0f3..6fdcaa6 100644
--- a/test/SemaTemplate/dependent-sized_array.cpp
+++ b/test/SemaTemplate/dependent-sized_array.cpp
@@ -15,3 +15,14 @@ void f1() {
int a1[] = { 1, 2, 3, N };
int a3[sizeof(a1)/sizeof(int) != 4? 1 : -1]; // expected-error{{negative}}
}
+
+namespace PR13788 {
+ template <unsigned __N>
+ struct S {
+ int V;
+ };
+ template <int N>
+ void foo() {
+ S<0> arr[N] = {{ 4 }};
+ }
+}
OpenPOWER on IntegriCloud