[clang-tidy] `performance-for-range-copy` not reported with non-const/const overloaded member call
Open
clang-tidy
enhancement
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```cpp
#include
#include
struct S
{
int get() const;
int get(); // disable for warning to appear
};
std::map func();
void f()
{
const std::map m = func();
for (auto p : m) // const ref
{
if (p.second.get()) {}
}
}
```
https://godbolt.org/z/3rMWfnaKq
Contributor guide
Assessment
This issue has not been assessed yet.