Open SwuduSusuwu opened 3 weeks ago
@llvm/issue-subscribers-clang-tidy
Author: None (SwuduSusuwu)
Pure virtual classes cannot have constructors.
As far as I understand, they can, but since the base class cannot be directly instantiated the constructors cannot be used by clients of the code. However, not defining them can lead to issues with move semantics if the pure virtual base class has any members for which moving is desirable. Small Godbolt illustrating possible issue: https://godbolt.org/z/TseTsTc35
Pure virtual functions cannot have constructors, thus
clang-tidy
should not warn that a pure virtual destructor has no constructor to go along.