blob: 7d237570678f23409bcb6c1382483039eb863e0a [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Sebastian Redl599fe7c2009-05-27 19:21:29 +00002
3enum Enum { val = 1 };
4template <Enum v> struct C {
5 typedef C<v> Self;
6};
7template struct C<val>;
Douglas Gregor4912c342009-11-06 00:03:12 +00008
9template<typename T>
10struct get_size {
11 static const unsigned value = sizeof(T);
12};
13
14template<typename T>
15struct X0 {
16 enum {
17 Val1 = get_size<T>::value,
18 Val2,
19 SumOfValues = Val1 + Val2
20 };
21};
22
23X0<int> x0i;
Douglas Gregorceafbde2010-05-24 20:13:53 +000024
25namespace rdar8020920 {
26 template<typename T>
27 struct X {
28 enum { e0 = 32 };
29
30 unsigned long long bitfield : e0;
31
32 void f(int j) {
John McCall01b2e4e2010-12-06 05:26:58 +000033 bitfield + j;
Douglas Gregorceafbde2010-05-24 20:13:53 +000034 }
35 };
36}