diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-26 22:43:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-26 22:43:55 +0000 |
commit | e79ce292d93f955c1219c3977c02199bd3dc6544 (patch) | |
tree | 1e7ec39a92c59dd055053b34a8a621233f43ef05 /lib/Sema/SemaExpr.cpp | |
parent | d74505e985976c3ef0170360174d863821c6165c (diff) |
<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 4ba1d0d7d4..c0b1ad1998 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1563,9 +1563,10 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, UnresolvedLookupExpr *ULE = cast<UnresolvedLookupExpr>( CallsUndergoingInstantiation.back()->getCallee()); - CXXMethodDecl *DepMethod; - if (CurMethod->getTemplatedKind() == + if (CurMethod->isDependentContext()) + DepMethod = CurMethod; + else if (CurMethod->getTemplatedKind() == FunctionDecl::TK_FunctionTemplateSpecialization) DepMethod = cast<CXXMethodDecl>(CurMethod->getPrimaryTemplate()-> getInstantiatedFromMemberTemplate()->getTemplatedDecl()); |