diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-18 19:03:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-18 19:03:04 +0000 |
commit | 49f40bd0c9c9de5e74727774fec429b47d36303a (patch) | |
tree | 4ff8ee97f177b7a7b080e1757932437ec6c1702b /include/clang/Sema/CodeCompleteConsumer.h | |
parent | 2744a063f1d9c475d76c2276f0b4f0998dfc5d09 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index a1d07a0fb3..d8d2bcc311 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -187,6 +187,39 @@ public: /// the qualified-id. virtual void CodeCompleteQualifiedId(Scope *S, NestedNameSpecifier *NNS, bool EnteringContext); + + /// \brief Code completion for a C++ "using" declaration or directive. + /// + /// This code completion action is invoked when the code-completion token is + /// found after the "using" keyword. + /// + /// \param S the scope in which the "using" occurs. + virtual void CodeCompleteUsing(Scope *S); + + /// \brief Code completion for a C++ using directive. + /// + /// This code completion action is invoked when the code-completion token is + /// found after "using namespace". + /// + /// \param S the scope in which the "using namespace" occurs. + virtual void CodeCompleteUsingDirective(Scope *S); + + /// \brief Code completion for a C++ namespace declaration or namespace + /// alias declaration. + /// + /// This code completion action is invoked when the code-completion token is + /// found after "namespace". + /// + /// \param S the scope in which the "namespace" token occurs. + virtual void CodeCompleteNamespaceDecl(Scope *S); + + /// \brief Code completion for a C++ namespace alias declaration. + /// + /// This code completion action is invoked when the code-completion token is + /// found after "namespace identifier = ". + /// + /// \param S the scope in which the namespace alias declaration occurs. + virtual void CodeCompleteNamespaceAliasDecl(Scope *S); //@} /// \name Name lookup functions @@ -213,6 +246,8 @@ public: bool IsEnum(NamedDecl *ND) const; bool IsClassOrStruct(NamedDecl *ND) const; bool IsUnion(NamedDecl *ND) const; + bool IsNamespace(NamedDecl *ND) const; + bool IsNamespaceOrAlias(NamedDecl *ND) const; //@} /// \name Utility functions |