1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/FileCheck
Joel E. Denny a7c6415ae4 [FileCheck] Fix --dump-input annotation sort per input line
Without this patch, `--dump-input` annotations on a single input line
are sorted by the associated directive's check-file line.  That seemed
fine because that's often identical to the order in which FileCheck
looks for matches for those directives.

The first problem is that an `--implicit-check-not` pattern has no
check-file line.  The logical equivalent is sorting in command-line
order, but that's not implemented.

The second problem is that, unlike a directive, an
`--implicit-check-not` pattern applies at many points, between many
different pairs of directives.  However, sorting in command-line order
gathers all its associated diagnostics together at one point in an
input line's list of annotations.

In general, it seems to be easier to understand FileCheck's logic when
annotations on a single input line are sorted in the order FileCheck
produced the associated diagnostics, so this patch makes that change.
As documented in the patch, the annotation sort order is also
especially relevant to `CHECK-LABEL`, `CHECK-NOT`, and `CHECK-DAG`, so
this patch updates or extends tests to check the sort makes sense for
them.  (However, the sort for `CHECK-DAG` annotations should not
actually be altered by this patch.)

Reviewed By: thopre

Differential Revision: https://reviews.llvm.org/D77607
2020-04-16 15:39:35 -04:00
..
check-a-b-has-b.txt
check-b-a-has-b.txt
check-count.txt
check-dag-multi-prefix-2.txt
check-dag-multi-prefix.txt
check-dag-not-dag.txt
check-dag-overlap-torture.txt
check-dag-overlap.txt
check-dag-substring-prefix.txt
check-dag-xfails.txt
check-dag.txt
check-empty2.txt
check-empty-tag.txt
check-empty.txt
check-ignore-case.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
dos-style-eol.txt
dump-input-annotations.txt [FileCheck] Fix --dump-input annotation sort per input line 2020-04-16 15:39:35 -04:00
dump-input-enable.txt
empty-regex-match-at-start.txt
envvar-opts.txt
first-character-match.txt
implicit-check-not.txt [FileCheck] - Fix the false positive when -implicit-check-not is used with an unknown -check-prefix. 2020-04-16 15:00:50 +03:00
line-count-2.txt
line-count.txt
lit.local.cfg
match-full-lines.txt
multiple-missing-prefixes.txt
next-no-match.txt
no-check-file.txt
no-multi-suffixes.txt
numeric-defines-diagnostics.txt
numeric-defines.txt
numeric-expression.txt
opt-color.txt
regex-brackets.txt
regex-no-match.txt
same.txt
separate-multi-prefix.txt
simple-var-capture.txt
string-defines-diagnostics.txt
string-defines.txt
two-checks-for-same-match.txt
validate-check-prefix.txt
var-ref-same-line.txt
var-scope.txt
verbose.txt