[PATCH] D90010: clang-tidy: Reduce number of stderr write calls

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 25 13:31:16 PDT 2020


njames93 added a comment.

Isn't `llvm::errs()` buffered, negating most of the benefit here.
Also using std::string here is bad, its potentially going to allocate and reallocate memory each time it grows.
It would be better off using an `llvm::SmallString` and looking at what could potentially be outputted, I'd suggest you'd want a buffer size of at least 256 bytes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90010



More information about the cfe-commits mailing list