llvm-mirror/test/FileCheck
Duncan P. N. Exon Smith 4fff1962e2 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.

llvm-svn: 230612
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 Add 'CHECK-DAG' support 2013-05-14 20:34:12 +00:00
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 Prefix failing commands with not to make clear they are expected to fail. 2013-07-03 16:41:29 +00:00
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 Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only. 2013-02-06 20:40:38 +00:00
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 Fix a bug in FileCheck that wouldn't let define variables as follows: 2012-12-02 16:02:41 +00:00
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 Fix a bug in FileCheck that wouldn't let define variables as follows: 2012-12-02 16:02:41 +00:00
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 Support referencing variables defined on the same line. 2012-12-01 21:54:48 +00:00