2 Commits

Author SHA1 Message Date
Congcong Cai
b7914dffd6
[clang-tidy] add default error message for performance-avoid-endl (#107867)
use std::endl as default message when matched expr does not have valid
source text

Fixes: #107859
2024-09-14 07:33:06 +08:00
AMS21
cd893308b5 [clang-tidy] Add performance-avoid-endl check
This check flags uses of `std::endl` on streams and suggests using the newline character `'\n'` instead. `std::endl` performs two operations: it writes a newline character to the output stream and then flushes the stream buffer, which can be less efficient than writing a single newline character using `'\n'`.

This fixes llvm#35321

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D148318
2023-04-22 10:50:51 +00:00