]> granicus.if.org Git - clang/commitdiff
Make sure the source location for @property points the the @-sign (not the decl spec).
authorSteve Naroff <snaroff@apple.com>
Thu, 22 May 2008 23:24:08 +0000 (23:24 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 22 May 2008 23:24:08 +0000 (23:24 +0000)
Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51450 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseObjc.cpp
lib/Sema/SemaDeclObjC.cpp

index 4795a464f5490c588afae7d58b51626de46bcbf4..6a07503737b69a2e0c26d20571d69f1ddb7ad916 100644 (file)
@@ -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);
index a0fa6ecb2bc2a5b4295bc306439ead541443fcf2..efef3fc1bee00b79a7904ada19416b7c103c745c 100644 (file)
@@ -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(),