mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 22:08:57 -04:00

A checker for detecting leaks resulting from allocating temporary autoreleasing objects before starting the main run loop. Checks for two antipatterns: 1. ObjCMessageExpr followed by [[NARunLoop mainRunLoop] run] in the same autorelease pool. 2. ObjCMessageExpr followed by [[NARunLoop mainRunLoop] run] in no autorelease pool. Happens-before relationship is modeled purely syntactically. rdar://39299145 Differential Revision: https://reviews.llvm.org/D49528 llvm-svn: 337876
40 lines
780 B
Objective-C
40 lines
780 B
Objective-C
#pragma clang system_header
|
|
|
|
#define nil ((id)0)
|
|
|
|
typedef signed char BOOL;
|
|
@protocol NSObject
|
|
- (BOOL)isEqual:(id)object;
|
|
- (Class)class;
|
|
@end
|
|
|
|
@interface NSObject <NSObject> {}
|
|
+ (instancetype)alloc;
|
|
- (void)dealloc;
|
|
- (id)init;
|
|
- (id)retain;
|
|
- (oneway void)release;
|
|
@end
|
|
|
|
@interface NSRunLoop : NSObject
|
|
+ (NSRunLoop *)currentRunLoop;
|
|
+ (NSRunLoop *)mainRunLoop;
|
|
- (void) run;
|
|
- (void)cancelPerformSelectorsWithTarget:(id)target;
|
|
@end
|
|
|
|
@interface NSNotificationCenter : NSObject
|
|
+ (NSNotificationCenter *)defaultCenter;
|
|
- (void)removeObserver:(id)observer;
|
|
@end
|
|
|
|
typedef struct objc_selector *SEL;
|
|
|
|
void _Block_release(const void *aBlock);
|
|
#define Block_release(...) _Block_release((const void *)(__VA_ARGS__))
|
|
|
|
@interface CIFilter : NSObject
|
|
@end
|
|
|
|
extern void xpc_main(void);
|