1 // RUN: %clang_analyze_cc1 %s -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify
3 // This test is checking behavior when a single checker runs only with the core
4 // checkers, testing that the traversal order in the CFG does not affect the
5 // reporting of an error.
7 #import "Inputs/system-header-simulator-objc.h"
9 void testDoubleRelease(BOOL z) {
10 id x = [[NSObject alloc] init];
16 [x release]; // expected-warning {{Reference-counted object is used after it is released}}
19 void testDoubleRelease2(BOOL z) {
20 id x = [[NSObject alloc] init];
26 [x release]; // expected-warning {{Reference-counted object is used after it is released}}