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

Yuka Takahashi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 4 19:37:06 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL307116: [Bash-autocompletion] Show flags which has HelpText or GroupID (authored by yamaguchi).

Changed prior to commit:
  https://reviews.llvm.org/D34930?vs=105017&id=105211#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34930

Files:
  llvm/trunk/lib/Option/OptTable.cpp


Index: llvm/trunk/lib/Option/OptTable.cpp
===================================================================
--- llvm/trunk/lib/Option/OptTable.cpp
+++ llvm/trunk/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.105211.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170705/193680af/attachment-0001.bin>


More information about the cfe-commits mailing list