]> granicus.if.org Git - clang/commitdiff
HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify
authorDouglas Gregor <dgregor@apple.com>
Thu, 13 Oct 2011 18:26:27 +0000 (18:26 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 13 Oct 2011 18:26:27 +0000 (18:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141878 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.cpp
lib/Sema/SemaExpr.cpp

index 7b9f5909d1c3f619e16ceeff95cabe61f2cc65a1..533b21cb43e9a4798a41ad12c1e73748539aaba7 100644 (file)
@@ -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;
index bfe98498d8955e53d8e8bc6454357946fafe2787..3818e3d3a1c62bc98addaaf90d015e6da28e36fb 100644 (file)
@@ -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<UnresolvedLookupExpr>(ovl)) {
         UnresolvedLookupExpr *ULE = cast<UnresolvedLookupExpr>(ovl);