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