diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-07-11 12:39:32 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-07-11 12:39:32 +0000 |
commit | c58b079d23a4d76d0a7c9777ed7bdcb66d92d89b (patch) | |
tree | a6188689dd5b98b7c0d51c8e192a011e510e7e10 /docs/CommandGuide/FileCheck.rst | |
parent | 52c50f5ec5f5fd35f88c955edeacd5e81e8e025f (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/CommandGuide/FileCheck.rst')
-rw-r--r-- | docs/CommandGuide/FileCheck.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/CommandGuide/FileCheck.rst b/docs/CommandGuide/FileCheck.rst index 5a60d60ae3d..5c60b2ad08b 100644 --- a/docs/CommandGuide/FileCheck.rst +++ b/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. |