================
@@ -0,0 +1,23 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core
-analyzer-checker=unix.cstring -analyzer-checker=alpha.unix.cstring
-analyzer-checker=debug.ExprInspection -verify %s
+
+
+typedef __SIZE_TYPE__ size_t;
+
+void *memset_explicit(void *s, int c, size_t n);
+void clang_analyzer_eval(int);
+
+void test_memset_explicit_null(void) {
+ char *p = 0;
+ memset_explicit(p, 0, 10); // expected-warning{{Null pointer passed as 1st
argument to memory set function}}
----------------
anondeveg wrote:
should i test what memset tests already covers? from my understanding
memset_explicit uses inline_memset under the hood, so memset tests should be
also covering memset_explicit?
https://github.com/llvm/llvm-project/pull/219701
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits