[PATCH] D40325: add new check to find OSSpinlock usage
Ben Hamilton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 27 11:32:42 PST 2017
benhamilton accepted this revision.
benhamilton added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tidy/objc/AvoidSpinlockCheck.cpp:31-32
+ diag(MatchedExpr->getLocStart(),
+ "deprecated usage of OSSpinlock; Please use other locks or dispatch "
+ "queue");
+}
----------------
Please fix hokein@'s comment — this should be a full sentence. Try this:
Use os_unfair_lock_lock() or dispatch queue APIs instead of the deprecated OSSpinLock().
================
Comment at: clang-tidy/objc/AvoidSpinlockCheck.h:19
+
+/// Finds usages of OSSpinlock in Objective-C files, which is deprecated due to
+/// potential livelock problems.
----------------
Remove "in Objective-C files".
================
Comment at: docs/ReleaseNotes.rst:63
+
+ Add new check to detect the use of OSSpinlock in Objective-C files.
+
----------------
Remove "in Objective-C files".
================
Comment at: docs/clang-tidy/checks/objc-avoid-spinlock.rst:6
+
+Finds usages of OSSpinlock in Objective-C files, which is deprecated due to potential
+livelock problems.
----------------
Remove "in Objective-C files".
https://reviews.llvm.org/D40325
More information about the cfe-commits
mailing list