brintos

brintos / llvm-project-archived public Read only

0
0
Text · 856 B · db3c0c5 Raw
25 lines · plain
1// RUN: %clang_cc1  -fsyntax-only  -triple x86_64-apple-darwin10 -verify %s2 3@interface NSObject4+ (void)initialize; // expected-note 2 {{method 'initialize' declared here}}5@end6 7@interface I : NSObject 8+ (void)initialize; // expected-note {{method 'initialize' declared here}}9+ (void)SomeRandomMethod;10@end11 12@implementation I13- (void) Meth { 14  [I initialize];     // expected-warning {{explicit call to +initialize results in duplicate call to +initialize}} 15  [NSObject initialize]; // expected-warning {{explicit call to +initialize results in duplicate call to +initialize}}16}17+ (void)initialize {18  [super initialize];19}20+ (void)SomeRandomMethod { // expected-note {{method 'SomeRandomMethod' declared here}}21  [super initialize]; // expected-warning {{explicit call to [super initialize] should only be in implementation of +initialize}}22}23@end24 25