[PATCH] D59746: [CommandLineParser] Add DefaultOption flag

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 11:50:49 PDT 2019


hintonda updated this revision to Diff 194729.
hintonda added a comment.

Enhance Option::reset to reset the default value and remove the option
if it's a cl::DefaultOption.

Also, make sure removeOption only removes an option if both the name
and the Option matches, not just the name -- different Options with
the same name in different SubCommands have always been possible, but
are more common with DefaultOptions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59746/new/

https://reviews.llvm.org/D59746

Files:
  clang/lib/Tooling/CommonOptionsParser.cpp
  llvm/docs/CommandLine.rst
  llvm/include/llvm/Support/CommandLine.h
  llvm/lib/Support/CommandLine.cpp
  llvm/test/Support/check-default-options.txt
  llvm/tools/llvm-opt-report/OptReport.cpp
  llvm/unittests/Support/CommandLineTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59746.194729.patch
Type: text/x-patch
Size: 11704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190411/6e3951e5/attachment-0001.bin>


More information about the cfe-commits mailing list