alexfh added a comment. Looks like a useful check to have. I'm not sure though, that it has anything to do with "modernize". I'd suggest adding a new "bugprone" module (should be added by http://reviews.llvm.org/D18821, hopefully soon) and moving the check there.
================ Comment at: test/clang-tidy/modernize-explicit-operator-bool-void-pointer.cpp:6 @@ +5,3 @@ + operator const void *() const { + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: implicit operator const void* declaration should probably be explicit operator bool [modernize-explicit-operator-bool] + return reinterpret_cast<void *>(something != 0); ---------------- From the first glance, this doesn't look like an easy mistake to make. Have you actually seen this pattern in real code? ================ Comment at: test/clang-tidy/modernize-explicit-operator-bool-void-pointer.cpp:14 @@ +13,3 @@ +class SomethingGood { + //Note: Use modernize-explicit-operator-bool to check for implicit operator bool. + explicit operator bool() const { ---------------- nit: Please insert a space after // http://reviews.llvm.org/D20857 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits