summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-16 19:16:25 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-16 19:16:25 +0000
commit89f3cd5c1521205f977c8d80438aef063742b7bb (patch)
tree7b466e1f751daedbaede24038068985a8655f141 /clang/lib/Sema/SemaExpr.cpp
parent5a4a0f75d463ef58cd1f66fd2a83d1d4a4f7140d (diff)
downloadbcm5719-llvm-89f3cd5c1521205f977c8d80438aef063742b7bb.tar.gz
bcm5719-llvm-89f3cd5c1521205f977c8d80438aef063742b7bb.zip
Clean up our handling of template-ids that resolve down to a single
overload, so that we actually do the resolution for full expressions and emit more consistent, useful diagnostics. Also fixes an IRGen crasher, where Sema wouldn't diagnose a resolvable bound member function template-id used in a full-expression (<rdar://problem/9108698>). llvm-svn: 127747
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 6acd2a5b034..a27864f673d 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9790,17 +9790,8 @@ ExprResult Sema::CheckPlaceholderExpr(Expr *E, SourceLocation Loc) {
// If this is overload, check for a single overload.
assert(BT->getKind() == BuiltinType::Overload);
-
- if (FunctionDecl *Specialization
- = ResolveSingleFunctionTemplateSpecialization(E)) {
- // The access doesn't really matter in this case.
- DeclAccessPair Found = DeclAccessPair::make(Specialization,
- Specialization->getAccess());
- E = FixOverloadedFunctionReference(E, Found, Specialization);
- if (!E) return ExprError();
- return Owned(E);
- }
-
- Diag(Loc, diag::err_ovl_unresolvable) << E->getSourceRange();
- return ExprError();
+ return ResolveAndFixSingleFunctionTemplateSpecialization(E, false, true,
+ E->getSourceRange(),
+ QualType(),
+ diag::err_ovl_unresolvable);
}
OpenPOWER on IntegriCloud