diff options
Diffstat (limited to 'clang/test/Analysis/dead-stores.m')
-rw-r--r-- | clang/test/Analysis/dead-stores.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/dead-stores.m b/clang/test/Analysis/dead-stores.m index 765a24a3c35..701e5802b25 100644 --- a/clang/test/Analysis/dead-stores.m +++ b/clang/test/Analysis/dead-stores.m @@ -34,3 +34,10 @@ void DeadStoreTest(NSObject *anObject) { ([keys containsObject:@"name"] && [keys containsObject:@"icon"])) {} } +// This test case was a false positive due to how clang models +// pointer types and ObjC object pointer types differently. Here +// we don't warn about a dead store because 'nil' is assigned to +// an object pointer for the sake of defensive programming. +void rdar_7631278(NSObject *x) { + x = ((void*)0); +} |