Continue parsing more postfix expressions, even after semantic

errors. Improves code completion in yet another case.

llvm-svn: 114255
This commit is contained in:
Douglas Gregor
2010-09-18 01:28:11 +00:00
parent 30f2300ed2
commit eda7e545e6
5 changed files with 35 additions and 40 deletions

View File

@@ -2757,9 +2757,11 @@ void Sema::CodeCompleteExpression(Scope *S,
Results.data(),Results.size());
}
void Sema::CodeCompletePostfixExpression(Scope *S, Expr *E) {
if (getLangOptions().ObjC1)
CodeCompleteObjCInstanceMessage(S, E, 0, 0, false);
void Sema::CodeCompletePostfixExpression(Scope *S, ExprResult E) {
if (E.isInvalid())
CodeCompleteOrdinaryName(S, PCC_RecoveryInFunction);
else if (getLangOptions().ObjC1)
CodeCompleteObjCInstanceMessage(S, E.take(), 0, 0, false);
}
static void AddObjCProperties(ObjCContainerDecl *Container,