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 at: clang-tidy/google/MemsetZeroLengthCheck.cpp:28
@@ +27,3 @@
+ // Look for memset(x, y, 0) as those is most likely an argument swap. Ignore
+ // literals in the middle argument.
+ Finder->addMatcher(callExpr(callee(functionDecl(hasName("::memset"))),
----------------
> Ignore literals in the middle argument.
Why?
http://reviews.llvm.org/D4535
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits