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

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 9 12:19:22 PDT 2023


tahonermann accepted this revision.
tahonermann added a comment.
This revision is now accepted and ready to land.

> They are NFC, it's just not 100% only a refactoring, since it adds the new ASCII-only case.

Ok, thanks. Changes look good. I noticed one comment that appears to be incorrect; please just remove it when committing the changes.



================
Comment at: clang/lib/Frontend/TextDiagnostic.cpp:128
+
+  // We now know that the next character is a multi-byte character.
+  // Convert it to UTF32 and check if it's printable.
----------------
This comment is not correct; `Begin` might still point to a non-printable character with a code point value less than 0x80. I suggest just removing the comment.


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

https://reviews.llvm.org/D150843



More information about the cfe-commits mailing list