summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2019-03-01 09:20:56 +0000
committerIgor Kudrin <ikudrin@accesssoftek.com>2019-03-01 09:20:56 +0000
commit875f05828d95251abe7c943d79399a3b1c80db12 (patch)
treebda5a205e962c01a076fe5ef6c2dfe7a84319a14 /llvm/docs
parent88c643abf1df624a0402658c74359b6b17f6a86a (diff)
downloadbcm5719-llvm-875f05828d95251abe7c943d79399a3b1c80db12.tar.gz
bcm5719-llvm-875f05828d95251abe7c943d79399a3b1c80db12.zip
[CommandLine] Do not crash if an option has both ValueRequired and Grouping.
If an option, which requires a value, has a `cl::Grouping` formatting modifier, it works well as far as it is used at the end of a group, or as a separate argument. However, if the option appears accidentally in the middle of a group, the program just crashes. This patch prints an error message instead. Differential Revision: https://reviews.llvm.org/D58499 llvm-svn: 355184
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CommandLine.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/docs/CommandLine.rst b/llvm/docs/CommandLine.rst
index 9a6a196b431..8f3207ef083 100644
--- a/llvm/docs/CommandLine.rst
+++ b/llvm/docs/CommandLine.rst
@@ -1172,7 +1172,8 @@ As usual, you can only specify one of these arguments at most.
``ls``) that have lots of single letter arguments, but only require a single
dash. For example, the '``ls -labF``' command actually enables four different
options, all of which are single letters. Note that **cl::Grouping** options
- cannot have values.
+ can have values only if they are used separately or at the end of the groups.
+ It is a runtime error if such an option is used elsewhere in the group.
The CommandLine library does not restrict how you use the **cl::Prefix** or
**cl::Grouping** modifiers, but it is possible to specify ambiguous argument
OpenPOWER on IntegriCloud