<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126515>126515</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`performance-move-const-arg` not detected with ternary
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy,
false-negative
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
firewave
</td>
</tr>
</table>
<pre>
```cpp
#include <string>
void func(const std::string&);
void f(bool b)
{
std::string s;
func(b ? "" : std::move(s));
}
```
https://godbolt.org/z/q8Phdzfea
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUcty4yAQ_JrRhZILBut10MFJVuf9BR4jiS0svICccr5-C9vZpFJFwaGnu-lplZJbNqIRmhdo3iq15zXEcXaR3tWVKh3sbYSWP465XICfAKXbjN8tMZCvKUe3LSB_FYSfrsFZNu-bAexN2FJmKVuQJ5Cn5yS2gAPIl-_zgL0OwTNdIH6CrqA_mSw9WIyxTwfNQE4MEAGRgfxGOYcrAfapCP63697K_Znm8YE150sqHJwApyVYHXw-hLgATh-A09_-92o_ZlKVHaUd5KAqGkUnBzEcZd9W6zhbPtvZiHawfOaibYSaO2HIDp3oFfWVG5Fjw1FwIaXkeOhFp6lDLbTuZKcsHDmdlfMH76_n4l25lHYaBbaNaCqvNPl0rwjReLUtdXb2do_9Coiz8onqjRaVXUmNpck4FrFa70uCI_cu5fQln132VHq9UJxDPKvNUF1WVt87q1VcoOVsC5lZymQyWfbu8soyxU3FW7VHP_7YnMvrrg8mnAGnYvR86ksMf8hkwOkeKgFOz1zXEf8FAAD__7MuwM8">