dblaikie added a comment. +1 for clang-tidy. GCC's closest to this is -Weffc++ which limits the rule of 3 warning to only "classes that have dynamic memory allocation" (though I'm not sure exactly what conditions it uses to decide that - it doesn't warn on anything in the test cases provided in this patch, it does warn if you add a dtor to Clz that deletes buf: rule3.cpp:1:7: warning: ‘class Clz’ has pointer data members [-Weffc++] class Clz // expected-warning {{class implements custom copy assignment operator but missing custom copy constructor}}
^~~ rule3.cpp:1:7: warning: but does not override ‘Clz(const Clz&)’ [-Weffc++] CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68185/new/ https://reviews.llvm.org/D68185 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits