Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,
template<typename T>
struct X {
void f(T);
};
template<typename T> X<T>::f(T) { /* ... */ }
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 5fbc8e8..3964f76 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -1151,7 +1151,8 @@
D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef &&
((D.getContext() != Declarator::MemberContext &&
(!D.getCXXScopeSpec().isSet() ||
- !computeDeclContext(D.getCXXScopeSpec())->isRecord())) ||
+ !computeDeclContext(D.getCXXScopeSpec(), /*FIXME:*/true)
+ ->isRecord())) ||
D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static)) {
if (D.isFunctionDeclarator())
Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_function_type);