Why so? isn’t Qt will do some kind of == for a member function to get a signal address and if it’s a virtual function it’s undefined behavior? Why is the approach kept in clazy?
The commit message linked on that page lays it out more clearly, it does look like that’s the case:
The reason has to do with how MSVC implements pointers to virtual
function members: they are “regular” function pointers to a DLL-local
stub that implements the virtual call. For that reason, a connect()
happening in client code would generate a pointer for the signal that doesn’t compare equal to the same pointer generated from inside KDDW;
and moc-generated code relies on this comparison to find the index of
the signal.
To sum up: we have mentioned that virtual signal is not how it suppose to work, there is a separate check that literally says it, but at the same time there is a workaround to shut up clazy when it sees such thing Ok ok, that really makes sense