[PATCH] D118882: [clangd] IncludeCleaner: Decrease API dependency on clangd
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 3 03:03:02 PST 2022
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/IncludeCleaner.h:55
+ ASTContext &Ctx, Preprocessor &PP,
+ const syntax::TokenBuffer &Tokens);
ReferencedLocations findReferencedLocations(ParsedAST &AST);
----------------
we can make Tokens & PP optional, and only track macros if they are present?
This lowers the barrier to entry a bit
================
Comment at: clang-tools-extra/clangd/IncludeCleaner.h:65
/// The output only includes things SourceManager sees as files (not macro IDs).
/// This can include <built-in>, <scratch space> etc that are not true files.
+ReferencedFiles
----------------
doc HeaderResponsible
================
Comment at: clang-tools-extra/clangd/IncludeCleaner.h:68
+findReferencedFiles(const ReferencedLocations &Locs, const SourceManager &SM,
+ std::function<FileID(FileID)> HeaderResponsible);
ReferencedFiles findReferencedFiles(const ReferencedLocations &Locs,
----------------
std::function -> llvm::function_ref?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118882/new/
https://reviews.llvm.org/D118882
More information about the cfe-commits
mailing list