diff options
Diffstat (limited to 'test/SemaObjC/ibaction.m')
-rw-r--r-- | test/SemaObjC/ibaction.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjC/ibaction.m b/test/SemaObjC/ibaction.m new file mode 100644 index 0000000..b97e002 --- /dev/null +++ b/test/SemaObjC/ibaction.m @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -verify + +@interface Foo +{ + __attribute__((iboutlet)) id myoutlet; +} +- (void) __attribute__((ibaction)) myMessage:(id)msg; +@end + +@implementation Foo +// Normally attributes should not be attached to method definitions, but +// we allow 'ibaction' to be attached because it can be expanded from +// the IBAction macro. +- (void) __attribute__((ibaction)) myMessage:(id)msg {} // no-warning +@end |