mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
1c2a79dbfa
Summary: This fixes a subtle bug in new FileCheck feature added in r194343. When we search for the first satisfying check-prefix, we should actually return the first encounter of some check-prefix as a substring, even if it's not a part of valid check-line. Otherwise "FileCheck --check-prefix=FOO --check-prefix=BAR" with check file: FOO not a vaild check-line FOO: foo BAR: bar incorrectly accepted file: fog bar as it skipped the first two encounters of FOO, matching only BAR: line. Reviewers: arsenm, dsanders Reviewed By: dsanders CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2166 llvm-svn: 194565
11 lines
237 B
Plaintext
11 lines
237 B
Plaintext
; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s
|
|
|
|
BAR
|
|
bar
|
|
foo
|
|
; BAR: ba{{z}}
|
|
; FOO: fo{{o}}
|
|
|
|
; CHECK: {{error: expected string not found in input}}
|
|
; CHECK-NEXT: {{B}}AR: ba{{[{][{]z[}][}]}}
|