aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-18 22:56:13 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-18 22:56:13 +0000
commit424b2a546dbd09cf70d43087771c7fff851ca158 (patch)
tree5d31614d8091b1bd9ed7e06726df95c502d7d4ff /lib/Parse/ParseObjc.cpp
parent6826314938f8510cd1a6b03b5d032592456ae27b (diff)
Code completion after @dynamic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 305ed16a19..216d9345cb 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1234,7 +1234,7 @@ Parser::DeclPtrTy Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
while (true) {
if (Tok.is(tok::code_completion)) {
- Actions.CodeCompleteObjCPropertySynthesize(CurScope, ObjCImpDecl);
+ Actions.CodeCompleteObjCPropertyDefinition(CurScope, ObjCImpDecl);
ConsumeToken();
}
@@ -1290,11 +1290,18 @@ Parser::DeclPtrTy Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) {
assert(Tok.isObjCAtKeyword(tok::objc_dynamic) &&
"ParseObjCPropertyDynamic(): Expected '@dynamic'");
SourceLocation loc = ConsumeToken(); // consume dynamic
- if (Tok.isNot(tok::identifier)) {
- Diag(Tok, diag::err_expected_ident);
- return DeclPtrTy();
- }
- while (Tok.is(tok::identifier)) {
+ while (true) {
+ if (Tok.is(tok::code_completion)) {
+ Actions.CodeCompleteObjCPropertyDefinition(CurScope, ObjCImpDecl);
+ ConsumeToken();
+ }
+
+ if (Tok.isNot(tok::identifier)) {
+ Diag(Tok, diag::err_expected_ident);
+ SkipUntil(tok::semi);
+ return DeclPtrTy();
+ }
+
IdentifierInfo *propertyId = Tok.getIdentifierInfo();
SourceLocation propertyLoc = ConsumeToken(); // consume property name
Actions.ActOnPropertyImplDecl(atLoc, propertyLoc, false, ObjCImpDecl,