blob: f9f05cb05a286f4f1e7f23b53148c4d8a2fd6391 [file] [log] [blame]
// RUN: %check_clang_tidy %s objc-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 [objc-avoid-spinlock]
OSSpinlockTry(&i);
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock [objc-avoid-spinlock]
OSSpinlockUnlock(&i);
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock [objc-avoid-spinlock]
}
@end