aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Parse/ParseObjc.cpp19
-rw-r--r--lib/Sema/Sema.h2
-rw-r--r--lib/Sema/SemaCodeComplete.cpp2
3 files changed, 15 insertions, 8 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,
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index a4ff26669e..2c50b88ddc 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -3661,7 +3661,7 @@ public:
IdentifierInfo *ClassName);
virtual void CodeCompleteObjCImplementationCategory(Scope *S,
IdentifierInfo *ClassName);
- virtual void CodeCompleteObjCPropertySynthesize(Scope *S,
+ virtual void CodeCompleteObjCPropertyDefinition(Scope *S,
DeclPtrTy ObjCImpDecl);
virtual void CodeCompleteObjCPropertySynthesizeIvar(Scope *S,
IdentifierInfo *PropertyName,
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 0090e24a0f..6ba0591dd0 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -2026,7 +2026,7 @@ void Sema::CodeCompleteObjCImplementationCategory(Scope *S,
HandleCodeCompleteResults(this, CodeCompleter, Results.data(),Results.size());
}
-void Sema::CodeCompleteObjCPropertySynthesize(Scope *S, DeclPtrTy ObjCImpDecl) {
+void Sema::CodeCompleteObjCPropertyDefinition(Scope *S, DeclPtrTy ObjCImpDecl) {
typedef CodeCompleteConsumer::Result Result;
ResultBuilder Results(*this);