From 0aeaf5a1a55dbc04c633cae4fb8bad2a33b01d62 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 29 Jul 2009 18:18:25 +0000 Subject: [PATCH] Add another analyzer test case involving an OSAtomic function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77485 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/NSString.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m index edaa4b3865..594508cded 100644 --- a/test/Analysis/NSString.m +++ b/test/Analysis/NSString.m @@ -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 -- 2.40.0