aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/FileCheck.rst
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2020-07-10 17:13:25 -0400
committerJoel E. Denny <jdenny.ornl@gmail.com>2020-07-10 17:21:01 -0400
commit6dda6ff0e094b667311dbd7a46d4e36aa787e033 (patch)
tree72ca79f88ee97c1106f11d4c27d394268d655c87 /llvm/docs/CommandGuide/FileCheck.rst
parentec2f2cec769cb07bbf8691f2e0e800747266f857 (diff)
downloadllvm-6dda6ff0e094b667311dbd7a46d4e36aa787e033.zip
llvm-6dda6ff0e094b667311dbd7a46d4e36aa787e033.tar.gz
llvm-6dda6ff0e094b667311dbd7a46d4e36aa787e033.tar.bz2
[FileCheck] Fix up -dump-input* docs
In FileCheck.rst, add `-dump-input-context` and `-dump-input-filter`, and fix some `-dump-input` documentation. In `FileCheck -help`, `cl::value_desc("kind")` is being ignored for `-dump-input-filter`, so just drop it. Extend `-dump-input=help` to mention FILECHECK_OPTS.
Diffstat (limited to 'llvm/docs/CommandGuide/FileCheck.rst')
-rw-r--r--llvm/docs/CommandGuide/FileCheck.rst38
1 files changed, 32 insertions, 6 deletions
diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst
index cb5db00..0a0c2c5 100644
--- a/llvm/docs/CommandGuide/FileCheck.rst
+++ b/llvm/docs/CommandGuide/FileCheck.rst
@@ -103,11 +103,37 @@ and from the command line.
-verify``. With this option FileCheck will verify that input does not contain
warnings not covered by any ``CHECK:`` patterns.
-.. option:: --dump-input <mode>
+.. option:: --dump-input <value>
Dump input to stderr, adding annotations representing currently enabled
- diagnostics. Do this either 'always', on 'fail' (default), or 'never'.
- Specify 'help' to explain the dump format and quit.
+ diagnostics. When there are multiple occurrences of this option, the
+ ``<value>`` that appears earliest in the list below has precedence. The
+ default is ``fail``.
+
+ * ``help`` - Explain input dump and quit
+ * ``always`` - Always dump input
+ * ``fail`` - Dump input on failure
+ * ``never`` - Never dump input
+
+.. option:: --dump-input-context <N>
+
+ In the dump requested by ``--dump-input``, print ``<N>`` input lines before
+ and ``<N>`` input lines after any lines specified by ``--dump-input-filter``.
+ When there are multiple occurrences of this option, the largest specified
+ ``<N>`` has precedence. The default is 5.
+
+.. option:: --dump-input-filter <value>
+
+ In the dump requested by ``--dump-input``, print only input lines of kind
+ ``<value>`` plus any context specified by ``--dump-input-context``. When
+ there are multiple occurrences of this option, the ``<value>`` that appears
+ earliest in the list below has precedence. The default is ``error`` when
+ ``--dump-input=fail``, and it's ``all`` when ``--dump-input=always``.
+
+ * ``all`` - All input lines
+ * ``annotation-full`` - Input lines with annotations
+ * ``annotation`` - Input lines with starting points of annotations
+ * ``error`` - Input lines with starting points of error annotations
.. option:: --enable-var-scope
@@ -137,15 +163,15 @@ and from the command line.
.. option:: -v
- Print good directive pattern matches. However, if ``-input-dump=fail`` or
- ``-input-dump=always``, add those matches as input annotations instead.
+ Print good directive pattern matches. However, if ``-dump-input=fail`` or
+ ``-dump-input=always``, add those matches as input annotations instead.
.. option:: -vv
Print information helpful in diagnosing internal FileCheck issues, such as
discarded overlapping ``CHECK-DAG:`` matches, implicit EOF pattern matches,
and ``CHECK-NOT:`` patterns that do not have matches. Implies ``-v``.
- However, if ``-input-dump=fail`` or ``-input-dump=always``, just add that
+ However, if ``-dump-input=fail`` or ``-dump-input=always``, just add that
information as input annotations instead.
.. option:: --allow-deprecated-dag-overlap