poelmanc marked an inline comment as done.
poelmanc added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:27
 #include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Basic/CharInfo.h" // for isWhiteSpace(char), 
isVerticalWhitespace(char)
 #include "clang/Config/config.h"
----------------
MyDeveloperDay wrote:
> Nit: I'm guessing you'd drop these comments later
Thanks, will do!


================
Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:143
+                     ReplacementText.empty();
+    LineCheckedThroughPos = R.getOffset() + R.getLength();
+  }
----------------
MyDeveloperDay wrote:
> so If I understand correctly, if the ReplcementText is empty we are assuming 
> we've removed it, as opposed to if someone was adding a blank line the 
> ReplacementText would be all whitespace as we might remove it by mistake.. 
> sound reasonable
Exactly. A check's check() function can create a clang::FixItHint as an 
Insertion, Removal, or Replacement. Later FixItHints get processed, sorted, and 
merged into an ordered set of clang::tooling::Replacement. Each Replacement has 
a file Offset, Length, and ReplacementText. So a Removal FixItHint generally 
ends up as a Replacement whose ReplacementText is the empty string.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D68682



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to