From 173a4f43a911175643bda81ee675e8d9269056ea Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 24 Nov 2014 09:15:30 +0000 Subject: Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957 --- test/SemaCXX/c99-variable-length-array.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 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 bb620c7..237f564 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -140,3 +140,24 @@ namespace PR11744 { } int test = f(0); // expected-note {{instantiation of}} } + +namespace pr18633 { + struct A1 { + static const int sz; + static const int sz2; + }; + const int A1::sz2 = 11; + template + void func () { + int arr[A1::sz]; // expected-warning{{variable length arrays are a C99 feature}} + } + template + void func2 () { + int arr[A1::sz2]; + } + const int A1::sz = 12; + void func2() { + func(); + func2(); + } +} -- cgit v1.1