[PATCH] D21485: [cl] Teach cl to support the notion of sub commands (e.g. "git checkout <foo>")
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 17 21:11:22 PDT 2016
zturner updated this revision to Diff 61158.
zturner added a comment.
Added some unit tests. It wasn't easy to test this because the normal paradigm for using llvm::cl is using globals, which doesn't allow you to set up a clean test case each time through. So I had to go through and add some hooks in llvm::cl for basically wiping the slate clean on each test. This allows me to set up new subcommands and options on the stack for each test.
The good news is, adding these unit tests caught a couple of bugs in the implementation of `AllSubCommands`, which are now fixed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 90555 bytes
Desc: not available
More information about the llvm-commits