This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Enable cross-namespace completions by default in clangd
ClosedPublic

Authored by ioeric on Dec 13 2018, 4:22 AM.

Details

Summary

Code completion will suggest symbols from any scope (incl. inaccessible
scopes) when there's no qualifier explicitly specified. E.g.

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.

Event Timeline

ioeric created this revision.Dec 13 2018, 4:22 AM
ioeric edited the summary of this revision. (Show Details)Dec 13 2018, 4:25 AM
hokein accepted this revision.Dec 13 2018, 4:55 AM
This revision is now accepted and ready to land.Dec 13 2018, 4:55 AM
kadircet added inline comments.Dec 13 2018, 6:35 AM
clangd/tool/ClangdMain.cpp
144

why not keep it hidden ?

ioeric marked an inline comment as done.Dec 13 2018, 6:53 AM
ioeric added inline comments.
clangd/tool/ClangdMain.cpp
144

We hid the flag because the feature was experimental. Now that it's the default, I think it makes sense to expose the flag.

kadircet added inline comments.Dec 13 2018, 7:14 AM
clangd/tool/ClangdMain.cpp
144

I wouldn't expect anyone to turn it off, but not that important.

ilya-biryukov accepted this revision.Dec 13 2018, 7:28 AM

LGTM. When we know everyone is happy with the new behaivour, we can remove the flag altogether.

clangd/tool/ClangdMain.cpp
144

+1 to making it visible. Now that actually enable it by default, it would be nice if the users could find it and turn it off in case they need it.

This revision was automatically updated to reflect the committed changes.