[PATCH] D62538: [clangd] Add hidden tweaks to dump AST/selection.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 04:59:48 PDT 2019


sammccall marked 2 inline comments as done.
sammccall added inline comments.


================
Comment at: clangd/refactor/Tweak.h:104
+  /// Is this a 'hidden' tweak, which are off by default.
+  virtual bool hidden() const { return false; }
 };
----------------
ilya-biryukov wrote:
> I wonder whether this should be a static method. WDYT?
> 
> That would allow to even prevent calling `prepare()` on those tweaks.
> OTOH, we want `prepare()` should be fast and it shouldn't matter if that's the case.
We'd need to add criteria to prepareTweaks() as hidden() couldn't be checked polymorphically on the results.

I think this is a good idea but should probably happen if/when we have a more important reason to touch that API.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D62538





More information about the cfe-commits mailing list