[PATCH] D146279: [clangd] Extend CollectMainFileMacros.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 23 03:44:41 PDT 2023
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/CollectMacros.h:48
public:
- explicit CollectMainFileMacros(const SourceManager &SM, MainFileMacros &Out)
- : SM(SM), Out(Out) {}
+ explicit CollectMainFileMacros(const SourceManager &SM,
+ const Preprocessor &PP, MainFileMacros &Out)
----------------
kadircet wrote:
> nit: you can get SM out of PP, no need to pass both.
oh, right!
================
Comment at: clang-tools-extra/clangd/CollectMacros.h:70
void Ifdef(SourceLocation Loc, const Token &MacroName,
const MacroDefinition &MD) override {
----------------
kadircet wrote:
> nit: can you actually move macro bodies out-of-line ? it's unfortunate that we need to build half of the project everytime we touch this header.
Done (thanks for the define-out-line code action!)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146279/new/
https://reviews.llvm.org/D146279
More information about the cfe-commits
mailing list