<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/88302>88302</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir] Allow `-verify-diagnostics` to verify errors/notes located in external files
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
laszlokindrat
</td>
</tr>
</table>
<pre>
When writing test files for diagnostic verification using the `-verify-diagnostics` flag of various `*-opt` drivers, the expected errors and notes don't always have a location within the actual test file. That is, we can use `// expected-error {{some error message}}` to check for an error originating from a certain line within the file, but there is no way to specify that we are expecting an error from a different files.
Would it be possible to have something like this?
```mlir
// expected-error @{*/some/other/file.mlir} {{error message with location pointing to another file}}
```
Exact syntax is not that important, just some way to be able to specify an external file.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k9GOqzYQhp_G3IwSOQ6B7AUXu03zBJXO9QADzFnHRvaQbPr0lQ17tltVR0KJwON__vnsH2Pk0RE16vSmTpcCF5l8aCzGv61_Z9cHlKL1_bP5MZGDR2BhN4JQFBjYUoTBB-gZR-ejcAd3Cjxwh8LewRJz8USgKr3LS8_dV3FUlYbB4gh-gDsG9ktMlcq87vwsabUPfKcQlfkjy9DHTJ1QDxSCDxHQ9eC8UITeO2VqAbQPfEaY8E6AYP3m5MEyscsa2MmC9muEPfw1oQDnJg-CDpNxWo1clbn-6rrLXUHVb6p-i_5Gqw24UYw4kqov6ak0iIduou49w0G3lfnAIzvMAIfgb4DQURBkB5Yd_dtj8pXstIuk90DAEZyHBz6TeJyp4-EJkow_CDB8oknavxpuTXoeBgrkthPbK31R-nX9_eEX2wMLtASzj5FbS6lD5pdGTJZGsPxOIBNHdbxu2yu9PjfLYfv0_7RKnYCZtJwElbn6NJIy10w_768vG9VvQDORrzOcPbv19nlAl0VWUCv377bW1z8_sBOITyf4sSKUFRrfZh8EnSTKP5coedhPvi0BbiA-USeoH0LBoV1vTdE3x_7l-IIFNYf6YOra6FNVTM156MqBdFW-HDrU57rCsjod8HxqW-y7c19wY7QpdXnQh7PWZbU_DtWA3VFXw2E4nYhUqemGbPfW3m97H8aCY1yoOZ-P2hQWW7IxB9aYTM-YFN3QpPJdu4xRldpylPglICw2hzxvOF3g1Vr_-E0sxa9Rfm5RU-a6Bi0fB_XA_wESiyXYZhKZozpud2FkmZZ23_mbMtfkZfvbzcH_pE6UuebJknoe7p8AAAD__5N_h9Y">