[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / PR38235.cpp
blobc3fd38ab04d6a117bb200922e9c32ebf314117ef
1 // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
3 enum class E { Foo, Bar = 97119 };
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}}
8 void switch_me(E e) {
9 switch (e) {
10 case E::Foo:
11 case E::Bar:
12 break;
16 enum class E2;
18 struct S {
19 static const E e = E::Foo;