Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s |
Douglas Gregor | 898574e | 2008-12-05 23:32:09 +0000 | [diff] [blame] | 2 | |
| 3 | template<typename T, int Size> void f() { |
| 4 | T x1; |
| 5 | T* x2; |
| 6 | T& x3; // expected-error{{declaration of reference variable 'x3' requires an initializer}} |
Sebastian Redl | 6e82475 | 2009-11-05 19:47:47 +0000 | [diff] [blame] | 7 | T x4[]; // expected-error{{needs an explicit size or an initializer}} |
Douglas Gregor | 898574e | 2008-12-05 23:32:09 +0000 | [diff] [blame] | 8 | T x5[Size]; |
| 9 | int x6[Size]; |
| 10 | } |