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,
+                                   /*BytePosition=*/false);
   if (Invalid)
----------------
Instead of adding a parameter to getColumnNumber, it would probably make sense 
to just make this caller correct the column number afterwards.


https://reviews.llvm.org/D33765



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to