[PATCH] D18262: [clang-tidy] Skip reporting of not applicable fixes.
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 11:21:11 PDT 2016
etienneb added inline comments.
================
Comment at: ClangTidy.cpp:144
@@ -138,1 +143,3 @@
+
+ Diag << FixItHint::CreateReplacement(Range, Fix.getReplacementText());
++TotalFixes;
----------------
alexfh wrote:
> aaron.ballman wrote:
> > Is there a purpose to emitting the CreateReplacement if the fix isn't applicable?
> No, I don't think we need a replacement with an invalid range.
The CreateReplacement fix is ignored when appended. In the append function, there is a check to avoid invalid source range.
But, I think it's cleaner to move the statement within the if-block.
http://reviews.llvm.org/D18262
More information about the cfe-commits
mailing list