From: Ted Kremenek Date: Mon, 20 Jul 2009 21:00:55 +0000 (+0000) Subject: Add XFAILED test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=293769a1f281b8994195eb9985b31e1ed0c1c8b3;p=clang Add XFAILED test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76469 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index 862709cc7d..dfae22b37a 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -4,6 +4,7 @@ // RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -analyzer-constraints=range --verify -fblocks %s && // RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s && // RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s +// XFAIL typedef struct objc_selector *SEL; typedef signed char BOOL; @@ -437,3 +438,22 @@ void test_block_cast() { (void (^)(void *))test_block_cast_aux(); // expected-warning{{expression result unused}} } +// ** THIS TEST FAILS ** +// Test comparison of 'id' instance variable to a null void* constant after +// performing an OSAtomicCompareAndSwap32Barrier. +// This previously was a crash in RegionStoreManager. +@interface TestIdNull { + id x; +} +-(int)foo; +@end +@implementation TestIdNull +-(int)foo { + OSAtomicCompareAndSwap32Barrier(0, (signed)2, (signed*)&x); + if (x == (void*) 0) { return 0; } + return 1; +} +@end + + +