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