diff options
Diffstat (limited to 'clang/test/Analysis/malloc-protoype.c')
| -rw-r--r-- | clang/test/Analysis/malloc-protoype.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Analysis/malloc-protoype.c b/clang/test/Analysis/malloc-protoype.c new file mode 100644 index 00000000000..f056f0f2855 --- /dev/null +++ b/clang/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); +} |

