[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

David CARLIER via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 7 03:35:51 PST 2018


devnexen marked an inline comment as done.
devnexen added inline comments.


================
Comment at: test/Analysis/string.c:1405-1406
+  clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}}
+  bzero(str + 2, 2);
+  clang_analyzer_eval(strlen(str) == 0); // expected-warning{{FALSE}}
+}
----------------
NoQ wrote:
> Let's also add the true statement. I.e., do we know here that the actual length is 2?
I think that s the limit of this checker (even with memset that does not work).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54592/new/

https://reviews.llvm.org/D54592





More information about the cfe-commits mailing list