forked from OSchip/llvm-project
Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.
llvm-svn: 66139
This commit is contained in:
parent
77a3cb2dfa
commit
2b24f306df
|
@ -99,3 +99,20 @@ CFAbsoluteTime f4() {
|
|||
return t;
|
||||
}
|
||||
|
||||
// Test that assigning to an self.ivar loses track of an object.
|
||||
// This is a temporary hack to reduce false positives.
|
||||
@interface Test3 : NSObject {
|
||||
id myObj;
|
||||
}
|
||||
- (void)test_self_assign_ivar;
|
||||
@end
|
||||
|
||||
@implementation Test3
|
||||
- (void)test_self_assign_ivar {
|
||||
CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
|
||||
CFDateRef date = CFDateCreate(0, t); // no-warning
|
||||
myObj = (id) date;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue