blob: ad134cdf225c2aba3f6dc14050b94ebb26605a27 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregorb52fabb2009-06-23 23:11:28 +00002
3template<typename T> typedef T X; // expected-error{{typedef cannot be a template}}
Douglas Gregordc70c3a2010-03-02 17:53:14 +00004
5template<typename T>
6enum t0 { A = T::x }; // expected-error{{enumeration cannot be a template}} \
Douglas Gregorf19ac0e2010-04-08 21:33:23 +00007 // expected-warning{{declaration does not declare anything}}
Douglas Gregordc70c3a2010-03-02 17:53:14 +00008
Douglas Gregorcbbf3e32010-05-03 17:48:54 +00009enum e0 {};
10template<int x> enum e0 f0(int a=x) {}