Introduce four new code-completion hooks for C++:

- after "using", show anything that can be a nested-name-specifier.
  - after "using namespace", show any visible namespaces or namespace aliases
  - after "namespace", show any namespace definitions in the current scope
  - after "namespace identifier = ", show any visible namespaces or
    namespace aliases

llvm-svn: 82251
This commit is contained in:
Douglas Gregor
2009-09-18 19:03:04 +00:00
parent 559d9741a8
commit 7e90c6db18
10 changed files with 279 additions and 3 deletions

View File

@@ -72,3 +72,33 @@ void Sema::CodeCompleteQualifiedId(Scope *S, const CXXScopeSpec &SS,
(NestedNameSpecifier *)SS.getScopeRep(),
EnteringContext);
}
void Sema::CodeCompleteUsing(Scope *S) {
if (!CodeCompleter)
return;
CodeCompleter->CodeCompleteUsing(S);
}
void Sema::CodeCompleteUsingDirective(Scope *S) {
if (!CodeCompleter)
return;
CodeCompleter->CodeCompleteUsingDirective(S);
}
void Sema::CodeCompleteNamespaceDecl(Scope *S) {
if (!CodeCompleter)
return;
CodeCompleter->CodeCompleteNamespaceDecl(S);
}
void Sema::CodeCompleteNamespaceAliasDecl(Scope *S) {
if (!CodeCompleter)
return;
CodeCompleter->CodeCompleteNamespaceAliasDecl(S);
}