33 lines · plain
1// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,nullability -verify %s2 3// expected-no-diagnostics4 5@class C;6 7#pragma clang assume_nonnull begin8@interface I9- foo:(C *)c;10@end11#pragma clang assume_nonnull end12 13@interface J14@property C *c;15@end16 17J *conjure_J(void);18 19@implementation I20- (void)bar {21 if (self) { // no-crash22 J *j = conjure_J();23 if (j.c)24 [self bar];25 // FIXME: Should warn.26 [self foo:j.c]; // no-warning27 }28}29@end30 31@implementation J32@end33