Recommit r102215, this time being more careful to only set the "principal
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Lookup.h b/lib/Sema/Lookup.h
index 97bc4f2..0961299 100644
--- a/lib/Sema/Lookup.h
+++ b/lib/Sema/Lookup.h
@@ -124,7 +124,6 @@
   };
 
   typedef UnresolvedSetImpl::iterator iterator;
-  typedef bool (*ResultFilter)(NamedDecl*, unsigned IDNS);
 
   LookupResult(Sema &SemaRef, DeclarationName Name, SourceLocation NameLoc,
                Sema::LookupNameKind LookupKind,
@@ -136,7 +135,6 @@
       Name(Name),
       NameLoc(NameLoc),
       LookupKind(LookupKind),
-      IsAcceptableFn(0),
       IDNS(0),
       Redecl(Redecl != Sema::NotForRedeclaration),
       HideTags(true),
@@ -156,7 +154,6 @@
       Name(Other.Name),
       NameLoc(Other.NameLoc),
       LookupKind(Other.LookupKind),
-      IsAcceptableFn(Other.IsAcceptableFn),
       IDNS(Other.IDNS),
       Redecl(Other.Redecl),
       HideTags(Other.HideTags),
@@ -242,8 +239,7 @@
 
   /// \brief Tests whether the given declaration is acceptable.
   bool isAcceptableDecl(NamedDecl *D) const {
-    assert(IsAcceptableFn);
-    return IsAcceptableFn(D, IDNS);
+    return D->isInIdentifierNamespace(IDNS);
   }
 
   /// \brief Returns the identifier namespace mask for this lookup.
@@ -575,7 +571,6 @@
   SourceLocation NameLoc;
   SourceRange NameContextRange;
   Sema::LookupNameKind LookupKind;
-  ResultFilter IsAcceptableFn; // set by configure()
   unsigned IDNS; // set by configure()
 
   bool Redecl;