Differential Revision: http://llvm-reviews.chandlerc.com/D920
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188137
91177308-0d34-0410-b5e6-
96231b3b80d8
isa<TemplateTemplateParmDecl>(D))
return D;
+ if (D->isInvalidDecl())
+ return 0;
+
// If we didn't find the decl, then we must have a label decl that hasn't
// been found yet. Lazily instantiate it and return it now.
assert(isa<LabelDecl>(D));
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}}
+ }
+}