[PATCH] D91103: [tooling] Add support for fixits that indicate code will need reformatting

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 15:01:22 PST 2020


njames93 added a comment.

In D91103#2384048 <https://reviews.llvm.org/D91103#2384048>, @jingham wrote:

> IIUC, the expression parser part of this change suppresses any Fixits that are clang-tidy type rewrites, is that right?  If so that is indeed the correct behavior.  But the fact that this change implements that behavior is entirely non-obvious at the call site.  Could you either add a comment here explaining to point of the test or maybe wrap the test in a method on the FixItHint class so that it's self documenting?

Hmm thats a good point, maybe a method inside FixItHint like,

  bool isReformatRange() const {
    return InsertFromRange() == RemoveRange();
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91103



More information about the cfe-commits mailing list