Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | e542c86 | 2009-06-23 23:11:28 +0000 | [diff] [blame] | 2 | |
| 3 | template<typename T> typedef T X; // expected-error{{typedef cannot be a template}} |
Douglas Gregor | 9b9edd6 | 2010-03-02 17:53:14 +0000 | [diff] [blame] | 4 | |
| 5 | template<typename T> |
| 6 | enum t0 { A = T::x }; // expected-error{{enumeration cannot be a template}} \ |
Douglas Gregor | cb821d0 | 2010-04-08 21:33:23 +0000 | [diff] [blame] | 7 | // expected-warning{{declaration does not declare anything}} |
Douglas Gregor | 9b9edd6 | 2010-03-02 17:53:14 +0000 | [diff] [blame] | 8 | |
Douglas Gregor | 8fc6d23 | 2010-05-03 17:48:54 +0000 | [diff] [blame] | 9 | enum e0 {}; |
| 10 | template<int x> enum e0 f0(int a=x) {} |