llvm-6502/test/FileCheck
Duncan P. N. Exon Smith 9379c31520 FileCheck: Add CHECK-SAME
Add `CHECK-SAME`, which requires that the pattern matches on the *same*
line as the previous `CHECK`/`CHECK-NEXT` -- in other words, no newline
is allowed in the skipped region.  This is similar to `CHECK-NEXT`,
which requires exactly 1 newline in the skipped region.

My motivation is to simplify checking the long lines of LLVM assembly
for the new debug info hierarchy.  This allows CHECK sequences like the
following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-SAME: otherField: 93{{[,)]}}

which is equivalent to:

    CHECK: ![[REF]] = !SomeMDNode({{.*}}file: ![[FILE:[0-9]+]]{{.*}}otherField: 93{{[,)]}}

While this example just has two fields, many nodes in debug info have
more than that.  `CHECK-SAME` will keep the logic easy to follow.

Morever, it enables interleaving `CHECK-NOT`s without allowing newlines.
Consider the following:

    CHECK:      ![[REF]] = !SomeMDNode(
    CHECK-SAME: file: ![[FILE:[0-9]+]]
    CHECK-NOT:  unexpectedField:
    CHECK-SAME: otherField: 93{{[,)]}}
    CHECK-NOT:  otherUnexpectedField:
    CHECK-SAME: )

which doesn't seem to have an equivalent `CHECK` line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230612 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 04:53:00 +00:00
..
check-a-b-has-b.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-b-a-has-b.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-dag-multi-prefix-2.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-dag-multi-prefix.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-dag-substring-prefix.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-dag-xfails.txt
check-dag.txt Fix handling of CHECK-DAG combined with CHECK-NOT 2013-08-02 11:32:50 +00:00
check-empty.txt FileCheck: Add a flag to allow checking empty input 2014-08-07 18:40:37 +00:00
check-label-dag-capture.txt Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just restores the initial implementation that was in r186162 but got lost in some subsequent refactoring. More explicit variable names and comments are present now to hopefully prevent repeat regression, as well as another test. 2013-10-11 18:38:36 +00:00
check-label-dag.txt Fix handling of CHECK-DAG inside of CHECK-LABEL. 2013-10-11 16:48:02 +00:00
check-label.txt Add new directive called CHECK-LABEL to FileCheck. 2013-07-12 14:51:05 +00:00
check-multi-prefix-label.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-multiple-prefixes-mixed.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-multiple-prefixes-nomatch-2.txt FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565 2013-11-20 13:25:05 +00:00
check-multiple-prefixes-nomatch.txt FileCheck: fix a bug with multiple --check-prefix options. 2013-11-13 11:56:22 +00:00
check-multiple-prefixes-substr.txt FileCheck: fix matching of one check-prefix is a prefix of another 2013-11-13 14:12:52 +00:00
check-not-diaginfo.txt
check-prefixes.txt Fix "existant" typos 2013-10-29 02:35:28 +00:00
check-substring-multi-prefix-2.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
check-substring-multi-prefix.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
dos-style-eol.txt
first-character-match.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
implicit-check-not.txt Add FileCheck -implicit-check-not option to allow stricter tests without adding too many CHECK-NOTs manually. 2014-07-11 12:39:32 +00:00
line-count-2.txt Add FileCheck tests for @LINE 2013-10-31 18:18:09 +00:00
line-count.txt Add FileCheck tests for @LINE 2013-10-31 18:18:09 +00:00
multiple-missing-prefixes.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
next-no-match.txt
regex-brackets.txt
regex-no-match.txt
same.txt FileCheck: Add CHECK-SAME 2015-02-26 04:53:00 +00:00
separate-multi-prefix.txt Allow multiple check prefixes in FileCheck. 2013-11-10 02:04:09 +00:00
simple-var-capture.txt
two-checks-for-same-match.txt
validate-check-prefix.txt Add missing test for r214210. 2014-07-29 22:57:59 +00:00
var-ref-same-line.txt