Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index d015887..4e0ae87 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -463,8 +463,8 @@
break;
case tok::code_completion:
Actions.CodeCompleteOrdinaryName(getCurScope(),
- ObjCImpDecl? Action::CCC_ObjCImplementation
- : Action::CCC_Namespace);
+ ObjCImpDecl? Action::PCC_ObjCImplementation
+ : Action::PCC_Namespace);
ConsumeCodeCompletionToken();
return ParseExternalDeclaration(Attr);
case tok::kw_using:
@@ -1101,17 +1101,17 @@
void Parser::CodeCompletionRecovery() {
for (Scope *S = getCurScope(); S; S = S->getParent()) {
if (S->getFlags() & Scope::FnScope) {
- Actions.CodeCompleteOrdinaryName(getCurScope(), Action::CCC_RecoveryInFunction);
+ Actions.CodeCompleteOrdinaryName(getCurScope(), Action::PCC_RecoveryInFunction);
return;
}
if (S->getFlags() & Scope::ClassScope) {
- Actions.CodeCompleteOrdinaryName(getCurScope(), Action::CCC_Class);
+ Actions.CodeCompleteOrdinaryName(getCurScope(), Action::PCC_Class);
return;
}
}
- Actions.CodeCompleteOrdinaryName(getCurScope(), Action::CCC_Namespace);
+ Actions.CodeCompleteOrdinaryName(getCurScope(), Action::PCC_Namespace);
}
// Anchor the Parser::FieldCallback vtable to this translation unit.