[clang] [clang] Add Bytes/Column types to TextDiagnostic (PR #165541)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 05:01:05 PDT 2025


================
@@ -349,6 +409,9 @@ static void selectInterestingSourceRegion(std::string &SourceLine,
   // If we have a fix-it line, make sure the slice includes all of the
   // fix-it information.
   if (!FixItInsertionLine.empty()) {
+    // We can safely use the byte offset FixItStart as the column offset
+    // because the characters up until FixItStart are all ASCII whitespace
+    // characters.
     unsigned FixItStart = 0, FixItEnd = FixItInsertionLine.size();
----------------
Sirraide wrote:

Can you change the type of this to `Bytes` or `Columns` too? It’s not clear to me at a glance which one it’s supposed to be

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


More information about the cfe-commits mailing list