brintos

brintos / llvm-project-archived public Read only

0
0
Text · 741 B · a149671 Raw
31 lines · plain
1// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,nullability\2// RUN:                       -analyzer-output=text -verify %s3// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,nullability\4// RUN:                       -analyzer-output=text -verify %s -fobjc-arc5 6 7 8#define nil ((id)0)9 10@interface Param11@end12 13@interface Base14- (void)foo:(Param *_Nonnull)param;15@end16 17@interface Derived : Base18@end19 20@implementation Derived21- (void)foo:(Param *)param {22  // FIXME: Why do we not emit the warning under ARC?23  [super foo:param];24 25  [self foo:nil];26  // expected-warning@-1{{nil passed to a callee that requires a non-null 1st parameter}}27  // expected-note@-2   {{nil passed to a callee that requires a non-null 1st parameter}}28}29@end30 31