Use paropery's setter attribute name as

the selector for the property setter.

llvm-svn: 66834
This commit is contained in:
Fariborz Jahanian 2009-03-12 22:34:11 +00:00
parent b970d0ca9d
commit 36ce7e17d7
2 changed files with 17 additions and 7 deletions

View File

@ -327,13 +327,13 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
Selector GetterSel =
PP.getSelectorTable().getNullarySelector(SelName);
IdentifierInfo *SetterName = OCDS.getSetterName();
if (!SetterName)
SetterName = FD.D.getIdentifier();
Selector SetterSel =
SelectorTable::constructSetterName(PP.getIdentifierTable(),
PP.getSelectorTable(),
SetterName);
Selector SetterSel;
if (SetterName)
SetterSel = PP.getSelectorTable().getSelector(1, &SetterName);
else
SetterSel = SelectorTable::constructSetterName(PP.getIdentifierTable(),
PP.getSelectorTable(),
FD.D.getIdentifier());
bool isOverridingProperty = false;
DeclTy *Property = Actions.ActOnProperty(CurScope, AtLoc, FD, OCDS,
GetterSel, SetterSel,

View File

@ -0,0 +1,10 @@
// RUN: clang -emit-llvm -triple=i686-apple-darwin8 -o %t %s
// RUN: grep -e "SiSetOtherThings:" %t
@interface A
@property(setter=iSetOtherThings:) int otherThings;
@end
@implementation A
@dynamic otherThings;
@end