[llvm] r307116 - [Bash-autocompletion] Show flags which has HelpText or GroupID

Yuka Takahashi via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 4 19:36:33 PDT 2017


Author: yamaguchi
Date: Tue Jul  4 19:36:32 2017
New Revision: 307116

URL: http://llvm.org/viewvc/llvm-project?rev=307116&view=rev
Log:
[Bash-autocompletion] Show flags which has HelpText or GroupID

Summary: Otherwise internal flags will be also completed.

Differential Revision: https://reviews.llvm.org/D34930

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

Modified: llvm/trunk/lib/Option/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/OptTable.cpp?rev=307116&r1=307115&r2=307116&view=diff
==============================================================================
--- llvm/trunk/lib/Option/OptTable.cpp (original)
+++ llvm/trunk/lib/Option/OptTable.cpp Tue Jul  4 19:36:32 2017
@@ -228,7 +228,7 @@ OptTable::suggestValueCompletions(String
 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);




More information about the llvm-commits mailing list