brintos

brintos / llvm-project-archived public Read only

0
0
Text · 730 B · 43c927c Raw
18 lines · plain
1// RUN: %clang_cc1 -verify -Wno-objc-root-class %s2 3@interface Foo 4{5  __attribute__((iboutlet)) id myoutlet;6}7+ (void) __attribute__((ibaction)) myClassMethod:(id)msg; // expected-warning{{'ibaction' attribute only applies to Objective-C instance methods}}8- (void) __attribute__((ibaction)) myMessage:(id)msg;9@end10 11@implementation Foo12+ (void) __attribute__((ibaction)) myClassMethod:(id)msg {} // expected-warning{{'ibaction' attribute only applies to Objective-C instance methods}}13// Normally attributes should not be attached to method definitions, but14// we allow 'ibaction' to be attached because it can be expanded from15// the IBAction macro.16- (void) __attribute__((ibaction)) myMessage:(id)msg {} // no-warning17@end18