Skip to content

Commit

Permalink
[clangd] Enable cross-namespace completions by default in clangd
Browse files Browse the repository at this point in the history
Summary:
Code completion will suggest symbols from any scope (incl. inaccessible
scopes) when there's no qualifier explicitly specified. E.g.
{F7689815}

As we are assigning relatively low scores for cross-namespace completion items, the overall code completion quality doesn't regress. The feature has been tried out by a few folks, and the feedback is generally positive, so I think it should be ready to be enabled by default.

Reviewers: hokein, ilya-biryukov, kadircet

Reviewed By: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D55649

llvm-svn: 349049
Eric Liu committed Dec 13, 2018
1 parent 7761142 commit e201297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/tool/ClangdMain.cpp
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ static cl::opt<bool> AllScopesCompletion(
"not defined in the scopes (e.g. "
"namespaces) visible from the code completion point. Such completions "
"can insert scope qualifiers."),
cl::init(false), cl::Hidden);
cl::init(true));

static cl::opt<bool>
ShowOrigins("debug-origin", cl::desc("Show origins of completion items"),

0 comments on commit e201297

Please sign in to comment.