[clang] [clang] Adjust TextDiagnostic style ranges for interesting source region (PR #164941)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 31 08:12:47 PDT 2025


================
@@ -1508,8 +1544,9 @@ void TextDiagnostic::emitSnippet(StringRef SourceLine,
   // Print the source line one character at a time.
   bool PrintReversed = false;
   std::optional<llvm::raw_ostream::Colors> CurrentColor;
-  size_t I = 0;
+  size_t I = 0; // Bytes.
----------------
tbaederr wrote:

No real reason, but `Bytes::V` is a signed integer while we use `size_t`  a lot for this purpose (e.g. in `printableTextForNextCharacter`).

https://github.com/llvm/llvm-project/pull/164941


More information about the cfe-commits mailing list