summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2019-07-11 08:54:28 +0000
committerHaojian Wu <hokein@google.com>2019-07-11 08:54:28 +0000
commit8734d09a4ec7e197df9fc0448f7ced7bdca17021 (patch)
tree058138d4e7e0d292dc55a371bfc687a1d571f008 /tools
parentbceaa382bc4cb23de0c2edcb8a59ce82859d7167 (diff)
downloadclang-8734d09a4ec7e197df9fc0448f7ced7bdca17021.tar.gz
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/clang-refactor/ClangRefactor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/clang-refactor/ClangRefactor.cpp b/tools/clang-refactor/ClangRefactor.cpp
index 08963001cc..f7ca39fcfe 100644
--- a/tools/clang-refactor/ClangRefactor.cpp
+++ b/tools/clang-refactor/ClangRefactor.cpp
@@ -38,9 +38,11 @@ namespace opts {
static cl::OptionCategory CommonRefactorOptions("Refactoring options");
static cl::opt<bool> Verbose("v", cl::desc("Use verbose output"),
+ cl::cat(cl::GeneralCategory),
cl::sub(*cl::AllSubCommands));
static cl::opt<bool> Inplace("i", cl::desc("Inplace edit <file>s"),
+ cl::cat(cl::GeneralCategory),
cl::sub(*cl::AllSubCommands));
} // end namespace opts
@@ -609,7 +611,7 @@ int main(int argc, const char **argv) {
ClangRefactorTool RefactorTool;
CommonOptionsParser Options(
- argc, argv, *cl::GeneralCategory, cl::ZeroOrMore,
+ argc, argv, cl::GeneralCategory, cl::ZeroOrMore,
"Clang-based refactoring tool for C, C++ and Objective-C");
if (auto Err = RefactorTool.Init()) {