summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/PR20705.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR20705.cpp')
-rw-r--r--test/SemaCXX/PR20705.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaCXX/PR20705.cpp b/test/SemaCXX/PR20705.cpp
new file mode 100644
index 0000000..be2676e
--- /dev/null
+++ b/test/SemaCXX/PR20705.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+
+template <typename T>
+struct X {};
+auto b = []() {
+ struct S {
+ static typename X<decltype(int)>::type Run(){};
+ // expected-error@-1 4{{}}
+ };
+ return 5;
+}();
+
+template <typename T1, typename T2>
+class PC {
+};
+
+template <typename T>
+class P {
+ static typename PC<T, Invalid>::Type Foo();
+ // expected-error@-1 4{{}}
+};
OpenPOWER on IntegriCloud