vmiklos added a comment.

I'm a bit confused.

On one hand, I want to use tooling::CommonOptionsParser to parse the options, 
which needs a cl::OptionCategory as a parameter.

On the other hand, I want to parse the options, based on that I'll know what 
subcommand was requested, and then I can choose the right option category. 
Based on the above example, I want to use an option category that recognizes 
-oldname when "rename-all" is used, and I want an other option category that 
recognizes -offset" when "rename-at" is used.

I sense a chicken-and-egg problem, the argument of CommonOptionsParser needs 
the category, but I'll only know the correct category after I called 
CommonOptionsParser. Or is there a way out of this? ;-)


https://reviews.llvm.org/D21814



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to