Author: hokein Date: Thu Jul 11 01:54:28 2019 New Revision: 365742 URL: http://llvm.org/viewvc/llvm-project?rev=365742&view=rev Log: Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."
This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5) The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments). Modified: clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp Modified: clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp?rev=365742&r1=365741&r2=365742&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp (original) +++ clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp Thu Jul 11 01:54:28 2019 @@ -77,7 +77,7 @@ class Command { // By resetting the parser options, we lost the standard -help flag. llvm::cl::opt<bool, false, llvm::cl::parser<bool>> Help{ "help", llvm::cl::desc("Display available options"), - llvm::cl::ValueDisallowed}; + llvm::cl::ValueDisallowed, llvm::cl::cat(llvm::cl::GeneralCategory)}; virtual void run() = 0; protected: Modified: clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp?rev=365742&r1=365741&r2=365742&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp (original) +++ clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp Thu Jul 11 01:54:28 2019 @@ -110,7 +110,7 @@ int main(int argc, const char **argv) { )"; auto Executor = clang::tooling::createExecutorFromCommandLineArgs( - argc, argv, *llvm::cl::GeneralCategory, Overview); + argc, argv, llvm::cl::GeneralCategory, Overview); if (!Executor) { llvm::errs() << llvm::toString(Executor.takeError()) << "\n"; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits