[PATCH] D56267: [clangd] Interfaces for writing code actions

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 17 06:49:19 PST 2019


ilya-biryukov added a comment.

Haven't yet addressed all the comments, but switched to use the "object library" (i.e. a collection of .o files) to make sure linker does not optimize away global ctors required by registry.



================
Comment at: clangd/refactor/Tweak.cpp:38
+namespace {
+const llvm::StringMap<std::function<std::unique_ptr<Tweak>()>> &
+tweaksRegistry() {
----------------
sammccall wrote:
> Can we drop this indirection and use the registry directly?
Sure, would mean linear time for prepareTweak, but we probably don't care.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D56267





More information about the cfe-commits mailing list