HazardyKnusperkeks added inline comments.

================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:839
 
+void FormatTokenLexer::resizeToken(size_t NewLen) {
+  resetLexer(SourceMgr.getFileOffset(Lex->getSourceLocation(
----------------
Can you add some documentation?


================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:868
+      break;
+      // A '\' followed by a newline always escapes the newline, regardless
+      // of whether there is another '\' before it.
----------------
I'd put (and search while reading) the comment after the case.


================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:871-872
+    case '\\':
+      // The source has a null byte at the end. It is not necessary to
+      // check Cur + 1 < Text.end().
+      if (Cur[1] == '\n' || Cur[1] == '\r')
----------------
Please verify your assumption with an assert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124748

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

Reply via email to