diff options
Diffstat (limited to 'test/Analysis/malloc-protoype.c')
-rw-r--r-- | test/Analysis/malloc-protoype.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/malloc-protoype.c b/test/Analysis/malloc-protoype.c new file mode 100644 index 0000000..f056f0f --- /dev/null +++ b/test/Analysis/malloc-protoype.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -w -analyze -analyzer-checker=core,unix.Malloc -verify %s +// expected-no-diagnostics + +// Test that strange prototypes doesn't crash the analyzer + +void malloc(int i); +void valloc(int i); + +void test1() +{ + malloc(1); +} + +void test2() +{ + valloc(1); +} |