[PATCH] D40325: add new check to find OSSpinlock usage

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 11:29:31 PST 2017


hokein added a comment.

The implementation looks good, I will let Ben to do the Object-C specific review since he probably knows more about it.



================
Comment at: clang-tidy/objc/AvoidSpinlockCheck.cpp:35
+  diag(MatchedExpr->getLocStart(),
+       "OSSpinlock is deprecated on iOS. Please use other locks or dispatch "
+       "queue.");
----------------
nit: clang-tidy message is not a complete message, please follow the rule.

The `OSSpinlock` is also deprecated on macOS, I think? from https://developer.apple.com/documentation/os/1646466-os_unfair_lock_lock.


https://reviews.llvm.org/D40325





More information about the cfe-commits mailing list