<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/137760>137760</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Bad diagnostic after `--`: `no such file or directory X, did you mean X`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
HolyBlackCat
</td>
</tr>
</table>
<pre>
A little diagnostic bug.
If you do `clang++ -- -fsyntax-only`, Clang says:
```console
error: no such file or directory: '-fsyntax-only'; did you mean '-fsyntax-only'?
```
It shouldn't do this for obvious reasons. `did you mean '-some-flag'` should only trigger for parameters before the `--`.
Tested on Clang 20 and trunk.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0Us2OnDwQfJrm0gKZNj87Bw4z-2n05Z7DXg20wVmPvbLNJrx9ZISSXSWRkJDc3VVd1aViNItjHqC9Qftfoba0-jD87-1-s2p6fVapGP28D1e0JiXLOBu1OB-TmXDclgrEFcT1i8bdbzh7hE5MVrkF6AZ0w7LEUsfdJfWj9M7u0AmgZ3zOLRjVHkHm-fx8fJN30VsGceUQfAB5RecxbtOK2lhGH3A2gafkw56LQP1nfOpB3nA287HQg5X7e8_9I-spImFc_WZnB9SnLCatJqL2Af34bvwWMbCK3sUqy_yDI_oHl9qqJRN04gTDTIkpmGXhcIC9qaAenDhEHFn7wJhWzohlCZ04Hf3KMXEePr0igcrNmMLmXqtiHuR8kRdV8FD3TXsRT00tinUg3XWib1rZjBOpXl5aXTdcN7Kr57buqDADCWpFQxfRSSlFJXVLTfM0ST1qasQEjeCHMray9v1R-bAUJsaNh1r2fScKq0a28UgLkePveFSBKIcnDHmoHLclQiOsiSn-hkkmWR5uav6YIKUTh1_Sj4N24p8Hx5ecnU--v0Anii3YYU3p7QgT3YHui0nrNlaTfwDd8wrnr3wL_htPCeh-LB6B7qey94F-BgAA__-dGfUS">