[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 04:22:53 PST 2018


ioeric created this revision.
ioeric added reviewers: hokein, ilya-biryukov, kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay.

Code completion will suggest symbols from any scope (incl. inaccessible
scopes) when there's no qualifier explicitly specified. 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.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D55649

Files:
  clangd/tool/ClangdMain.cpp


Index: clangd/tool/ClangdMain.cpp
===================================================================
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -141,7 +141,7 @@
         "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"),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55649.178034.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181213/007241c8/attachment.bin>


More information about the cfe-commits mailing list