diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-02-19 21:32:49 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-02-19 21:32:49 +0000 |
| commit | b491ed36b4ef9943e21fb47405b5ed8bea412b99 (patch) | |
| tree | de8868396de7c68d645551bf1e8c841e32642c0d /clang/lib/Sema/SemaTemplate.cpp | |
| parent | 47ffd35beac5a3a999baaf72f373d5ce8cf6f66f (diff) | |
| download | bcm5719-llvm-b491ed36b4ef9943e21fb47405b5ed8bea412b99.tar.gz bcm5719-llvm-b491ed36b4ef9943e21fb47405b5ed8bea412b99.zip | |
Handle the resolution of a reference to a function template (which
includes explicitly-specified template arguments) to a function
template specialization in cases where no deduction is performed or
deduction fails. Patch by Faisal Vali, fixes PR7505!
llvm-svn: 126048
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 12ed3732e71..9a11c68e055 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -1824,6 +1824,11 @@ ExprResult Sema::BuildTemplateIdExpr(const CXXScopeSpec &SS, // template arguments that we have against the template name, if the template // name refers to a single template. That's not a terribly common case, // though. + // foo<int> could identify a single function unambiguously + // This approach does NOT work, since f<int>(1); + // gets resolved prior to resorting to overload resolution + // i.e., template<class T> void f(double); + // vs template<class T, class U> void f(U); // These should be filtered out by our callers. assert(!R.empty() && "empty lookup results when building templateid"); |

