2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
|
2011-05-21 00:38:50 +08:00
|
|
|
|
|
|
|
// PR9923
|
|
|
|
enum class Color { red, blue, green };
|
|
|
|
|
|
|
|
void f(Color);
|
|
|
|
void g() {
|
|
|
|
f(Color::red);
|
|
|
|
}
|
2013-04-20 03:56:39 +08:00
|
|
|
|
|
|
|
// See that struct is handled equally.
|
|
|
|
enum struct Colour { grey };
|
|
|
|
|
|
|
|
void h(Colour);
|
|
|
|
void i() {
|
|
|
|
h(Colour::grey);
|
|
|
|
}
|
2013-09-05 07:34:21 +08:00
|
|
|
|
|
|
|
enum struct PR17103 : int { a = -1, b = 1 };
|
|
|
|
bool cmp(PR17103 x, PR17103 y) { return x < y; }
|
|
|
|
|
|
|
|
// CHECK-LABEL: @_Z3cmp7PR17103S_(
|
|
|
|
// CHECK-NOT: }
|
|
|
|
// CHECK: icmp slt
|