diff options
author | John McCall <rjmccall@apple.com> | 2010-10-19 05:01:53 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-19 05:01:53 +0000 |
commit | c54d688c604d28dcb9ab8f92047837c10c8f9c61 (patch) | |
tree | 3edbc77840daa85bbd5f9e8b38ba92bd902892d1 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 51f56fc36e6d441b6dd722cc09c4ac9f081c0974 (diff) |
When instantiating a dependently-scoped friend function declaration,
we may need to complete the type before looking into it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 5636647cda..3d78f1316a 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1333,6 +1333,9 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D, SS.setScopeRep(Qualifier); SS.setRange(D->getQualifierRange()); DC = SemaRef.computeDeclContext(SS); + + if (DC && SemaRef.RequireCompleteDeclContext(SS, DC)) + return 0; } else { DC = SemaRef.FindInstantiatedContext(D->getLocation(), D->getDeclContext(), |