]> granicus.if.org Git - clang/commit
Fix a major inconsistency in the representation of Objective-C
authorDouglas Gregor <dgregor@apple.com>
Tue, 21 Dec 2010 17:34:17 +0000 (17:34 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 21 Dec 2010 17:34:17 +0000 (17:34 +0000)
commitbdb2d5056fd675c27307b34efd371bbba6839e92
tree3198a99052139ee9f81add1f93941371e300988e
parentfbfd180495e7800975c6d9bdc6d24e706ef70e34
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Parse/ParseObjc.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaDeclObjC.cpp
test/Index/annotate-tokens.m
test/Index/usrs.m