Eliminated LookupCriteria, whose creation was causing a bottleneck for
LookupName et al. Instead, use an enum and a bool to describe its
contents.

Optimized the C/Objective-C path through LookupName, eliminating any
unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing
some code and arguments that are no longer used.

Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers
over to LookupName, LookupQualifiedName, or LookupParsedName, as
appropriate.

All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and
-disable-free. Plus, we're down to three name-lookup routines.

llvm-svn: 63354
diff --git a/clang/lib/Sema/SemaInherit.cpp b/clang/lib/Sema/SemaInherit.cpp
index cb58063..0772bc3 100644
--- a/clang/lib/Sema/SemaInherit.cpp
+++ b/clang/lib/Sema/SemaInherit.cpp
@@ -153,7 +153,8 @@
     } else {
       Paths.ScratchPath.Decls = BaseRecord->lookup(Criteria.Name);
       while (Paths.ScratchPath.Decls.first != Paths.ScratchPath.Decls.second) {
-        if (Criteria.Criteria.isLookupResult(*Paths.ScratchPath.Decls.first)) {
+        if (isAcceptableLookupResult(*Paths.ScratchPath.Decls.first,
+                                     Criteria.NameKind, Criteria.IDNS)) {
           FoundPathToThisBase = true;
           break;
         }