forked from OSchip/llvm-project
Add test case for <rdar://problem/6829164>, which was implicitly fixed in r79694.
llvm-svn: 82495
This commit is contained in:
parent
71848a3ff1
commit
fd68c7bdc0
|
@ -610,3 +610,25 @@ void test_offsetof_4() {
|
||||||
*p = 0xDEADBEEF; // expected-warning{{Dereference of null pointer}}
|
*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
|
||||||
|
|
Loading…
Reference in New Issue