summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-local-class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-local-class.cpp')
-rw-r--r--test/SemaTemplate/instantiate-local-class.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/SemaTemplate/instantiate-local-class.cpp b/test/SemaTemplate/instantiate-local-class.cpp
index 2bf24c2..c9897b9 100644
--- a/test/SemaTemplate/instantiate-local-class.cpp
+++ b/test/SemaTemplate/instantiate-local-class.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -verify -std=c++11 %s
-// expected-no-diagnostics
template<typename T>
void f0() {
struct X;
@@ -181,3 +180,17 @@ namespace PR14373 {
return 0;
}
}
+
+namespace PR18907 {
+template <typename>
+class C : public C<int> {}; // expected-error{{within its own definition}}
+
+template <typename X>
+void F() {
+ struct A : C<X> {};
+}
+
+struct B {
+ void f() { F<int>(); }
+};
+}
OpenPOWER on IntegriCloud