diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | 06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /test/Analysis/malloc-protoype.c | |
parent | 30d791273d07fac9c0c1641a0731191bca6e8606 (diff) |
Notes
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 000000000000..f056f0f2855d --- /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); +} |