blob: 218013a4c58b7ef08fc7517d9ec5ff61b07b7bd0 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
Douglas Gregor575a1c92011-05-20 16:38:50 +00002
3// PR9923
4enum class Color { red, blue, green };
5
6void f(Color);
7void g() {
8 f(Color::red);
9}
Adrian Prantl59d6a712013-04-19 19:56:39 +000010
11// See that struct is handled equally.
Adrian Prantl59d6a712013-04-19 19:56:39 +000012enum struct Colour { grey };
13
14void h(Colour);
15void i() {
16 h(Colour::grey);
17}
Richard Smithe7eb0c42013-09-04 23:34:21 +000018
19enum struct PR17103 : int { a = -1, b = 1 };
20bool cmp(PR17103 x, PR17103 y) { return x < y; }
21
22// CHECK-LABEL: @_Z3cmp7PR17103S_(
23// CHECK-NOT: }
24// CHECK: icmp slt