If there's memset(x, y, 0) in the code it's most likely a mistake. The
checker suggests a fix-it to swap 'y' and '0'.
I think this has the potential to be promoted into a general clang warning
after some testing in clang-tidy.
Differential D4535
[clang-tidy] Add a checker for zero-length memset. bkramer on Jul 16 2014, 6:29 AM. Authored by
Details If there's memset(x, y, 0) in the code it's most likely a mistake. The I think this has the potential to be promoted into a general clang warning
Diff Detail Event Timeline
Comment Actions Other standard functions may suffer from the same problem, e.g. memchr. I think, it makes sense to handle all of them in the same check.
Comment Actions
|
The sentence doesn't really parse. How about:
This is most likely unintended and the length and value arguments are swapped.