| 1 |
// RUN: %clang_cc1 -std=c23 -Wno-underlying-atomic-qualifier-ignored -ast-dump %s | FileCheck %s |
| 2 |
|
| 3 |
// The underlying type is the unqualified, non-atomic version of the type |
| 4 |
// specified. |
| 5 |
enum const_enum : const short { ConstE }; |
| 6 |
// CHECK: EnumDecl {{.*}} const_enum 'short' |
| 7 |
|
| 8 |
// These were previously being diagnosed as invalid underlying types. They |
| 9 |
// are valid; the _Atomic is stripped from the underlying type. |
| 10 |
enum atomic_enum1 : _Atomic(int) { AtomicE1 }; |
| 11 |
// CHECK: EnumDecl {{.*}} atomic_enum1 'int' |
| 12 |
enum atomic_enum2 : _Atomic long long { AtomicE2 }; |
| 13 |
// CHECK: EnumDecl {{.*}} atomic_enum2 'long long' |