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

Hiral via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 21:04:38 PDT 2020


Hiralo added a comment.

Tried using llvm::errs().SetBuffered() within printStats()...

<diff>
static void printStats(const ClangTidyStats &Stats) {
+  llvm::errs().SetBuffered()
</diff>

but still I see below stderr write calls...
...
write(2, "10712", 5)                    = 5
write(2, " warning", 8)                 = 8
write(2, "s", 1)                        = 1
write(2, " generated", 10)              = 10
write(2, ".\n", 2)                      = 2
...
write(2, "Suppressed ", 11)             = 11
write(2, "10703", 5)                    = 5
write(2, " warnings (", 11)             = 11
write(2, "10703", 5)                    = 5
write(2, " in non-user code", 17)       = 17
write(2, ").\n", 3)                     = 3
write(2, "Use -header-filter=.* to display"..., 136) = 136
...

We expect it to emit one write call only!


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