[PATCH] D68682: Clang-tidy fix removals removing all non-blank text from a line should remove the line

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 08:49:39 PST 2019


gribozavr2 added inline comments.


================
Comment at: clang/include/clang/AST/CommentLexer.h:25
+
+/// Requires that BufferPtr point to a newline character (/n or /r).
+/// Returns a pointer past the end of any platform newline, i.e. past
----------------
"\n" and "\r" (everywhere)


================
Comment at: clang/lib/AST/CommentLexer.cpp:20
+
+// Consider moving this useful function to a more general utility location.
+const char *skipNewline(const char *BufferPtr, const char *BufferEnd) {
----------------
Please do so in this change. clang/include/clang/Basic/CharInfo.h?


================
Comment at: clang/lib/AST/CommentParser.cpp:19
 
-static inline bool isWhitespace(llvm::StringRef S) {
+// Consider moving this useful function to a more general utility location.
+bool isWhitespace(llvm::StringRef S) {
----------------
clang/include/clang/Basic/CharInfo.h ?


================
Comment at: clang/lib/Format/Format.cpp:2367
+  // and confirmed that the replacement result so far will be entirely blank.
+  std::list<std::pair<int, int>> PotentialWholeLineCuts;
+  int LineStartPos = -1;
----------------
Why std::list? std::vector seems more appropriate to me.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D68682





More information about the cfe-commits mailing list