diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-18 22:32:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-18 22:32:06 +0000 |
commit | 5d6498827b4e152fcc18b365700528a7eaed8ff4 (patch) | |
tree | 99eac6d9d7c6d2eec3911747264a5fe23b86065e /clang/lib/Parse/ParseObjc.cpp | |
parent | fff3fb2b355c77ae30c16fb57fe7bf8d18b863f9 (diff) | |
download | bcm5719-llvm-5d6498827b4e152fcc18b365700528a7eaed8ff4.tar.gz bcm5719-llvm-5d6498827b4e152fcc18b365700528a7eaed8ff4.zip |
Code completion for Objective-C @synthesized.
llvm-svn: 89259
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 8d6fd209c61..305ed16a193 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1231,12 +1231,13 @@ Parser::DeclPtrTy Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) { assert(Tok.isObjCAtKeyword(tok::objc_synthesize) && "ParseObjCPropertyDynamic(): Expected '@synthesize'"); SourceLocation loc = ConsumeToken(); // consume synthesize - if (Tok.isNot(tok::identifier)) { - Diag(Tok, diag::err_expected_ident); - return DeclPtrTy(); - } while (true) { + if (Tok.is(tok::code_completion)) { + Actions.CodeCompleteObjCPropertySynthesize(CurScope, ObjCImpDecl); + ConsumeToken(); + } + if (Tok.isNot(tok::identifier)) { Diag(Tok, diag::err_synthesized_property_name); SkipUntil(tok::semi); @@ -1249,6 +1250,13 @@ Parser::DeclPtrTy Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) { if (Tok.is(tok::equal)) { // property '=' ivar-name ConsumeToken(); // consume '=' + + if (Tok.is(tok::code_completion)) { + Actions.CodeCompleteObjCPropertySynthesizeIvar(CurScope, propertyId, + ObjCImpDecl); + ConsumeToken(); + } + if (Tok.isNot(tok::identifier)) { Diag(Tok, diag::err_expected_ident); break; |