[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check
Gabor Bencze via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 13 13:24:44 PST 2020
gbencze added a comment.
Another option that came to my mind is using a BitVector to (recursively) flag bits that are occupied by the fields. This solution would be slightly slower and uses more memory but is probably a lot easier to understand, maintain and more robust than the currently proposed implementation. This would also catch a few additional cases as it could also look inside unions.
I stared to experiment with an implementation of this here <https://github.com/gaborbencze/llvm-project/commit/689bba792b5699444674a1cadc0e235b668b2970#diff-b476912022a94429d868e13a139cf406>.
Which direction do you think would be a better solution?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71973/new/
https://reviews.llvm.org/D71973
More information about the cfe-commits
mailing list