aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-23 22:18:25 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-23 22:18:25 +0000
commit097bfb11759be2187732329ecf4c0849609cdf57 (patch)
tree9cafc65d553197a03de4fb7294d30d96d55b9445 /lib/Sema/SemaExpr.cpp
parent06a59bb8260ce3d52de761865dee90f90054a5cc (diff)
Migrate Sema::ActOnCallExpr to Sema::FixOverloadedFunctionReference,
so that we maintain better source information after template argument deduction and overloading resolves down to a specific declaration. Found and dealt with a few more cases that FixOverloadedFunctionReference didn't cope with. (Finally) added a test case that puts together this change with the DeclRefExpr change to (optionally) include nested-name-specifiers and explicit template argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 490c73896e..b1915750c9 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2922,13 +2922,7 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc,
if (!FDecl)
return ExprError();
- // Update Fn to refer to the actual function selected.
- // FIXME: Use FixOverloadedFunctionReference?
- Expr *NewFn = DeclRefExpr::Create(Context, Qualifier, QualifierRange, FDecl,
- Fn->getLocStart(), FDecl->getType(), false,
- false);
- Fn->Destroy(Context);
- Fn = NewFn;
+ Fn = FixOverloadedFunctionReference(Fn, FDecl);
}
}