diff options
Diffstat (limited to 'test/Analysis/novoidtypecrash.c')
-rw-r--r-- | test/Analysis/novoidtypecrash.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/test/Analysis/novoidtypecrash.c b/test/Analysis/novoidtypecrash.c index c04cfca29b..b19990a279 100644 --- a/test/Analysis/novoidtypecrash.c +++ b/test/Analysis/novoidtypecrash.c @@ -1,8 +1,27 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core %s +x; +y(void **z) { // no-crash + *z = x; + int *w; + y(&w); + *w; +} + a; -b(void **c) { // no-crash - *c = a; - int *d; - b(&d); - *d; +b(*c) {} +e(*c) { + void *d = f(); + b(d); + *c = d; +} +void *g() { + e(&a); + return a; +} +j() { + int h; + char i = g(); + if (i) + for (; h;) + ; } |