summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/dependent-types.cpp
blob: 053e79bb69815b6d85cc09ecddddbb3091c0d245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;
  T* x2;
  T& x3; // expected-error{{declaration of reference variable 'x3' requires an initializer}}
  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