[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbce3ac4f224a: [clangd] Introduce ASTHooks to FeatureModules (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 337168. kadircet marked 2 inline comments as done. kadircet added a comment. - Inline helper to call-sites - Add comments about destruction of ast listeners. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/FeatureModule.h:106 + struct ASTListener { +virtual ~ASTListener() = default; + comment: listeners are

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 337101. kadircet marked 7 inline comments as done. kadircet added a comment. - Pass FeatureModuleSet rather than astListeners in ParseInputs. - Create listeners only when building ASTs. - Use a callback function in StoreDiags to notify about diagnostics.

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-04-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:237 + if (auto Hook = Mod.astHooks()) { +Inputs.PreambleHooks.emplace_back(std::move(Hook)); +Inputs.MainFileHooks.emplace_back(Mod.astHooks()); Now we're

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 334079. kadircet added a comment. - Have 2 separate hooks for preamble and mainfile ASTs, as they are produced async. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98499/new/ https://reviews.llvm.org/D98499

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FeatureModule.h:112 + }; + /// Can be called asynchronously before building an AST. + virtual std::unique_ptr astHooks() { return nullptr; } sammccall wrote: > kadircet wrote: > > sammccall

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D98499#2644313 , @kadircet wrote: > In D98499#2626502 , @sammccall wrote: > >> My model for modules using this diagnostic stuff (apart from the >> build-system stuff which sadly can't

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 332613. kadircet added a comment. - Rename ParsedASTHooks to Listeners. - Generate list of hooks on each parse. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98499/new/ https://reviews.llvm.org/D98499 Files:

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added a comment. In D98499#2626502 , @sammccall wrote: > My model for modules using this diagnostic stuff (apart from the build-system > stuff which sadly can't be meaningfully upstreamed) are

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a project: clang-tools-extra. I'm getting a little nervous about the amount of stuff we're packing into modules without in-tree examples. I should split out some of the "standard" features into modules as that's possible already. My model for modules

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 330258. kadircet added a comment. - Add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98499/new/ https://reviews.llvm.org/D98499 Files: clang-tools-extra/clangd/ClangdServer.cpp

[PATCH] D98499: [clangd] Introduce ASTHooks to FeatureModules

2021-03-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman, javed.absar. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. These can be invoked at