]> granicus.if.org Git - clang/commit
When we determine that a function template specialization produced as
authorDouglas Gregor <dgregor@apple.com>
Wed, 12 Oct 2011 20:35:48 +0000 (20:35 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 12 Oct 2011 20:35:48 +0000 (20:35 +0000)
commit5fad9b8362c62e230f6603d86ec7d1747e74c737
tree8916a990178b358aee68bb68ad005186a0e24f7b
parent183a8dead4c3c07efe27fb2db7ede6ed7ac8e2f2
When we determine that a function template specialization produced as
part of template argument deduction is ill-formed, we mark it as
invalid and treat it as a deduction failure. If we happen to find that
specialization again, treat it as a deduction failure rather than
silently building a call to the declaration.

Fixes PR11117, a marvelous bug where deduction failed after creating
an invalid specialization, causing overload resolution to pick a
different candidate. Then we performed a similar overload resolution
later, and happily picked the invalid specialization to
call... resulting in a silent link failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141809 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateDeduction.cpp
test/CXX/temp/temp.decls/temp.mem/p5.cpp
test/SemaTemplate/operator-template.cpp
test/SemaTemplate/temp_arg_nontype.cpp