| 1 |
// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s |
| 2 |
|
| 3 |
// PR9923 |
| 4 |
enum class Color { red, blue, green }; |
| 5 |
|
| 6 |
void f(Color); |
| 7 |
void g() { |
| 8 |
f(Color::red); |
| 9 |
} |
| 10 |
|
| 11 |
// See that struct is handled equally. |
| 12 |
enum struct Colour { grey }; |
| 13 |
|
| 14 |
void h(Colour); |
| 15 |
void i() { |
| 16 |
h(Colour::grey); |
| 17 |
} |
| 18 |
|
| 19 |
enum struct PR17103 : int { a = -1, b = 1 }; |
| 20 |
bool cmp(PR17103 x, PR17103 y) { return x < y; } |
| 21 |
|
| 22 |
// CHECK-LABEL: @_Z3cmp7PR17103S_( |
| 23 |
// CHECK-NOT: } |
| 24 |
// CHECK: icmp slt |