summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/recovery-crash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/recovery-crash.cpp')
-rw-r--r--clang/test/SemaTemplate/recovery-crash.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/recovery-crash.cpp b/clang/test/SemaTemplate/recovery-crash.cpp
index b5a0e1fa13f..78f6db40d5c 100644
--- a/clang/test/SemaTemplate/recovery-crash.cpp
+++ b/clang/test/SemaTemplate/recovery-crash.cpp
@@ -22,3 +22,16 @@ namespace PR16134 {
template <class P> struct S // expected-error {{expected ';'}}
template <> static S<Q>::f() // expected-error +{{}}
}
+
+namespace PR16225 {
+ template <typename T> void f();
+ template<typename C> void g(C*) {
+ struct LocalStruct : UnknownBase<Mumble, C> { }; // expected-error {{unknown template name 'UnknownBase'}} \
+ // expected-error {{use of undeclared identifier 'Mumble'}}
+ f<LocalStruct>(); // expected-warning {{template argument uses local type 'LocalStruct'}}
+ }
+ struct S;
+ void h() {
+ g<S>(0); // expected-note {{in instantiation of function template specialization}}
+ }
+}
OpenPOWER on IntegriCloud