]> granicus.if.org Git - clang/commitdiff
Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the...
authorHaojian Wu <hokein@google.com>
Thu, 11 Jul 2019 08:54:28 +0000 (08:54 +0000)
committerHaojian Wu <hokein@google.com>
Thu, 11 Jul 2019 08:54:28 +0000 (08:54 +0000)
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

tools/clang-refactor/ClangRefactor.cpp

index 08963001ccf57e9b721e752f8734116263856e4b..f7ca39fcfec35bce2790a6878f14606bc54d6d5e 100644 (file)
@@ -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()) {