NoQ added a comment. When you're doing something but it isn't working, i encourage you to investigate it more pro-actively, or at least add a FIXME so that people didn't think that this is the intended behavior.
================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2232 + + memsetAux(Mem, Zero, Size, C, State); +} ---------------- This `Zero` is of the wrong type: it is `size_t` but it should be `int`. You'll need to make a new one. ================ Comment at: test/Analysis/string.c:1399 + bzero(str, 2); + clang_analyzer_eval(strlen(str) == 0); // expected-warning{{UNKNOWN}} +} ---------------- I suspect that the reason why this didn't work is that you forgot `.addTransition()`. Could you also test that `bzero(str + 2, 2);` doesn't turn `strlen(str)` into zero? ================ Comment at: test/Analysis/string.c:1413-1414 + + clang_analyzer_eval(strlen(passwd) == 0); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(passwd[0] == '\0'); // expected-warning{{UNKNOWN}} +} ---------------- Probably same `.addTransition()` problem here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits