[PATCH] D51977: [clangd] Clarify and hide -index flag.

2018-09-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342134: [clangd] Clarify and hide -index flag. (authored by 
ioeric, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D51977

Files:
  clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp


Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
===
--- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion 
"
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Global index support needs to "
+"enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",


Index: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
===
--- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
+++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion "
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Global index support needs to "
+"enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D51977: [clangd] Clarify and hide -index flag.

2018-09-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 165263.
ioeric marked an inline comment as done.
ioeric added a comment.

- Remove `static`.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51977

Files:
  clangd/tool/ClangdMain.cpp


Index: clangd/tool/ClangdMain.cpp
===
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion 
"
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Global index support needs to "
+"enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",


Index: clangd/tool/ClangdMain.cpp
===
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion "
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Global index support needs to "
+"enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D51977: [clangd] Clarify and hide -index flag.

2018-09-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

+1 to making this hidden. Users (most of them) shouldn't care about it.
Is there any motivation on why we someone would want to disable it currently? 
Maybe we want to deprecate it and remove it completely at some point?
I could only think of being as close as possible to sema completions, but that 
doesn't seem like something that gives better UX (folks from Apple might be 
interested in that, but not sure).

LGTM from my side.




Comment at: clangd/tool/ClangdMain.cpp:135
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Static/global index support needs 
"
+"to enabled separatedly."),

Maybe replace static/global with simply "Global" or "Project-wide".
I think it's good that we don't mention "dynamic" and "static" index in the 
docs too much, users shouldn't really care about this terminology.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51977



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D51977: [clangd] Clarify and hide -index flag.

2018-09-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision.
ioeric added reviewers: sammccall, ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay.

The wording implies global index support, which is confusing.
As most users shouldn't care about this flag, also make it hidden to avoid
further confusion.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51977

Files:
  clangd/tool/ClangdMain.cpp


Index: clangd/tool/ClangdMain.cpp
===
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion 
"
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Static/global index support needs 
"
+"to enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",


Index: clangd/tool/ClangdMain.cpp
===
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -130,10 +130,11 @@
 
 static llvm::cl::opt EnableIndex(
 "index",
-llvm::cl::desc("Enable index-based features such as global code completion "
-   "and searching for symbols. "
-   "Clang uses an index built from symbols in opened files"),
-llvm::cl::init(true));
+llvm::cl::desc(
+"Enable index-based features. By default, clangd maintains an index "
+"built from symbols in opened files. Static/global index support needs "
+"to enabled separatedly."),
+llvm::cl::init(true), llvm::cl::Hidden);
 
 static llvm::cl::opt
 ShowOrigins("debug-origin",
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits