summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-18 23:05:16 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-18 23:05:16 +0000
commit66f2d6ba7b1085d78581a8b378e4edbe8b74fedb (patch)
tree46654c6db4fbb6fb9619e0342663298d5ff6741d /clang/test
parente21102523a47ea70503529bf75a2c526df7fb377 (diff)
downloadbcm5719-llvm-66f2d6ba7b1085d78581a8b378e4edbe8b74fedb.tar.gz
bcm5719-llvm-66f2d6ba7b1085d78581a8b378e4edbe8b74fedb.zip
Allow GNU attributes to appear in an Objective-C method declaration
before the selector name (but after the return type). Among other things, this allows IBAction to be implemented with an attribute. llvm-svn: 96623
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/c-index-api-loadTU-test.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Index/c-index-api-loadTU-test.m b/clang/test/Index/c-index-api-loadTU-test.m
index 85cfac37bef..5b2f86e543b 100644
--- a/clang/test/Index/c-index-api-loadTU-test.m
+++ b/clang/test/Index/c-index-api-loadTU-test.m
@@ -5,7 +5,7 @@
{
__attribute__((iboutlet)) id myoutlet;
}
-
+- (void) __attribute__((ibaction)) myMessage:(id)msg;
- foo;
+ fooC;
@@ -58,6 +58,10 @@ int main (int argc, const char * argv[]) {
// CHECK: c-index-api-loadTU-test.m:6:32: ObjCIvarDecl=myoutlet:6:32 (Definition) Extent=[6:32 - 6:40]
// CHECK: c-index-api-loadTU-test.m:6:32: attribute(iboutlet)= Extent=[6:32 - 6:40]
// CHECK: c-index-api-loadTU-test.m:6:29: TypeRef=id:0:0 Extent=[6:29 - 6:31]
+// CHECK: c-index-api-loadTU-test.m:8:1: ObjCInstanceMethodDecl=myMessage::8:1 Extent=[8:1 - 8:54]
+// CHECK: c-index-api-loadTU-test.m:8:1: attribute(ibaction)= Extent=[8:1 - 8:54]
+// CHECK: c-index-api-loadTU-test.m:8:50: ParmDecl=msg:8:50 (Definition) Extent=[8:47 - 8:53]
+// CHECK: c-index-api-loadTU-test.m:8:47: TypeRef=id:0:0 Extent=[8:47 - 8:49]
// CHECK: c-index-api-loadTU-test.m:9:1: ObjCInstanceMethodDecl=foo:9:1 Extent=[9:1 - 9:7]
// CHECK: c-index-api-loadTU-test.m:10:1: ObjCClassMethodDecl=fooC:10:1 Extent=[10:1 - 10:8]
// CHECK: c-index-api-loadTU-test.m:14:12: ObjCInterfaceDecl=Bar:14:12 Extent=[14:1 - 18:5]
OpenPOWER on IntegriCloud