summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/scoped-enums.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-04-19 19:56:39 +0000
committerAdrian Prantl <aprantl@apple.com>2013-04-19 19:56:39 +0000
commit59d6a71d681adfdc7d976492eeb3deae84e8f2e2 (patch)
tree61b46da54ea3fbdc10d8a1c90ddce1a731125a24 /test/CodeGenCXX/scoped-enums.cpp
parentfc7227e4c27aa8af33b5384b281d1eecfc74858a (diff)
Emit the underlying type in the debug info for all kinds of fixed enums
instead of only C++11-scoped-with-class-tag enums. rdar://problem/13463793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/scoped-enums.cpp')
-rw-r--r--test/CodeGenCXX/scoped-enums.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGenCXX/scoped-enums.cpp b/test/CodeGenCXX/scoped-enums.cpp
index fca0509892..d19b3eec2b 100644
--- a/test/CodeGenCXX/scoped-enums.cpp
+++ b/test/CodeGenCXX/scoped-enums.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -o - %s
// PR9923
enum class Color { red, blue, green };
@@ -7,3 +7,12 @@ void f(Color);
void g() {
f(Color::red);
}
+
+// See that struct is handled equally.
+// CHECK: [ DW_TAG_enumeration_type ] [Colour]
+enum struct Colour { grey };
+
+void h(Colour);
+void i() {
+ h(Colour::grey);
+}