Skip to content

[FileCheck] Misleading prefix listed for NOT match #70221

@hnrklssn

Description

@hnrklssn
❯ cat test.txt
A: hjkl
B-NOT: asdf

❯ FileCheck --check-prefixes A,B test.txt < test.txt
test.txt:2:8: error: A-NOT: excluded string found in input
B-NOT: asdf
       ^
<stdin>:2:8: note: found here
B-NOT: asdf
       ^~~~

Input file: <stdin>
Check file: test.txt

-dump-input=help explains the following input dump.

Input was:
<<<<<<
         1: A: hjkl
check:1        ^~~~
         2: B-NOT: asdf
not:2              !~~~  error: no match expected
>>>>>>

Even though the failure was caused by a matching B-NOT, the error is listed as A-NOT: excluded string found in input.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions