[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 18 13:22:24 PDT 2018


xbolva00 added a comment.

Second thought, I don't think we should recommend std::size here (maybe it should be okay for clang static analyzers)

uint32_t data[] = {10, 20, 30, 40};
len = sizeof(data)/sizeof(*data); // "warn" on valid code to recommend std::size? I dont agree with such behaviour.

@rsmith?


https://reviews.llvm.org/D52949





More information about the cfe-commits mailing list