summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/dependent-types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/dependent-types.cpp')
-rw-r--r--test/SemaCXX/dependent-types.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/dependent-types.cpp b/test/SemaCXX/dependent-types.cpp
new file mode 100644
index 0000000..b2a5c45
--- /dev/null
+++ b/test/SemaCXX/dependent-types.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
+
+template<typename T, int Size> void f() {
+ T x1;
+ T* x2;
+ T& x3; // expected-error{{declaration of reference variable 'x3' requires an initializer}}
+ T x4[]; // expected-error{{variable has incomplete type 'T []'}}
+ T x5[Size];
+ int x6[Size];
+}
OpenPOWER on IntegriCloud