summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide/FileCheck.rst
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-07-11 12:39:32 +0000
committerAlexander Kornienko <alexfh@google.com>2014-07-11 12:39:32 +0000
commit56ccdbbd292e0066dff318e16fc3d4b3c22a3b2f (patch)
tree7b26de934c40ac29d4049113273d1741e3c349a5 /llvm/docs/CommandGuide/FileCheck.rst
parentf6827cef7391f35726dc71f7252d7490c91b5b4c (diff)
downloadbcm5719-llvm-56ccdbbd292e0066dff318e16fc3d4b3c22a3b2f.tar.gz
bcm5719-llvm-56ccdbbd292e0066dff318e16fc3d4b3c22a3b2f.zip
Add FileCheck -implicit-check-not option to allow stricter tests without adding too many CHECK-NOTs manually.
Summary: Add FileCheck -implicit-check-not option which allows specifying a pattern that should only occur in the input when explicitly matched by a positive check. This feature allows checking tool diagnostics in a way clang -verify does it for compiler diagnostics. The option has been tested on a number of clang-tidy checks, I'll post a link to the clang-tidy patch to this thread. Once there's an agreement on the general direction, I can add tests and documentation. Reviewers: djasper, bkramer Reviewed By: bkramer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4462 llvm-svn: 212810
Diffstat (limited to 'llvm/docs/CommandGuide/FileCheck.rst')
-rw-r--r--llvm/docs/CommandGuide/FileCheck.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst
index 5a60d60ae3d..5c60b2ad08b 100644
--- a/llvm/docs/CommandGuide/FileCheck.rst
+++ b/llvm/docs/CommandGuide/FileCheck.rst
@@ -49,6 +49,17 @@ OPTIONS
The :option:`--strict-whitespace` argument disables this behavior. End-of-line
sequences are canonicalized to UNIX-style ``\n`` in all modes.
+.. option:: --implicit-check-not check-pattern
+
+ Adds implicit negative checks for the specified patterns between positive
+ checks. The option allows writing stricter tests without stuffing them with
+ ``CHECK-NOT``s.
+
+ For example, "``--implicit-check-not warning:``" can be useful when testing
+ diagnostic messages from tools that don't have an option similar to ``clang
+ -verify``. With this option FileCheck will verify that input does not contain
+ warnings not covered by any ``CHECK:`` patterns.
+
.. option:: -version
Show the version number of this program.
OpenPOWER on IntegriCloud