xref: /llvm-project/clang/test/Analysis/malloc-protoype.c (revision 1ea584377e7897f7df5302ed9cd378d17be14fbf)
1 // RUN: %clang_analyze_cc1 -w -analyzer-checker=core,unix.Malloc -verify %s
2 // expected-no-diagnostics
3 
4 // Test that strange prototypes doesn't crash the analyzer
5 
6 void malloc(int i);
7 void valloc(int i);
8 
test1(void)9 void test1(void)
10 {
11   malloc(1);
12 }
13 
test2(void)14 void test2(void)
15 {
16   valloc(1);
17 }
18