brintos

brintos / llvm-project-archived public Read only

0
0
Text · 938 B · b26ca25 Raw
49 lines · cpp
1// RUN: %clang_cc1 -verify %s2// expected-no-diagnostics3 4template <unsigned I>5class C0 {6  static const int iv0 = 1 << I;7 8  enum {9    A = I,10    B = I + 111  };12 13  struct s0 {14    int a : I;15    int b[I];16  };17 18  // FIXME: I'm unclear where the right place to handle this is.19#if 020  void f0(int *p) {21    if (p == I) {22    }23  }24#endif25 26#if 027  // 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#endif40 41#if 042  // FIXME: This doesn't work. PR4996.43  int f2() {44    return __builtin_choose_expr(I, 1, 2);45  }46#endif47 48};49