diff options
Diffstat (limited to 'clang-tools-extra/clangd/HeaderSourceSwitch.h')
-rw-r--r-- | clang-tools-extra/clangd/HeaderSourceSwitch.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/HeaderSourceSwitch.h b/clang-tools-extra/clangd/HeaderSourceSwitch.h index 23ecc4b6ce3..a971b385d74 100644 --- a/clang-tools-extra/clangd/HeaderSourceSwitch.h +++ b/clang-tools-extra/clangd/HeaderSourceSwitch.h @@ -21,6 +21,16 @@ llvm::Optional<Path> getCorrespondingHeaderOrSource( const Path &OriginalFile, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS); +/// Given a header file, returns the best matching source file, and vice visa. +/// The heuristics incorporate with the AST and the index (if provided). +llvm::Optional<Path> getCorrespondingHeaderOrSource(const Path &OriginalFile, + ParsedAST &AST, + const SymbolIndex *Index); + +/// Returns all indexable decls that are present in the main file of the AST. +/// Exposed for unittests. +std::vector<const Decl *> getIndexableLocalDecls(ParsedAST &AST); + } // namespace clangd } // namespace clang |