aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/MultiplexExternalSemaSource.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-05 22:41:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-05 22:41:45 +0000
commit3cb15729aff241e28c9854bd09609fb74e7bac37 (patch)
treea51bd54acbb78d140ec33b26f1779ad74c5bdf6e /clang/lib/Sema/MultiplexExternalSemaSource.cpp
parentae0d4365454456203a6f284c5d0e6ed994883c86 (diff)
downloadllvm-3cb15729aff241e28c9854bd09609fb74e7bac37.zip
llvm-3cb15729aff241e28c9854bd09609fb74e7bac37.tar.gz
llvm-3cb15729aff241e28c9854bd09609fb74e7bac37.tar.bz2
function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
useless return value. Switch to using it directly when completing the redeclaration chain for an anonymous declaration, and reduce the set of declarations that we load in the process to just those of the right kind. llvm-svn: 244161
Diffstat (limited to 'clang/lib/Sema/MultiplexExternalSemaSource.cpp')
-rw-r--r--clang/lib/Sema/MultiplexExternalSemaSource.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 9ecb5a7..0f93421 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -107,15 +107,11 @@ void MultiplexExternalSemaSource::completeVisibleDeclsMap(const DeclContext *DC)
Sources[i]->completeVisibleDeclsMap(DC);
}
-ExternalLoadResult MultiplexExternalSemaSource::
-FindExternalLexicalDecls(const DeclContext *DC,
- bool (*isKindWeWant)(Decl::Kind),
- SmallVectorImpl<Decl*> &Result) {
+void MultiplexExternalSemaSource::FindExternalLexicalDecls(
+ const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
+ SmallVectorImpl<Decl *> &Result) {
for(size_t i = 0; i < Sources.size(); ++i)
- // FIXME: The semantics of the return result is unclear to me...
- Sources[i]->FindExternalLexicalDecls(DC, isKindWeWant, Result);
-
- return ELR_Success;
+ Sources[i]->FindExternalLexicalDecls(DC, IsKindWeWant, Result);
}
void MultiplexExternalSemaSource::FindFileRegionDecls(FileID File,