Add another analyzer test case involving an OSAtomic function.

llvm-svn: 77485
This commit is contained in:
Ted Kremenek 2009-07-29 18:18:25 +00:00
parent 87a7a451ad
commit 70b943f206
1 changed files with 6 additions and 0 deletions

View 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