summaryrefslogtreecommitdiffstats
path: root/lib/Frontend
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2017-12-13 10:26:49 +0000
committerEric Liu <ioeric@google.com>2017-12-13 10:26:49 +0000
commit979ce58814f6d861f8a9a4da08932916bafd38d9 (patch)
tree53c9d1f9308225fde052cfd5b01ce6768ec51300 /lib/Frontend
parent93d27e381244aa4c5782ad418812f9612bb12b39 (diff)
[Sema] Ignore decls in namespaces when global decls are not wanted.
Summary: ... in qualified code completion and decl lookup. Reviewers: ilya-biryukov, arphaman Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40562 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 3aa615b490..be907d9ba8 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -1380,6 +1380,8 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
= Args.hasArg(OPT_code_completion_patterns);
Opts.CodeCompleteOpts.IncludeGlobals
= !Args.hasArg(OPT_no_code_completion_globals);
+ Opts.CodeCompleteOpts.IncludeNamespaceLevelDecls
+ = !Args.hasArg(OPT_no_code_completion_ns_level_decls);
Opts.CodeCompleteOpts.IncludeBriefComments
= Args.hasArg(OPT_code_completion_brief_comments);