From: Douglas Gregor Date: Thu, 13 Oct 2011 18:26:27 +0000 (+0000) Subject: HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64a371ff8d525880e519a43fc522cbdc79fc4a89;p=clang HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141878 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 7b9f5909d1..533b21cb43 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -894,8 +894,8 @@ bool Sema::isExprCallable(const Expr &E, QualType &ZeroArgCallReturnTy, } } - // Ignore overloads that are the pointer-to-member. - if (FR.IsAddressOfOperand && FR.HasFormOfMemberPointer) + // Ignore overloads that are pointer-to-member constants. + if (FR.HasFormOfMemberPointer) return false; return true; diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index bfe98498d8..3818e3d3a1 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3550,7 +3550,7 @@ Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, OverloadExpr::FindResult find = OverloadExpr::find(Fn); // We aren't supposed to apply this logic for if there's an '&' involved. - if (!(find.IsAddressOfOperand && find.HasFormOfMemberPointer)) { + if (!find.HasFormOfMemberPointer) { OverloadExpr *ovl = find.Expression; if (isa(ovl)) { UnresolvedLookupExpr *ULE = cast(ovl);