diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-12-14 03:18:05 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-12-14 03:18:05 +0000 |
| commit | 3298368de9d0794050047b4d23598e7b0db81b37 (patch) | |
| tree | 7e403521db54b3c802d5d25368e5ac1b21bc2953 /clang/lib/Sema/SemaTemplate.cpp | |
| parent | 5e985ee5b56b0d74496a1f0773a29bac0e89b4f4 (diff) | |
| download | bcm5719-llvm-3298368de9d0794050047b4d23598e7b0db81b37.tar.gz bcm5719-llvm-3298368de9d0794050047b4d23598e7b0db81b37.zip | |
PR18246: When performing template argument deduction to decide which template
is specialized by an explicit specialization, start from the first declaration
in case we've got a member of a class template (redeclarations might not number
the template parameters the same way).
Our recover here is still far from ideal.
llvm-svn: 197305
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index b134f6ea510..e4fa380c3db 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -6521,9 +6521,9 @@ bool Sema::CheckFunctionTemplateSpecialization( // FIXME: It is somewhat wasteful to build TemplateDeductionInfo Info(FailedCandidates.getLocation()); FunctionDecl *Specialization = 0; - if (TemplateDeductionResult TDK - = DeduceTemplateArguments(FunTmpl, ExplicitTemplateArgs, FT, - Specialization, Info)) { + if (TemplateDeductionResult TDK = DeduceTemplateArguments( + cast<FunctionTemplateDecl>(FunTmpl->getFirstDecl()), + ExplicitTemplateArgs, FT, Specialization, Info)) { // Template argument deduction failed; record why it failed, so // that we can provide nifty diagnostics. FailedCandidates.addCandidate() |

