blob: c70f895d2bf94ab77a9f55a653cb844b3ff0a717 [file] [log] [blame]
Daniel Dunbar3f180c62009-09-17 06:31:27 +00001// RUN: clang-cc -verify %s
2
3template <unsigned I>
4class 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
Daniel Dunbarf515b222009-09-18 08:46:16 +000017 // FIXME: I'm unclear where the right place to handle this is.
18#if 0
Daniel Dunbar3f180c62009-09-17 06:31:27 +000019 void f0(int *p) {
20 if (p == I) {
21 }
22 }
Daniel Dunbarf515b222009-09-18 08:46:16 +000023#endif
Daniel Dunbar3f180c62009-09-17 06:31:27 +000024
25#if 0
26 // FIXME: Not sure whether we care about these.
27 void f1(int *a)
28 __attribute__((nonnull(1 + I)))
29 __attribute__((constructor(1 + I)))
30 __attribute__((destructor(1 + I)))
31 __attribute__((sentinel(1 + I, 2 + I))),
32 __attribute__((reqd_work_group_size(1 + I, 2 + I, 3 + I))),
33 __attribute__((format_arg(1 + I))),
34 __attribute__((aligned(1 + I))),
35 __attribute__((regparm(1 + I)));
36
37 typedef int int_a0 __attribute__((address_space(1 + B)));
38#endif
39
40#if 0
41 // FIXME: This doesn't work. PR4996.
42 int f2() {
43 return __builtin_choose_expr(I, 1, 2);
44 }
45#endif
46
47};