| Issue |
107859
|
| Summary |
[clang-tidy] Broken diagnostic for performance-avoid-endl
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
VReichelt
|
When I run `clang-tidy -checks='-*,performance-avoid-endl'` on the following code
```
#include <iostream>
#define COUT_ENDL std::cout << std::endl
void foo()
{
COUT_ENDL;
}
```
I get the message
```
bug.cc:7:3: warning: do not use '' with streams; use '\n' instead [performance-avoid-endl]
11 | COUT_ENDL;
| ^
bug.cc:3:32: note: expanded from macro 'COUT_ENDL'
7 | #define COUT_ENDL std::cout << std::endl
| ^
```
which is slightly broken (note the empty `''` in the first line).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs