summaryrefslogtreecommitdiff
path: root/docs/CommandGuide
diff options
context:
space:
mode:
authorStephen Lin <stephenwlin@gmail.com>2013-07-18 23:26:58 +0000
committerStephen Lin <stephenwlin@gmail.com>2013-07-18 23:26:58 +0000
commitd639206676eef801a092fc3b79bdd1700090e18f (patch)
tree22816dba2f45f309809807e1198ce69540d7e95c /docs/CommandGuide
parent9d1359453fc5db2ff9fb334fe205a14c30ed244d (diff)
downloadllvm-d639206676eef801a092fc3b79bdd1700090e18f.tar.gz
llvm-d639206676eef801a092fc3b79bdd1700090e18f.tar.bz2
llvm-d639206676eef801a092fc3b79bdd1700090e18f.tar.xz
Fix FileCheck CHECK-LABEL documentation wording slightly; also mention that it allows error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CommandGuide')
-rw-r--r--docs/CommandGuide/FileCheck.rst18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/CommandGuide/FileCheck.rst b/docs/CommandGuide/FileCheck.rst
index e2d45601dc..d5c8938479 100644
--- a/docs/CommandGuide/FileCheck.rst
+++ b/docs/CommandGuide/FileCheck.rst
@@ -255,13 +255,13 @@ actual source of the problem.
In order to produce better error messages in these cases, the "``CHECK-LABEL:``"
directive can be used. It is treated identically to a normal ``CHECK``
-directive except that the FileCheck utility makes an additional assumption that
-a line matched by the directive cannot also be matched by any other check
-present in ``match-filename``; this is intended to be used for lines containing
-labels or other unique identifiers. Conceptually, the presence of
-``CHECK-LABEL`` divides the input stream into separate blocks, each of which is
-processed independently, preventing a ``CHECK:`` directive in one block
-matching a line in another block. For example,
+directive except that FileCheck makes an additional assumption that a line
+matched by the directive cannot also be matched by any other check present in
+``match-filename``; this is intended to be used for lines containing labels or
+other unique identifiers. Conceptually, the presence of ``CHECK-LABEL`` divides
+the input stream into separate blocks, each of which is processed independently,
+preventing a ``CHECK:`` directive in one block matching a line in another block.
+For example,
.. code-block:: llvm
@@ -285,7 +285,9 @@ matching a line in another block. For example,
The use of ``CHECK-LABEL:`` directives in this case ensures that the three
``CHECK:`` directives only accept lines corresponding to the body of the
``@C_ctor_base`` function, even if the patterns match lines found later in
-the file.
+the file. Furthermore, if one of these three ``CHECK:`` directives fail,
+FileCheck will recover by continuing to the next block, allowing multiple test
+failures to be detected in a single invocation.
There is no requirement that ``CHECK-LABEL:`` directives contain strings that
correspond to actual syntactic labels in a source or output language: they must