diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-08 19:15:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-08 19:15:54 +0000 |
commit | 1d72edd7c55a80c4d4e5ff4bcd1aa686227aaff5 (patch) | |
tree | 8fed582209b59003b46e24bd21a22fb00704ad91 /clang/lib/Sema/SemaTemplateDeduction.cpp | |
parent | 564767cf3991268fa957fc729497d4cdfa6a7481 (diff) | |
download | bcm5719-llvm-1d72edd7c55a80c4d4e5ff4bcd1aa686227aaff5.tar.gz bcm5719-llvm-1d72edd7c55a80c4d4e5ff4bcd1aa686227aaff5.zip |
Improve overload-candidate diagnostic for a function template that
failed because the explicitly-specified template arguments did not
match its template parameters, e.g.,
test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate
template
ignored: invalid explicitly-specified argument for template
parameter 'I'
void get(const T&);
^
test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate
template
ignored: invalid explicitly-specified argument for 1st template
parameter
void get(const T&);
^
llvm-svn: 103344
Diffstat (limited to 'clang/lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 2bb97eba11c..f716ccd6f7f 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -1190,8 +1190,11 @@ Sema::SubstituteExplicitTemplateArguments( SourceLocation(), ExplicitTemplateArgs, true, - Builder) || Trap.hasErrorOccurred()) + Builder) || Trap.hasErrorOccurred()) { + Info.Param = makeTemplateParameter(TemplateParams->getParam( + Builder.structuredSize())); return TDK_InvalidExplicitArguments; + } // Form the template argument list from the explicitly-specified // template arguments. |