1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify %s 2*f4a2713aSLionel Sambuc // expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc template <unsigned I> 5*f4a2713aSLionel Sambuc class C0 { 6*f4a2713aSLionel Sambuc static const int iv0 = 1 << I; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc enum { 9*f4a2713aSLionel Sambuc A = I, 10*f4a2713aSLionel Sambuc B = I + 1 11*f4a2713aSLionel Sambuc }; 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc struct s0 { 14*f4a2713aSLionel Sambuc int a : I; 15*f4a2713aSLionel Sambuc int b[I]; 16*f4a2713aSLionel Sambuc }; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc // FIXME: I'm unclear where the right place to handle this is. 19*f4a2713aSLionel Sambuc #if 0 20*f4a2713aSLionel Sambuc void f0(int *p) { 21*f4a2713aSLionel Sambuc if (p == I) { 22*f4a2713aSLionel Sambuc } 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc #endif 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc #if 0 27*f4a2713aSLionel Sambuc // FIXME: Not sure whether we care about these. 28*f4a2713aSLionel Sambuc void f1(int *a) 29*f4a2713aSLionel Sambuc __attribute__((nonnull(1 + I))) 30*f4a2713aSLionel Sambuc __attribute__((constructor(1 + I))) 31*f4a2713aSLionel Sambuc __attribute__((destructor(1 + I))) 32*f4a2713aSLionel Sambuc __attribute__((sentinel(1 + I, 2 + I))), 33*f4a2713aSLionel Sambuc __attribute__((reqd_work_group_size(1 + I, 2 + I, 3 + I))), 34*f4a2713aSLionel Sambuc __attribute__((format_arg(1 + I))), 35*f4a2713aSLionel Sambuc __attribute__((aligned(1 + I))), 36*f4a2713aSLionel Sambuc __attribute__((regparm(1 + I))); 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc typedef int int_a0 __attribute__((address_space(1 + B))); 39*f4a2713aSLionel Sambuc #endif 40*f4a2713aSLionel Sambuc 41*f4a2713aSLionel Sambuc #if 0 42*f4a2713aSLionel Sambuc // FIXME: This doesn't work. PR4996. 43*f4a2713aSLionel Sambuc int f2() { 44*f4a2713aSLionel Sambuc return __builtin_choose_expr(I, 1, 2); 45*f4a2713aSLionel Sambuc } 46*f4a2713aSLionel Sambuc #endif 47*f4a2713aSLionel Sambuc 48*f4a2713aSLionel Sambuc }; 49