erichkeane added inline comments.
================
Comment at: clang/lib/Basic/Diagnostic.cpp:837
+          llvm::sys::unicode::isFormatting(CodepointValue)) {
+        OutStr.append(CodepointBegin, CodepointEnd);
+        continue;
----------------
cor3ntin wrote:
> cor3ntin wrote:
> > erichkeane wrote:
> > > What about...?
> > I doesn't seem much better but sure, I can do that
> actually, you would need something like
> `OutStream.write(reinterpret_cast<const char*>(CodepointBegin), 
> std::distance(CodepointBegin, CodepointEnd));`
> 
> Unless you insist, I'd rather not change it.
I just see value in having ALL accesses of the string be done 'the same' vs 
counting on it being unbuffered, which makes it harder to read.  And I think 
the 'stream' versions of the other uses below are a vast improvement that makes 
this touch of ugliness perhaps worth it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108469/new/

https://reviews.llvm.org/D108469

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

Reply via email to