summaryrefslogtreecommitdiff
path: root/test/SemaCXX/ast-print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/ast-print.cpp')
-rw-r--r--test/SemaCXX/ast-print.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/ast-print.cpp b/test/SemaCXX/ast-print.cpp
index 39a52ab8d7e88..408af35c29519 100644
--- a/test/SemaCXX/ast-print.cpp
+++ b/test/SemaCXX/ast-print.cpp
@@ -227,3 +227,14 @@ template <typename T> struct Foo : T {
using T::operator-;
};
}
+
+namespace dont_crash_on_auto_vars {
+struct T { enum E {X = 12ll }; };
+struct S {
+ struct { int I; } ADecl;
+ static const auto Y = T::X;
+};
+//CHECK: static const auto Y = T::X;
+constexpr auto var = T::X;
+//CHECK: constexpr auto var = T::X;
+}