r358414 - Revert r358337: "[CommandLineParser] Add DefaultOption flag"

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 07:43:50 PDT 2019


Author: ibiryukov
Date: Mon Apr 15 07:43:50 2019
New Revision: 358414

URL: http://llvm.org/viewvc/llvm-project?rev=358414&view=rev
Log:
Revert r358337: "[CommandLineParser] Add DefaultOption flag"

The change causes test failures under asan. Reverting to unbreak our
integrate.

Modified:
    cfe/trunk/lib/Tooling/CommonOptionsParser.cpp

Modified: cfe/trunk/lib/Tooling/CommonOptionsParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CommonOptionsParser.cpp?rev=358414&r1=358413&r2=358414&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CommonOptionsParser.cpp (original)
+++ cfe/trunk/lib/Tooling/CommonOptionsParser.cpp Mon Apr 15 07:43:50 2019
@@ -83,6 +83,8 @@ std::vector<CompileCommand> ArgumentsAdj
 llvm::Error CommonOptionsParser::init(
     int &argc, const char **argv, cl::OptionCategory &Category,
     llvm::cl::NumOccurrencesFlag OccurrencesFlag, const char *Overview) {
+  static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden,
+                            cl::sub(*cl::AllSubCommands));
 
   static cl::opt<std::string> BuildPath("p", cl::desc("Build path"),
                                         cl::Optional, cl::cat(Category),




More information about the cfe-commits mailing list