brintos

brintos / llvm-project-archived public Read only

0
0
Text · 484 B · c3fd38a Raw
21 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s2 3enum class E { Foo, Bar = 97119 };4 5void f() __attribute__((constructor(E::Foo))); // expected-error{{'constructor' attribute requires an integer constant}}6void f2() __attribute__((constructor(E::Bar)));// expected-error{{'constructor' attribute requires an integer constant}}7 8void switch_me(E e) {9  switch (e) {10    case E::Foo:11    case E::Bar:12      break;13  }14}15 16enum class E2;17 18struct S {19  static const E e = E::Foo;20};21