[PATCH] D34930: [Bash-autocompletion] Show flags which has HelpText or GroupID

Yuka Takahashi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 1 21:25:24 PDT 2017


yamaguchi created this revision.
Herald added a subscriber: hiraditya.

Otherwise internal flags will be also completed.


https://reviews.llvm.org/D34930

Files:
  llvm/lib/Option/OptTable.cpp


Index: llvm/lib/Option/OptTable.cpp
===================================================================
--- llvm/lib/Option/OptTable.cpp
+++ llvm/lib/Option/OptTable.cpp
@@ -228,7 +228,7 @@
 std::vector<std::string> OptTable::findByPrefix(StringRef Cur) const {
   std::vector<std::string> Ret;
   for (const Info &In : OptionInfos.slice(FirstSearchableIndex)) {
-    if (!In.Prefixes)
+    if (!In.Prefixes || (!In.HelpText && !In.GroupID))
       continue;
     for (int I = 0; In.Prefixes[I]; I++) {
       std::string S = std::string(In.Prefixes[I]) + std::string(In.Name);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34930.105017.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170702/34241678/attachment.bin>


More information about the cfe-commits mailing list