diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 17:34:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 17:34:17 +0000 |
commit | 87e927520df00373b3bef94040da3b62bbf45a39 (patch) | |
tree | d828cedadb9053faf0727044215e04886d609b3a /clang/test/Index/usrs.m | |
parent | be57ab185f289c5a2e9f07e9a6ab6ca70bfbc5be (diff) | |
download | bcm5719-llvm-87e927520df00373b3bef94040da3b62bbf45a39.tar.gz bcm5719-llvm-87e927520df00373b3bef94040da3b62bbf45a39.zip |
Fix a major inconsistency in the representation of Objective-C
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.
With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.
Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.
llvm-svn: 122347
Diffstat (limited to 'clang/test/Index/usrs.m')
-rw-r--r-- | clang/test/Index/usrs.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Index/usrs.m b/clang/test/Index/usrs.m index 2d41c47f9c2..f34cc1e87bf 100644 --- a/clang/test/Index/usrs.m +++ b/clang/test/Index/usrs.m @@ -95,9 +95,9 @@ int test_multi_declaration(void) { // CHECK: usrs.m c:objc(cs)Foo Extent=[25:1 - 32:5] // CHECK: usrs.m c:objc(cs)Foo@x Extent=[26:6 - 26:7] // CHECK: usrs.m c:objc(cs)Foo@y Extent=[27:6 - 27:7] -// CHECK: usrs.m c:objc(cs)Foo(py)d1 Extent=[31:1 - 31:17] // CHECK: usrs.m c:objc(cs)Foo(im)godzilla Extent=[29:1 - 29:17] // CHECK: usrs.m c:objc(cs)Foo(cm)kingkong Extent=[30:1 - 30:17] +// CHECK: usrs.m c:objc(cs)Foo(py)d1 Extent=[31:1 - 31:17] // CHECK: usrs.m c:objc(cs)Foo(im)d1 Extent=[31:15 - 31:17] // CHECK: usrs.m c:objc(cs)Foo(im)setD1: Extent=[31:15 - 31:17] // CHECK: usrs.m c:usrs.m@352objc(cs)Foo(im)setD1:@d1 Extent=[31:15 - 31:17] @@ -160,11 +160,11 @@ int test_multi_declaration(void) { // CHECK-source: usrs.m:26:3: TypeRef=id:0:0 Extent=[26:3 - 26:5] // CHECK-source: usrs.m:27:6: ObjCIvarDecl=y:27:6 (Definition) Extent=[27:6 - 27:7] // CHECK-source: usrs.m:27:3: TypeRef=id:0:0 Extent=[27:3 - 27:5] -// CHECK-source: usrs.m:31:15: ObjCPropertyDecl=d1:31:15 Extent=[31:1 - 31:17] // CHECK-source: usrs.m:29:1: ObjCInstanceMethodDecl=godzilla:29:1 Extent=[29:1 - 29:17] // CHECK-source: usrs.m:29:4: TypeRef=id:0:0 Extent=[29:4 - 29:6] // CHECK-source: usrs.m:30:1: ObjCClassMethodDecl=kingkong:30:1 Extent=[30:1 - 30:17] // CHECK-source: usrs.m:30:4: TypeRef=id:0:0 Extent=[30:4 - 30:6] +// CHECK-source: usrs.m:31:15: ObjCPropertyDecl=d1:31:15 Extent=[31:1 - 31:17] // CHECK-source: usrs.m:31:15: ObjCInstanceMethodDecl=d1:31:15 Extent=[31:15 - 31:17] // CHECK-source: usrs.m:31:15: ObjCInstanceMethodDecl=setD1::31:15 Extent=[31:15 - 31:17] // CHECK-source: usrs.m:31:15: ParmDecl=d1:31:15 (Definition) Extent=[31:15 - 31:17] |