Issue 164933
Summary [clang] Diagnostic message are incorrectly wrapped if colors are enabled
Labels clang:diagnostics
Assignees
Reporter tbaederr
    Because `OS.tell()` doesn't know about colors so the control characters count into the length as well, which means in

https://github.com/llvm/llvm-project/blob/57ccb4624f7a8329567ec5a02962815f5617e3f1/clang/lib/Frontend/TextDiagnostic.cpp#L665-L680

we calculate the value for `CurrentColumn` incorrectly. On my terminal `$COLUMNS` is currently 120 (and llvm figures that out correctly), but the diagnostic message is wrapped even though it would fit in to the previous line just fine (as proven by passing `-fmessage-length=130`:

<img width="1732" height="786" alt="Image" src="" />


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to