blob: c870e0a0fed06bf0c655748aa462f43d0374f94b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// RUN: %check_clang_tidy %s darwin-avoid-spinlock %t
typedef int OSSpinLock;
@implementation Foo
- (void)f {
int i = 1;
OSSpinlockLock(&i);
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock [darwin-avoid-spinlock]
OSSpinlockTry(&i);
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock [darwin-avoid-spinlock]
OSSpinlockUnlock(&i);
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock [darwin-avoid-spinlock]
}
@end
|