[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.
Reka Kovacs via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 3 08:07:14 PDT 2017
rnkovacs added a comment.
In https://reviews.llvm.org/D32700#743178, @malcolm.parsons wrote:
> Can you change this to match any pointer to a class with a virtual function?
Well, I have just found a clang flag `-Wdynamic-class-memaccess` <https://clang.llvm.org/docs/DiagnosticsReference.html#wdynamic-class-memaccess> that finds all of these cases and is enabled by default. I guess I need to drop the `this` case entirely.
> I'd also like a warning for a pointer to a class with a constructor or destructor.
This is a nice idea, I'll do it.
https://reviews.llvm.org/D32700
More information about the cfe-commits
mailing list