Daniel Dunbar | 3f180c6 | 2009-09-17 06:31:27 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -verify %s |
| 2 | |
| 3 | template <unsigned I> |
| 4 | class C0 { |
| 5 | static const int iv0 = 1 << I; |
| 6 | |
| 7 | enum { |
| 8 | A = I, |
| 9 | B = I + 1 |
| 10 | }; |
| 11 | |
| 12 | struct s0 { |
| 13 | int a : I; |
| 14 | int b[I]; |
| 15 | }; |
| 16 | |
| 17 | void f0(int *p) { |
| 18 | if (p == I) { |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | #if 0 |
| 23 | // FIXME: Not sure whether we care about these. |
| 24 | void f1(int *a) |
| 25 | __attribute__((nonnull(1 + I))) |
| 26 | __attribute__((constructor(1 + I))) |
| 27 | __attribute__((destructor(1 + I))) |
| 28 | __attribute__((sentinel(1 + I, 2 + I))), |
| 29 | __attribute__((reqd_work_group_size(1 + I, 2 + I, 3 + I))), |
| 30 | __attribute__((format_arg(1 + I))), |
| 31 | __attribute__((aligned(1 + I))), |
| 32 | __attribute__((regparm(1 + I))); |
| 33 | |
| 34 | typedef int int_a0 __attribute__((address_space(1 + B))); |
| 35 | #endif |
| 36 | |
| 37 | #if 0 |
| 38 | // FIXME: This doesn't work. PR4996. |
| 39 | int f2() { |
| 40 | return __builtin_choose_expr(I, 1, 2); |
| 41 | } |
| 42 | #endif |
| 43 | |
| 44 | }; |