Add test case for <rdar://problem/6829164>, which was implicitly fixed in r79694.

llvm-svn: 82495
This commit is contained in:
Ted Kremenek 2009-09-21 23:22:11 +00:00
parent 71848a3ff1
commit fd68c7bdc0
1 changed files with 22 additions and 0 deletions

View File

@ -610,3 +610,25 @@ void test_offsetof_4() {
*p = 0xDEADBEEF; // expected-warning{{Dereference of null pointer}}
}
// <rdar://problem/6829164> "nil receiver" false positive: make tracking
// of the MemRegion for 'self' path-sensitive
@interface RDar6829164 : NSObject {
double x; int y;
}
- (id) init;
@end
id rdar_6829164_1();
double rdar_6829164_2();
@implementation RDar6829164
- (id) init {
if((self = [super init]) != 0) {
id z = rdar_6829164_1();
y = (z != 0);
if (y)
x = rdar_6829164_2();
}
return self;
}
@end