Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaCXX/PR38235.cpp @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s enum class E { Foo, Bar = 97119 }; void f() __attribute__((constructor(E::Foo))); // expected-error{{'constructor' attribute requires an integer constant}} void f2() __attribute__((constructor(E::Bar)));// expected-error{{'constructor' attribute requires an integer constant}} void switch_me(E e) { switch (e) { case E::Foo: case E::Bar: break; } } enum class E2; struct S { static const E e = E::Foo; };