[PATCH] D150843: [clang][Diagnostics] Refactor printableTextForNextCharacter

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 14:55:08 PDT 2023


tahonermann added a comment.

The changes look good to me. I suggested two minor edits to align with parameter name changes.

The summary states that the changes are not quite NFC. In that case, we would ideally have a test that demonstrates the changed behavior. Would adding such a test be challenging?



================
Comment at: clang/lib/Frontend/TextDiagnostic.cpp:94
 /// \param SourceLine The line of source
 /// \param i Pointer to byte index,
 /// \param TabStop used to expand tabs
----------------



================
Comment at: clang/lib/Frontend/TextDiagnostic.cpp:101
                               unsigned TabStop) {
-  assert(i && "i must not be null");
-  assert(*i<SourceLine.size() && "must point to a valid index");
+  assert(I && "i must not be null");
+  assert(*I < SourceLine.size() && "must point to a valid index");
----------------



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

https://reviews.llvm.org/D150843



More information about the cfe-commits mailing list