aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-11 21:23:17 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-11 21:23:17 +0000
commite6b1bb6e7fe906d164637ca33503b8fafdbc99e5 (patch)
tree04d46dcc8dbdba7495c573d0ff6c373e754e6ce9 /lib/Parse/Parser.cpp
parent741c362a1cb4f3644d5a4e6b8eb9244799e4ade6 (diff)
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
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index d0158871a9..4e0ae87234 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -463,8 +463,8 @@ Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr)
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 @@ bool Parser::TryAnnotateCXXScopeToken(bool EnteringContext) {
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.