blob: b26ca253b7c08ee8753acc08ded43659f46f822a [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Daniel Dunbar3f180c62009-09-17 06:31:27 +00003
4template <unsigned I>
5class 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 Dunbarf515b222009-09-18 08:46:16 +000018 // FIXME: I'm unclear where the right place to handle this is.
19#if 0
Daniel Dunbar3f180c62009-09-17 06:31:27 +000020 void f0(int *p) {
21 if (p == I) {
22 }
23 }
Daniel Dunbarf515b222009-09-18 08:46:16 +000024#endif
Daniel Dunbar3f180c62009-09-17 06:31:27 +000025
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};