<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/70221>70221</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [FileCheck] Misleading prefix listed for NOT match
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            testing-tools
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hnrklssn
      </td>
    </tr>
</table>

<pre>
    ```
❯ 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`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVMtu8yoQfhq8GTnCEDvxwgs3F-kszt9NXwCbsU1LTAS4TTd59iNwkqY5_aVayMQwzHeZIcI51Y-IFcmfSL5NxOQHY6thtG_auTFpjPysSEEvg24JrcmOkXJL6j20woNH5xf-5Oe9mvAahtc3PX8-pX-eX8KScLK7nH7IsVcaNwO2b5CmbZjTo8VOndBBTdjm6QYAhG8e0G5fvGaE1-uAhNYaG37UV2w8tXqSKMF5q8YeOjONEtQIajxO_q9EYX5IvrtQ5hvnpRoJ393jjcZjmOesA1r8Rcbz-Xzvxj-BCHRKx0z3QHF7tue6_d2C-Z3K6XBMZz18O6A-Ap6OWqjRgR8QOqO1-QjiYwyE8MX_GXwIR3h9k_s47kUAZNHk7_WOBSS8zuAHrbeTwTv4wZ_RxErCt4ew7Hw-w1ddRwMH4dshKMTWo7zy3T2Oef2heeN7944j-MFM_TD7I5SeLAYDoBWTQwnNJ4gZKNhGCjoTLihhm3gmEgLlQCvnUYJwIeq3XVfQRSIrLkteigSrrCjXbFlmlCZD1fHVatk0dNWuimaZtyxjNOuW69UqW4s1NomqGGU8oyzP8jzj5QLzjC0LXpRN2chWdGRJ8SCUXmj9flgY2yfKuQmrFWUsS7RoULt45RnrjZHQKes8xBjCGGEbwljoMzX2qTdGu7CabxNbhYRpM_WOLGkQ7r4gvPI6_pHcrjTJt_CvchqFDBbMF_vqV2cs_Hl-mT1OJqurwftjbEC2J2zfKz9MzaI1B8L2AeQypUdrXrH1hO0jYUfYPur6LwAA__9Y82gw">