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 | 322328b8a65ad2e45829eb06d245addb64037f6f (patch) | |
tree | 8c29fa7b0aa3f9c85d69912583507e2da5b1900c /lib/Parse/ParseObjc.cpp | |
parent | 19d70731388c4ed84d9270ddc5b1937218dcf572 (diff) |
Code completion for Objective-C @synthesized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 8d6fd209c6..305ed16a19 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/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; |