1// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s 2// Test that we are emitting debug info and base types for scoped enums. 3 4// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Color" 5// CHECK-SAME: baseType: ![[INT:[0-9]+]] 6// CHECK: ![[INT]] = !DIBasicType(name: "int" 7enum class Color { gray }; 8 9void f(Color); 10void g() { 11 f(Color::gray); 12} 13 14// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Colour" 15// CHECK-SAME: baseType: ![[INT]] 16enum struct Colour { grey }; 17 18void h(Colour); 19void i() { 20 h(Colour::grey); 21} 22 23// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Couleur" 24// CHECK-SAME: baseType: ![[UCHAR:[0-9]+]] 25// CHECK: ![[UCHAR]] = !DIBasicType(name: "unsigned char" 26enum class Couleur : unsigned char { gris }; 27 28void j(Couleur); 29void k() { 30 j(Couleur::gris); 31} 32