1// RUN: %check_clang_tidy -expect-clang-tidy-error %s bugprone-suspicious-memset-usage %t
2
3void *memset(void *, int, __SIZE_TYPE__);
4void *memset(void *);
5// CHECK-MESSAGES: :[[@LINE-1]]:7: error: conflicting types for 'memset'
6
7void test(void) {
8 // no crash
9 memset(undefine);
10 // CHECK-MESSAGES: :[[@LINE-1]]:10: error: use of undeclared identifier
11}
12

source code of clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memset-usage.c