1 // RUN: %clang_analyze_cc1 -fexceptions -fobjc-exceptions -fcxx-exceptions -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s
3 void clang_analyzer_checkInlined(bool);
5 typedef typeof(sizeof(int)) size_t;
12 clang_analyzer_checkInlined(true); // expected-warning{{TRUE}}
13 @throw getException();
17 int a; // uninitialized
18 void *mem = malloc(4); // no-warning (ObjC exceptions are usually fatal)
21 return a; // no-warning
26 clang_analyzer_checkInlined(true); // expected-warning{{TRUE}}
31 int a; // uninitialized
32 // FIXME: this should be reported as a leak, because C++ exceptions are
34 void *mem = malloc(4);
37 return a; // no-warning