Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and LookupDeclInContext().
The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert.
The plan is to eventually deprecate both of these functions. For now, I'm focused on performance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63256 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 9a4ab86..406eb26 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -783,8 +783,10 @@
LookupCriteria Criteria);
LookupResult LookupParsedName(Scope *S, const CXXScopeSpec &SS,
DeclarationName Name, LookupCriteria Criteria);
- LookupResult LookupDecl(DeclarationName Name, unsigned NSI, Scope *S,
- const DeclContext *LookupCtx = 0,
+ LookupResult LookupDeclInScope(DeclarationName Name, unsigned NSI, Scope *S,
+ bool LookInParent = true);
+ LookupResult LookupDeclInContext(DeclarationName Name, unsigned NSI,
+ const DeclContext *LookupCtx,
bool LookInParent = true);
bool DiagnoseAmbiguousLookup(LookupResult &Result, DeclarationName Name,