NoQ added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:127 void evalMemset(CheckerContext &C, const CallExpr *CE) const; + void evalExplicitBzero(CheckerContext &C, const CallExpr *CE) const; ---------------- I guess let's do just `evalBzero`? ================ 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}} +} ---------------- Let's also add the true statement. I.e., do we know here that the actual length is 2? ================ Comment at: test/Analysis/string.c:1424 + +#ifdef SUPPRESS_OUT_OF_BOUND +void explicit_bzero3_out_ofbound() { ---------------- You can hide `exected-warning`s under `#ifdef`s while leaving the rest of the test intact. Eg., ``` x = 0; y = 1 / x; #ifdef CHECK_DIVIDE_ZERO // expected-warning@-2{{Division by zero}} #endif ``` It would be cool to see how this test performs without suppressing out-of-bound warnings. 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