Author: ioeric Date: Thu Dec 13 07:35:43 2018 New Revision: 349049 URL: http://llvm.org/viewvc/llvm-project?rev=349049&view=rev Log: [clangd] Enable cross-namespace completions by default in clangd
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 Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp?rev=349049&r1=349048&r2=349049&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp (original) +++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Thu Dec 13 07:35:43 2018 @@ -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"), _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits