brintos

brintos / llvm-project-archived public Read only

0
0
Text · 379 B · 7794077 Raw
13 lines · plain
1// RUN: %check_clang_tidy %s objc-avoid-nserror-init %t2@interface NSError3+ (instancetype)alloc;4- (instancetype)init;5@end6 7@implementation foo8- (void)bar {9    NSError *error = [[NSError alloc] init];10    // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: use errorWithDomain:code:userInfo: or initWithDomain:code:userInfo: to create a new NSError [objc-avoid-nserror-init]11}12@end13