Home | History | Annotate | Download | only in SemaTemplate
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 // expected-no-diagnostics
      3 
      4 enum Enum { val = 1 };
      5 template <Enum v> struct C {
      6   typedef C<v> Self;
      7 };
      8 template struct C<val>;
      9 
     10 template<typename T>
     11 struct get_size {
     12   static const unsigned value = sizeof(T);
     13 };
     14 
     15 template<typename T>
     16 struct X0 {
     17   enum {
     18     Val1 = get_size<T>::value,
     19     Val2,
     20     SumOfValues = Val1 + Val2
     21   };
     22 };
     23 
     24 X0<int> x0i;
     25 
     26 namespace rdar8020920 {
     27   template<typename T>
     28   struct X {
     29     enum { e0 = 32 };
     30 
     31     unsigned long long bitfield : e0;
     32 
     33     void f(int j) {
     34       bitfield + j;
     35     }
     36   };
     37 }
     38