xazax.hun added inline comments.
================ Comment at: clang-tidy/misc/SuspiciousMemsetUsageCheck.cpp:21 +void SuspiciousMemsetUsageCheck::registerMatchers(MatchFinder *Finder) { + const auto HasCtorOrDtor = + eachOf(hasMethod(cxxConstructorDecl(unless(anyOf( ---------------- I think this might not be the best approach. For example, if the constructor is compiler generated, but there is a member of the class with non-trivial constructor, we still want to warn. E.g.: ``` struct X { X() { /* something nontrivial */ } }; struct Y { X x; }; ``` Maybe we should check instead whether the class is a POD? Other alternative might be something like `CXXRecordDecl::hasNonTrivialDefaultConstructor`. https://reviews.llvm.org/D32700 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits