[PATCH] D155217: [clang-tidy][include-cleaner] Don't warn for the same symbol twice

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 14 01:02:15 PDT 2023


VitaNuo added a comment.

Hi Alex,

Thank you for the patch.
We are aware that issuing one diagnostic per symbol reference might be overwhelming. However, we have decided to choose it over other options after considering the use cases that we'd like to cover.
This check is intended to be used in review tooling, where the user usually only sees their own change/diff. Issuing only one diagnostic for the first symbol reference would render this check mostly useless in code review, since the first symbol reference is not in the scope of the user's change most of the time.

Moreover, it's desirable to have similar behavior in include-cleaner checks across multiple clang tools. The current behaviour corresponds to the behaviour of built-in include-cleaner in clangd for similar reasons, i.e., users are most prone to act on a finding if it shows up in the piece of code they're currently editing.

The currently ongoing cleanup efforts should help the make the findings less overwhelming as well.


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

https://reviews.llvm.org/D155217



More information about the cfe-commits mailing list