// RUN: rm -f %t
// RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,unix.Malloc -analyzer-output=plist -verify -o %t -analyzer-config eagerly-assume=false %s
// RUN: tail -n +11 %t | %normalize_plist | diff -ub %S/Inputs/expected-plists/malloc-plist.c.plist -
typedef size_t;
void *;
void ;
void *;
void
void //expected-warning{{Potential leak}}
void
void *
void //expected-warning{{Potential leak}}
// Test what happens when the same call frees and allocated memory.
// Also tests the stack hint for parameters, when they are passed directly or via pointer.
void
void
void *
// Test stack hint for 'reallocation failed'.
char *
void
// Test stack hint when returning a result.
static char *
void //expected-warning{{Potential leak}}
// Passing a block as a parameter to an inlined call for which we generate
// a stack hint message caused crashes.
// rdar://problem/21291971
void
void
// Test that we refer to the last symbol used in the leak diagnostic.
void
// Tests that exercise running remove dead bindings at Call exit.
static void //expected-warning{{Potential leak}}
void
static void
void
static void //expected-warning{{Potential leak}}
void
static void
void
int
static int
void
void
static void
void
static void
void
static char *
void //expected-warning{{Potential memory leak}}
// Test that we do not print the name of a variable not visible from where
// the issue is reported.
int *
void // expected-warning{{Potential memory leak}}
;
int *
void // expected-warning{{Potential memory leak}}