Simplify FindExternalVisibleDeclsByName by making it return a bool indicating

if it found any decls, rather than returning a list of found decls. This
removes a returning-ArrayRef-to-deleted-storage bug from
MultiplexExternalSemaSource (in code not exercised by any of the clang
binaries), reduces the work required in the found-no-decls case with PCH, and
importantly removes the need for DeclContext::lookup to be reentrant.

No functionality change intended!

llvm-svn: 174576
This commit is contained in:
Richard Smith
2013-02-07 03:30:24 +00:00
parent c121b9b796
commit 9ce12e36ab
9 changed files with 32 additions and 71 deletions

View File

@@ -191,7 +191,7 @@ CXXBaseSpecifier *
ChainedIncludesSource::GetExternalCXXBaseSpecifiers(uint64_t Offset) {
return getFinalReader().GetExternalCXXBaseSpecifiers(Offset);
}
DeclContextLookupResult
bool
ChainedIncludesSource::FindExternalVisibleDeclsByName(const DeclContext *DC,
DeclarationName Name) {
return getFinalReader().FindExternalVisibleDeclsByName(DC, Name);