1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/FileCheck
Daniel Sanders 29b990c693 FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565
Summary:
Directives are being ignored, when they occur between a partial-word false
match and any match on another prefix.

For example, with FOO and BAR prefixes:
   _FOO
   FOO: foo
   BAR: bar
FileCheck incorrectly matches:
   fog
   bar

This happens because FOO falsely matched as a partial word at '_FOO' and was
ignored while BAR matched at 'BAR:'. The match of BAR is incorrectly returned
as the 'first match' causing the FOO directive to be discarded.

Fixed this the same way as r194565 (D2166) did for a similar test case.
The partial-word false match should be counted as a match for the purposes of
finding the first match of a prefix, but should be returned as a false match
using CheckTy::CheckNone so that it isn't treated as a directive.

Fixes PR17995

Reviewers: samsonov, arsenm

Reviewed By: samsonov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2228

llvm-svn: 195248
2013-11-20 13:25:05 +00:00
..
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-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 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
check-substring-multi-prefix-2.txt
check-substring-multi-prefix.txt
dos-style-eol.txt
first-character-match.txt
line-count-2.txt
line-count.txt
multiple-missing-prefixes.txt
next-no-match.txt
regex-brackets.txt
regex-no-match.txt
separate-multi-prefix.txt
simple-var-capture.txt
two-checks-for-same-match.txt
validate-check-prefix.txt
var-ref-same-line.txt