]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/scoped-enums-debug-info.cpp
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / scoped-enums-debug-info.cpp
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s | FileCheck %s
2 // Test that we are emitting debug info and base types for scoped enums.
3
4 // CHECK: [ DW_TAG_enumeration_type ] [Color] {{.*}} [from int]
5 enum class Color { gray };
6
7 void f(Color);
8 void g() {
9   f(Color::gray);
10 }
11
12 // CHECK: [ DW_TAG_enumeration_type ] [Colour] {{.*}} [from int]
13 enum struct Colour { grey };
14
15 void h(Colour);
16 void i() {
17   h(Colour::grey);
18 }
19
20 // CHECK: [ DW_TAG_enumeration_type ] [Couleur] {{.*}} [from unsigned char]
21 enum class Couleur : unsigned char { gris };
22
23 void j(Couleur);
24 void k() {
25   j(Couleur::gris);
26 }