diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-15 06:18:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-15 06:18:01 +0000 |
commit | 8071e4212ae08f8014e0c3ae6d18b7388003a5cc (patch) | |
tree | ea359a2c105912267f6e067eef19639c5fc48cdc /include/clang/Frontend/CompilerInstance.h | |
parent | de7a0fcdf9f30cb5a97aab614f3975d93cd9926f (diff) |
Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.
There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.
Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index bd1791dae8..2a0a7a7747 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -544,7 +544,8 @@ public: createCodeCompletionConsumer(Preprocessor &PP, const std::string &Filename, unsigned Line, unsigned Column, bool UseDebugPrinter, bool ShowMacros, - bool ShowCodePatterns, llvm::raw_ostream &OS); + bool ShowCodePatterns, bool ShowGlobals, + llvm::raw_ostream &OS); /// \brief Create the Sema object to be used for parsing. void createSema(bool CompleteTranslationUnit, |