<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/70313>70313</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] extend bugprone-virtual-near-miss to detect minor signature changes
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chrchr-github
</td>
</tr>
</table>
<pre>
It would be nice to get a warning for
~~~c++
#include <string>
struct B {
virtual void f(const std::string& s);
};
struct D : B {
virtual void f(std::string& s);
};
~~~
https://godbolt.org/z/K1jWs73na
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkGP2ywQ_TXjy8gRBtuJDz5kv3yWqv6AnjEQzIpABEO224N_e2U31a56qSohGITee8y8J3N2NhgzQvcC3aWShZaYRrUktaTaOlrKXM1Rv49fCN9i8Rpng8EpgxTRGkKJbzIFFyxeYwJ2AXZe11UBf9nWfgcuXFC-aIMg_suUXLAg_n8-7numVBThC8LxCUJEfLhERXp8RKfxCvykYsiEmTSIM4jzk4r3mIEPIH7rHS8f9Wf6C4I4_1XkX-jXdf1VLET3vMH4BHyyUc_R0yEmC3z6AXz62rx-y0cRZKVHoQcxyMqMTT-cRCNOfVstoxgk649S8pl1bcuEPGnTt2w4aS2GXuvKjZxx0TDes6FrWHvQrBOi74UyPb_2bICWmZt0_uD947ZpVy7nYsYjE42ovJyNz7vRnCsvg63J6XfgfDM-jRuonovN0DLvMuUPGnLk94h8gnUXNN_JBI1zsfcUg6mfk6yDkam-uZy3jGhDRhHeXIgJt7BJKsmgWmSwJlcl-fGP2e2hO6h4Az5tX3ge9T3FV6MI-LS3lYFPe2c_AwAA__-b7Nj_">