aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-09 20:36:12 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-09 20:36:12 +0000
commitcfcd7fd0de701c5ce05e96de1ed2d0bf8c7035d9 (patch)
tree09d076f2264ed225907c005b2b0d0b4bb47dfaab /test
parent0d36aa8c23776cde8819ff4d65b1f87507182a9f (diff)
Implement: <rdar://problem/7185647> [RegionStore] 'self' cannot be NULL upon entry to a method
Here we implement this as a precondition within GRExprEngine, even though it is related to how BasicStoreManager and RegionStoreManager model 'self' differently. Putting this as a high-level precondition is more general, which is why it isn't in RegionStore.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/misc-ps.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m
index cbfb5b1d46..34a09536db 100644
--- a/test/Analysis/misc-ps.m
+++ b/test/Analysis/misc-ps.m
@@ -554,3 +554,16 @@ void pr4781(unsigned long *raw1) {
}
}
+// <rdar://problem/7185647> - 'self' should be treated as being non-null
+// upon entry to an objective-c method.
+@interface RDar7185647
+- (id)foo;
+@end
+@implementation RDar7185647
+- (id) foo {
+ if (self)
+ return self;
+ *((int *) 0x0) = 0xDEADBEEF; // no-warning
+ return self;
+}
+@end