aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-04-18 00:19:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-04-18 00:19:30 +0000
commitf624f8186d8fe474350051c6d3f00b2c204fbeae (patch)
tree91f529481eb942df1983824f7c9e5f33468b7f2f /lib/Parse/ParseObjc.cpp
parent962d326db09feb0949662bbbd3b2515b4320afb1 (diff)
Initial work for property implementation declarations.
Mostly semantic checking in this patch. This is on going and incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index ec40e36479..ede0edb354 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1031,13 +1031,15 @@ Parser::DeclTy *Parser::ParseObjCAtAliasDeclaration(SourceLocation atLoc) {
Parser::DeclTy *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
assert(Tok.isObjCAtKeyword(tok::objc_synthesize) &&
"ParseObjCPropertyDynamic(): Expected '@synthesize'");
- SourceLocation loc = ConsumeToken(); // consume dynamic
+ SourceLocation loc = ConsumeToken(); // consume synthesize
if (Tok.isNot(tok::identifier)) {
Diag(Tok, diag::err_expected_ident);
return 0;
}
while (Tok.is(tok::identifier)) {
- ConsumeToken(); // consume property name
+ IdentifierInfo *propertyIvar = 0;
+ IdentifierInfo *propertyId = Tok.getIdentifierInfo();
+ SourceLocation propertyLoc = ConsumeToken(); // consume property name
if (Tok.is(tok::equal)) {
// property '=' ivar-name
ConsumeToken(); // consume '='
@@ -1045,8 +1047,11 @@ Parser::DeclTy *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
Diag(Tok, diag::err_expected_ident);
break;
}
+ propertyIvar = Tok.getIdentifierInfo();
ConsumeToken(); // consume ivar-name
}
+ Actions.ActOnPropertyImplDecl(atLoc, propertyLoc, true, ObjCImpDecl,
+ propertyId, propertyIvar);
if (Tok.isNot(tok::comma))
break;
ConsumeToken(); // consume ','