[PATCH] D33765: Show correct column nr. when multi-byte utf8 chars are used.
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 26 15:13:51 PDT 2017
efriedma added a comment.
I didn't really search for it before, but it looks like LLVM already has a routine for computing column widths? See llvm::sys::unicode::columnWidthUTF8.
There are some tools which parse clang diagnostic output; we might need a flag to control this. Not sure who would know about that?
Comment at: lib/Basic/SourceManager.cpp:1501
+ unsigned ColNo = getColumnNumber(LocInfo.first, LocInfo.second, &Invalid,
Instead of adding a parameter to getColumnNumber, it would probably make sense to just make this caller correct the column number afterwards.
More information about the cfe-commits