martong added a comment. Nice improvement and the tests are meaningful!
> clang/test/Analysis/cstring.c Hadn't we have already a test file for this checker? What about `string.c` and `bstring.c`? You might have added redundant test cases in the new test file. ================ Comment at: clang/test/Analysis/cstring.c:36 + char buffer[32]; + // FIXME: This should work with 'str' instead of 'str1' + const char str1[] = "Hello world"; ---------------- Could you please elaborate why this does not work with `str`? ================ Comment at: clang/test/Analysis/cstring.c:68-69 + char buffer[32]; + const char str1[] = "Hello\0world"; + clang_analyzer_eval(strlen(str1) == 11); // expected-warning {{TRUE}} +} ---------------- I think, this would deserve a FIXME comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130091/new/ https://reviews.llvm.org/D130091 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits