1 // RUN: %clang_cc1 -Wuninitialized -fsyntax-only -fblocks %s -verify
5 @interface NSObject {} @end
9 + (void)raise:(NSString *)name format:(NSString *)format, ...;
10 + (void)raise:(NSString *)name format:(NSString *)format arguments:(va_list)argList;
14 // Duplicated from uninit-variables.c.
15 // Test just to ensure the analysis is working.
17 int x; // expected-note{{initialize the variable 'x' to silence this warning}}
18 return x; // expected-warning{{variable 'x' is uninitialized when used here}}
21 // Test ObjC fast enumeration.
24 for (id obj in collection) {
25 if (0 == obj) // no-warning
33 for (obj in collection) { // no-warning
34 if (0 == obj) // no-warning
39 int test_abort_on_exceptions(int y, NSException *e, NSString *s, int *z, ...) {
40 int x; // expected-note {{initialize the variable 'x' to silence this warning}}
44 [NSException raise:@"Blah" format:@"Blah %@" arguments:alist];
48 [NSException raise:@"Blah" format:s];
55 return x; // expected-warning {{variable 'x' is uninitialized when used here}}