OSDN Git Service

[FileCheck] Don't permit overlapping CHECK-DAG
authorJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 11 Jul 2018 20:27:27 +0000 (20:27 +0000)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 11 Jul 2018 20:27:27 +0000 (20:27 +0000)
commit0195c0bee91a6a35b7ff47792c24046eb59154ab
tree2567957379bed090f5fc91a3827e6a7447eeb57f
parentce57a4ff8c258f07b80f1b025535489a94c9927b
[FileCheck] Don't permit overlapping CHECK-DAG

That is, make CHECK-DAG skip matches that overlap the matches of any
preceding consecutive CHECK-DAG directives.  This change makes
CHECK-DAG more consistent with other directives, and there is evidence
it makes CHECK-DAG more intuitive and less error-prone.  See the RFC
discussion starting at:

  http://lists.llvm.org/pipermail/llvm-dev/2018-May/123010.html

Moreover, this behavior enables CHECK-DAG groups for unordered,
non-unique strings or patterns.  For example, it is useful for
verifying output or logs from a parallel program, such as the OpenMP
runtime.

This patch also implements the command-line option
-allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old
overlapping behavior.  This option should not be used in new tests.
It is meant only for the existing tests that are broken by this change
and that need time to update.

See the following bugzilla issue for tracking of such tests:

  https://bugs.llvm.org/show_bug.cgi?id=37532

Patches to add -allow-deprecated-dag-overlap to those tests will
follow immediately.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D47106

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336847 91177308-0d34-0410-b5e6-96231b3b80d8
docs/CommandGuide/FileCheck.rst
test/FileCheck/check-dag-overlap-torture.txt [new file with mode: 0644]
test/FileCheck/check-dag-overlap.txt [new file with mode: 0644]
utils/FileCheck/FileCheck.cpp