aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-14 20:27:54 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-14 20:27:54 +0000
commit1aae80b173e22fa5d649f114eb6607efac350d79 (patch)
tree439d50fa027ba5c8d23dbec045f8b412ad630912 /lib/Sema/SemaOverload.cpp
parentaaf87162c5fbfbf320072da3a8e83392e1bbf041 (diff)
Thread a Scope pointer into BuildRecoveryCallExpr to help typo
correction find names when a call failed. Fixes <rdar://problem/7853795>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index c3d2e64f7b..e039669257 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -5639,7 +5639,7 @@ static Sema::OwningExprResult Destroy(Sema &SemaRef, Expr *Fn,
///
/// Returns true if new candidates were found.
static Sema::OwningExprResult
-BuildRecoveryCallExpr(Sema &SemaRef, Expr *Fn,
+BuildRecoveryCallExpr(Sema &SemaRef, Scope *S, Expr *Fn,
UnresolvedLookupExpr *ULE,
SourceLocation LParenLoc,
Expr **Args, unsigned NumArgs,
@@ -5661,7 +5661,7 @@ BuildRecoveryCallExpr(Sema &SemaRef, Expr *Fn,
LookupResult R(SemaRef, ULE->getName(), ULE->getNameLoc(),
Sema::LookupOrdinaryName);
- if (SemaRef.DiagnoseEmptyLookup(/*Scope=*/0, SS, R))
+ if (SemaRef.DiagnoseEmptyLookup(S, SS, R))
return Destroy(SemaRef, Fn, Args, NumArgs);
assert(!R.empty() && "lookup results empty despite recovery");
@@ -5697,7 +5697,7 @@ BuildRecoveryCallExpr(Sema &SemaRef, Expr *Fn,
/// resolution. Otherwise, emits diagnostics, deletes all of the
/// arguments and Fn, and returns NULL.
Sema::OwningExprResult
-Sema::BuildOverloadedCallExpr(Expr *Fn, UnresolvedLookupExpr *ULE,
+Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE,
SourceLocation LParenLoc,
Expr **Args, unsigned NumArgs,
SourceLocation *CommaLocs,
@@ -5730,7 +5730,7 @@ Sema::BuildOverloadedCallExpr(Expr *Fn, UnresolvedLookupExpr *ULE,
// AddRecoveryCallCandidates diagnoses the error itself, so we just
// bailout out if it fails.
if (CandidateSet.empty())
- return BuildRecoveryCallExpr(*this, Fn, ULE, LParenLoc, Args, NumArgs,
+ return BuildRecoveryCallExpr(*this, S, Fn, ULE, LParenLoc, Args, NumArgs,
CommaLocs, RParenLoc);
OverloadCandidateSet::iterator Best;