diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-05 22:41:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-05 22:41:45 +0000 |
commit | 3cb15729aff241e28c9854bd09609fb74e7bac37 (patch) | |
tree | a51bd54acbb78d140ec33b26f1779ad74c5bdf6e /clang/lib/Sema/MultiplexExternalSemaSource.cpp | |
parent | ae0d4365454456203a6f284c5d0e6ed994883c86 (diff) | |
download | llvm-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.cpp | 12 |
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, |