diff options
Diffstat (limited to 'include/clang/Sema/MultiplexExternalSemaSource.h')
-rw-r--r-- | include/clang/Sema/MultiplexExternalSemaSource.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/include/clang/Sema/MultiplexExternalSemaSource.h b/include/clang/Sema/MultiplexExternalSemaSource.h index af7083a..d6daadc 100644 --- a/include/clang/Sema/MultiplexExternalSemaSource.h +++ b/include/clang/Sema/MultiplexExternalSemaSource.h @@ -102,29 +102,12 @@ public: /// \brief Finds all declarations lexically contained within the given /// DeclContext, after applying an optional filter predicate. /// - /// \param isKindWeWant a predicate function that returns true if the passed - /// declaration kind is one we are looking for. If NULL, all declarations - /// are returned. - /// - /// \return an indication of whether the load succeeded or failed. - ExternalLoadResult FindExternalLexicalDecls(const DeclContext *DC, - bool (*isKindWeWant)(Decl::Kind), - SmallVectorImpl<Decl*> &Result) override; - - /// \brief Finds all declarations lexically contained within the given - /// DeclContext. - /// - /// \return true if an error occurred - ExternalLoadResult FindExternalLexicalDecls(const DeclContext *DC, - SmallVectorImpl<Decl*> &Result) { - return FindExternalLexicalDecls(DC, nullptr, Result); - } - - template <typename DeclTy> - ExternalLoadResult FindExternalLexicalDeclsBy(const DeclContext *DC, - SmallVectorImpl<Decl*> &Result) { - return FindExternalLexicalDecls(DC, DeclTy::classofKind, Result); - } + /// \param IsKindWeWant a predicate function that returns true if the passed + /// declaration kind is one we are looking for. + void + FindExternalLexicalDecls(const DeclContext *DC, + llvm::function_ref<bool(Decl::Kind)> IsKindWeWant, + SmallVectorImpl<Decl *> &Result) override; /// \brief Get the decls that are contained in a file in the Offset/Length /// range. \p Length can be 0 to indicate a point at \p Offset instead of |