clang-tidy has already provided some simple refactoring-like checks (e.g. modernize-use-auto,
modernize-use-using), so we can leverage the power of clang-tidy to implement tweaks.
clang-tidy-based tweaks compared to clang-tidy check:
- For refactoring checks, tweaks maybe a better UI compared to showing as diagnostics (we only show on the UI when users do it intendedly)
- faster, we run the check on a single AST node rather than the whole AST
I can't quite parse this.
"only checks whose matchers match exactly the selected node will work"?
One concern here is that this is basically an implementation detail of a check: checks can choose to e.g. match on a specific node and do a cheap analysis, or match on a higher-level node and do an expensive one. Maybe as long as the specific checks we want work well, it's not an issue. But every check added here needs to be carefully reviewed for performance.