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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/SemaCXX/dependent-types.cpp b/test/SemaCXX/dependent-types.cpp
index d9b5323..053e79b 100644
--- a/test/SemaCXX/dependent-types.cpp
+++ b/test/SemaCXX/dependent-types.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -fsyntax-only -pedantic -verify -std=c++0x %s
+
+template<typename T> using U = int &;
template<typename T, int Size> void f() {
T x1;
@@ -7,4 +9,5 @@ template<typename T, int Size> void f() {
T x4[]; // expected-error{{needs an explicit size or an initializer}}
T x5[Size];
int x6[Size];
+ U<T> x7; // expected-error{{declaration of reference variable 'x7' requires an initializer}}
}
OpenPOWER on IntegriCloud