[PATCH] D92155: Load plugins when creating a CompilerInvocation.

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 22:04:57 PST 2020


nridge added a comment.

> What I'm asking specifically is: this feature has a cost, how important is supporting it? Are there codebases where these attributes are widely used, and enforcement at development time is particularly valuable?

FWIW, one of the codebases I work on uses a clang plugin to report a number of additional diagnostics, and I think it would be quite useful to have those show up as you're editing (comparable to clang-tidy diagnostics, except even more relevant as they're domain-specific).

I think making plugin support opt-in (including by requiring the clangd flags to mention the plugin, as suggested) would be fine. I think it's also fine to make clangd's support for plugins best-effort, in the sense that if a plugin doesn't play nicely in one of the mentioned ways (e.g. it uses static storage, or does not expect SkipFunctionBodies), the onus is on the plugin to fix those behaviours.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92155/new/

https://reviews.llvm.org/D92155



More information about the cfe-commits mailing list