[cfe-commits] r51450 - in /cfe/trunk/lib: Parse/ParseObjc.cpp Sema/SemaDeclObjC.cpp
Steve Naroff
snaroff at apple.com
Thu May 22 16:24:09 PDT 2008
Author: snaroff
Date: Thu May 22 18:24:08 2008
New Revision: 51450
URL: http://llvm.org/viewvc/llvm-project?rev=51450&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=51450&r1=51449&r2=51450&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Thu May 22 18:24:08 2008
@@ -280,7 +280,7 @@
// 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);
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=51450&r1=51449&r2=51450&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Thu May 22 18:24:08 2008
@@ -878,6 +878,10 @@
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(),
More information about the cfe-commits
mailing list