[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 12:53:05 PST 2017


benhamilton added inline comments.


================
Comment at: test/clang-tidy/objc-avoid-spinlock.m:4
+typedef int OSSpinLock;
+void OSSpinlockTry(OSSpinLock *__lock) {}
+
----------------
Wizard wrote:
> benhamilton wrote:
> > Not sure why you declared (and defined?) this one but not the others.
> > 
> > Either declare them all (no definition needed) or don't..
> > 
> Oh I added this when I tested the first method since I thought it is needed. But looks like I don't have to. Removed it.
It probably raises a compiler warning since the function isn't declared, but that does not cause the test to fail.


https://reviews.llvm.org/D40325





More information about the cfe-commits mailing list