diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-13 18:10:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-13 18:10:35 +0000 |
commit | ee697e69a2063b65bfd0534248e4848461aca3f4 (patch) | |
tree | b25eb10f27dc58fa87188115c16a38d5885734a7 /lib/Sema/SemaExpr.cpp | |
parent | 2f7aa998c0d6494301c12c4fceb6134a1bc248ab (diff) |
Allow calling an overloaded function set by taking the address of the
functions, e.g., (&f)(0). Fixes <rdar://problem/9803316>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d0ad5c8bfd..bfe98498d8 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3549,8 +3549,8 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, if (Fn->getType() == Context.OverloadTy) { OverloadExpr::FindResult find = OverloadExpr::find(Fn); - // We aren't supposed to apply this logic if there's an '&' involved. - if (!find.IsAddressOfOperand) { + // We aren't supposed to apply this logic for if there's an '&' involved. + if (!(find.IsAddressOfOperand && find.HasFormOfMemberPointer)) { OverloadExpr *ovl = find.Expression; if (isa<UnresolvedLookupExpr>(ovl)) { UnresolvedLookupExpr *ULE = cast<UnresolvedLookupExpr>(ovl); |