summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/scoped-enums.cpp
blob: c20faaaf2e96d02f718e89af042753430c7fb4ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s

// PR9923
enum class Color { red, blue, green };

void f(Color);
void g() {
  f(Color::red);
}

// See that struct is handled equally.
enum struct Colour { grey };

void h(Colour);
void i() {
  h(Colour::grey);
}
OpenPOWER on IntegriCloud