]> granicus.if.org Git - clang/commitdiff
Add another analyzer test case involving an OSAtomic function.
authorTed Kremenek <kremenek@apple.com>
Wed, 29 Jul 2009 18:18:25 +0000 (18:18 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 29 Jul 2009 18:18:25 +0000 (18:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77485 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/NSString.m

index edaa4b3865150471c0eb784e6bb9366d01298a1c..594508cded1bd5a5ed59b2273392d6e65a77dd90 100644 (file)
@@ -286,6 +286,12 @@ void testOSCompareAndSwap32Barrier() {
     [old release];
 }
 
+int testOSCompareAndSwap32Barrier_id(Class myclass, id xclass) {
+  if (OSAtomicCompareAndSwap32Barrier(0, (int32_t) myclass, (int32_t*) &xclass))
+    return 1;
+  return 0;
+}  
+
 void test_objc_atomicCompareAndSwap() {
   NSString *old = 0;
   NSString *s = [[NSString alloc] init]; // no-warning