summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/short-enums.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/short-enums.cpp')
-rw-r--r--clang/test/SemaCXX/short-enums.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/short-enums.cpp b/clang/test/SemaCXX/short-enums.cpp
new file mode 100644
index 0000000..ca713b7
--- /dev/null
+++ b/clang/test/SemaCXX/short-enums.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fshort-enums -fsyntax-only %s
+
+// This shouldn't crash: PR9474
+
+enum E { VALUE_1 };
+
+template <typename T>
+struct A {};
+
+template <E Enum>
+struct B : A<B<Enum> > {};
+
+void bar(int x) {
+ switch (x) {
+ case sizeof(B<VALUE_1>): ;
+ }
+} \ No newline at end of file