This is an archive of the discontinued LLVM Phabricator instance.

[CommandLine] Don't allow unlimitted dashes for options. Part 1 or 5
ClosedPublic

Authored by hintonda on Apr 27 2019, 10:59 AM.

Details

Summary

Prior to this patch, the CommandLine parser would strip an
unlimitted number of dashes from options. This patch limits it to
two.

This is the first of a set of patches that address how dashes are
handled by the CommandLine parser.

Event Timeline

hintonda created this revision.Apr 27 2019, 10:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2019, 10:59 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
hintonda retitled this revision from [CommandLine] Don't allow unlimitted dashes for options. to [CommandLine] Don't allow unlimitted dashes for options. Part 1 or 5.Apr 29 2019, 10:40 AM
rnk accepted this revision.Apr 29 2019, 11:19 AM

lgtm

Since we already have CommandLineTest.cpp, I think it would be reasonable to check that three dashes are rejected, but it's not necessary.

This revision is now accepted and ready to land.Apr 29 2019, 11:19 AM
This revision was automatically updated to reflect the committed changes.