Debian Codegraph @

clang/test/SemaCXX/PR38235.cpp

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