diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-26 06:01:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-26 06:01:48 +0000 |
commit | a60a6914ccdcd83987e17445e5076556e88af10e (patch) | |
tree | 0425289148f9255d40e9b50442bd4ea4125f4ccc /clang/lib/Sema/SemaExpr.cpp | |
parent | 99dcbff1542f37a17952cd34d9c8ef022e28663a (diff) | |
download | bcm5719-llvm-a60a6914ccdcd83987e17445e5076556e88af10e.tar.gz bcm5719-llvm-a60a6914ccdcd83987e17445e5076556e88af10e.zip |
Tweak the new ResolveOverloadedCallFn to just return a FunctionDecl. It makes ActOnCallExpr simpler
llvm-svn: 60094
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index a6e1611dc31..a13bcbab629 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1295,12 +1295,16 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc, } if (Ovl) { - Fn = ResolveOverloadedCallFn(Fn, Ovl, LParenLoc, Args, NumArgs, CommaLocs, - RParenLoc); - if (!Fn) + FDecl = ResolveOverloadedCallFn(Fn, Ovl, LParenLoc, Args, NumArgs, CommaLocs, + RParenLoc); + if (!FDecl) return true; - // Fall through and build the call to Fn. + // Update Fn to refer to the actual function selected. + Expr *NewFn = new DeclRefExpr(FDecl, FDecl->getType(), + Fn->getSourceRange().getBegin()); + Fn->Destroy(Context); + Fn = NewFn; } if (getLangOptions().CPlusPlus && Fn->getType()->isRecordType()) |