forked from OSchip/llvm-project
5507f6688d
Prior to this change, there was no clean way of getting FileCheck to check that a line is completely empty. The expected way of using "CHECK: {{^$}}" does not work because the '^' matches the end of the previous match (this behaviour may be desirable in certain instances). For the same reason, "CHECK-NEXT: {{^$}}" will fail when the previous match was at the end of the line, as the pattern will match there. Using the recommended [[:space:]] to match an explicit new line could also match a space, and thus is not always desired. Literal '\n' matches also do not work. A workaround was suggested in the review, but it is a little clunky. This change adds a new directive that behaves the same as CHECK-NEXT, except that it only matches against empty lines (nothing, not even whitespace, is allowed). As with CHECK-NEXT, it will fail if more than one newline occurs before the next blank line. Example usage: ; test.txt foo bar ; CHECK: foo ; CHECK-EMPTY: ; CHECK-NEXT: bar Differential Revision: https://reviews.llvm.org/D28896 Reviewed by: probinson llvm-svn: 335613 |
||
---|---|---|
.. | ||
check-a-b-has-b.txt | ||
check-b-a-has-b.txt | ||
check-dag-multi-prefix-2.txt | ||
check-dag-multi-prefix.txt | ||
check-dag-substring-prefix.txt | ||
check-dag-xfails.txt | ||
check-dag.txt | ||
check-empty-tag.txt | ||
check-empty.txt | ||
check-empty2.txt | ||
check-label-dag-capture.txt | ||
check-label-dag.txt | ||
check-label.txt | ||
check-multi-prefix-label.txt | ||
check-multiple-prefixes-mixed.txt | ||
check-multiple-prefixes-nomatch-2.txt | ||
check-multiple-prefixes-nomatch.txt | ||
check-multiple-prefixes-substr.txt | ||
check-not-diaginfo.txt | ||
check-prefixes.txt | ||
check-substring-multi-prefix-2.txt | ||
check-substring-multi-prefix.txt | ||
defines.txt | ||
dos-style-eol.txt | ||
first-character-match.txt | ||
implicit-check-not.txt | ||
line-count-2.txt | ||
line-count.txt | ||
match-full-lines.txt | ||
multiple-missing-prefixes.txt | ||
next-no-match.txt | ||
no-multi-suffixes.txt | ||
regex-brackets.txt | ||
regex-no-match.txt | ||
regex-scope.txt | ||
same.txt | ||
separate-multi-prefix.txt | ||
simple-var-capture.txt | ||
two-checks-for-same-match.txt | ||
validate-check-prefix.txt | ||
var-ref-same-line.txt |