diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-25 21:41:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-25 21:41:55 +0000 |
commit | d8e8a58ee35ab334ab9d0c2154dca029c1822e8a (patch) | |
tree | d0abce441b16aab4f55cfcfa09fe3ae6daa68f92 /lib/Frontend/CompilerInstance.cpp | |
parent | 3458d43b68cc2fd1cb2b2304614e1dc3419820d8 (diff) |
Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 5ed9c409a3..2b251682b7 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -295,6 +295,7 @@ void CompilerInstance::createCodeCompletionConsumer() { Loc.FileName, Loc.Line, Loc.Column, getFrontendOpts().DebugCodeCompletionPrinter, getFrontendOpts().ShowMacrosInCodeCompletion, + getFrontendOpts().ShowCodePatternsInCodeCompletion, llvm::outs())); if (!CompletionConsumer) return; @@ -317,6 +318,7 @@ CompilerInstance::createCodeCompletionConsumer(Preprocessor &PP, unsigned Column, bool UseDebugPrinter, bool ShowMacros, + bool ShowCodePatterns, llvm::raw_ostream &OS) { // Tell the source manager to chop off the given file at a specific // line and column. @@ -332,9 +334,9 @@ CompilerInstance::createCodeCompletionConsumer(Preprocessor &PP, // Set up the creation routine for code-completion. if (UseDebugPrinter) - return new PrintingCodeCompleteConsumer(ShowMacros, OS); + return new PrintingCodeCompleteConsumer(ShowMacros, ShowCodePatterns, OS); else - return new CIndexCodeCompleteConsumer(ShowMacros, OS); + return new CIndexCodeCompleteConsumer(ShowMacros, ShowCodePatterns, OS); } // Output Files |