https://bugs.kde.org/show_bug.cgi?id=443343

David Faure <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
         Resolution|INTENTIONAL                 |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from David Faure <[email protected]> ---
(sorry for the delay in my reply)

But that's an explicit operator=, the developer thought about it and decided
=default would do the job.

If operator= is actually implemented, clazy will be silent, even if the
implementation is nonsense or empty or insufficient.... E.g. Test&
operator=(const Test& o) { return o; } :-)

The current logic is "If there's an implementation, trust that it's OK. If
there's =default, assume it's wrong". This seems very odd to me.

=default *is* an implementation, so it should be treated the same.
Your example shows a case where it's a wrong implementation, indeed, just like
the above is a wrong implementation.

clazy can't detect if the implementation is right or wrong, all it can do is
catch the case where the developer didn't even think about operator=.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to