llvm / llvm/llvm-project

[clang-tidy] report `performance-prefer-single-char-overloads` for stream insertion

Open
#193,441 2 comments 1 reaction 0 assignees View on GitHub
clang-tidy enhancement
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```cpp
#include

void f(int k, int v)
{
std::cout << k << "-" << v << "\n";
}
```

https://godbolt.org/z/Kdssdfxr6

Using a char instead of a string should be faster (even though there is the probably bogus #65040 by myself).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.