[clang-tidy][false-negative] `performance-move-const-arg` does not work in function templates
Open
clang-tidy
false-negative
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Demo: https://godbolt.org/z/bEKdE6Gxs
You'll notice that only the control case was caught.
```
:14:11: warning: std::move of the const variable 'control_case' of the trivially-copyable type 'const int' has no effect; remove std::move() [performance-move-const-arg]
14 | tgt = std::move(control_case);
| ^~~~~~~~~~ ~
1 warning generated.
```
Current trunk: c777c60419080c09d76385568dd00101a76b7c10
Contributor guide
Assessment
This issue has not been assessed yet.