diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-04-18 00:19:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-04-18 00:19:30 +0000 |
commit | ffe97a3925a28cd86fc6d5e93afd93c7fd24fe7c (patch) | |
tree | 5fcc11d97c502ee2dc5856869b2de827cd85cdea /clang/lib/Parse/ParseObjc.cpp | |
parent | be89ba0c38ee10a160c2a9a4f6b8b4f1f3f34d5f (diff) | |
download | bcm5719-llvm-ffe97a3925a28cd86fc6d5e93afd93c7fd24fe7c.tar.gz bcm5719-llvm-ffe97a3925a28cd86fc6d5e93afd93c7fd24fe7c.zip |
Initial work for property implementation declarations.
Mostly semantic checking in this patch. This is on going
and incomplete.
llvm-svn: 49882
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index ec40e364795..ede0edb354a 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/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 ',' |