diff options
author | Steve Naroff <snaroff@apple.com> | 2008-05-22 23:24:08 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-05-22 23:24:08 +0000 |
commit | 4c290c7c0b27c764948baff592ee5370d9c428be (patch) | |
tree | cf38646f70624be533283612020e1fad3313e104 | |
parent | 5477a1583ad0ee76e3c614b1f6c314ad99d74374 (diff) | |
download | bcm5719-llvm-4c290c7c0b27c764948baff592ee5370d9c428be.tar.gz bcm5719-llvm-4c290c7c0b27c764948baff592ee5370d9c428be.zip |
Make sure the source location for @property points the the @-sign (not the decl spec).
Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST.
llvm-svn: 51450
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 4795a464f54..6a07503737b 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -280,7 +280,7 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl, // FIXME. This is not right! : FD.D.getIdentifier()); DeclTy *Property = Actions.ActOnProperty(CurScope, - DS.getSourceRange().getBegin(), FD, OCDS, + AtLoc, FD, OCDS, GetterSel, SetterSel, MethodImplKind); allProperties.push_back(Property); diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index a0fa6ecb2bc..efef3fc1bee 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -878,6 +878,10 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl, MergeProtocolPropertiesIntoClass(I, I); for (ObjCInterfaceDecl::classprop_iterator P = I->classprop_begin(), E = I->classprop_end(); P != E; ++P) { + // FIXME: It would be really nice if we could avoid this. Injecting + // methods into the interface makes it hard to distinguish "real" methods + // from synthesized "property" methods (that aren't in the source). + // This complicicates the rewriter's life. I->addPropertyMethods(Context, *P, insMethods); } I->addMethods(&insMethods[0], insMethods.size(), |