Debian Codegraph @

llvm-project/clang-tools-extra/docs/clang-tidy/checks/misc/unconventional-assign-operator.rst

raw
1 .. title:: clang-tidy - misc-unconventional-assign-operator
2
3 misc-unconventional-assign-operator
4 ===================================
5
6
7 Finds declarations of assign operators with the wrong return and/or argument
8 types and definitions with good return type but wrong ``return`` statements.
9
10 * The return type must be ``Class&``.
11 * The assignment may be from the class type by value, const lvalue
12 reference, non-const rvalue reference, or from a completely different
13 type (e.g. ``int``).
14 * Private and deleted operators are ignored.
15 * The operator must always return ``*this``.