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
Showing
- include/clang/Parse/Parser.h 1 addition, 2 deletionsinclude/clang/Parse/Parser.h
- include/clang/Sema/Sema.h 2 additions, 6 deletionsinclude/clang/Sema/Sema.h
- lib/Parse/ParseObjc.cpp 4 additions, 9 deletionslib/Parse/ParseObjc.cpp
- lib/Sema/SemaCodeComplete.cpp 2 additions, 32 deletionslib/Sema/SemaCodeComplete.cpp
- lib/Sema/SemaDeclObjC.cpp 5 additions, 8 deletionslib/Sema/SemaDeclObjC.cpp
- test/Index/annotate-tokens.m 40 additions, 11 deletionstest/Index/annotate-tokens.m
- test/Index/usrs.m 2 additions, 2 deletionstest/Index/usrs.m
Loading
Please register or sign in to comment