diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /include/clang/Sema/MultiplexExternalSemaSource.h | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
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 |