<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69255>69255</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang typo fixes shouldn't suggest syntactically invalid options
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ahatanak
</td>
</tr>
</table>
<pre>
$ cat test.c
```
int fn() {
return base;
}
```
$ clang test.c
test.c:2:11: error: use of undeclared identifier 'base'; did you mean 'else'?
2 | return base;
| ^~~~
| else
test.c:2:11: error: expected expression
2 errors generated.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEUs1u2zAMfhr6QjSwKduqDz6k6_IessTY2hQpEOWiufTZB7sehg0FRgjSJ_59JEgj4ufIPEL3At1rZdaypDyaxRQTzc9qSu4xArVoTcHCUk4W6leoz9DXx9m_Pha8RqBnoAFBv3xqETOXNUecjDCoQwv69cscx72RBRPnv-gOrM4E6tw0oM7IOae8gVUY0xXX6NgGk9mhdxyLv3rOCKR3ctKgXtB5h4-04o1N3EwcDtPld8GIhKC_beCr2nGXw-EQ6L5_fHz8a99T_7d2fr-zLew2kFnEp_gZRJ8-gjNHzqawO1VuVG5Qg6l4bPpBtwM967paRq26mvuWre6MZcXN9KysG2xnJz3YgSo_Uk2qqZuemlZ39WnS_dRfqVdDX7fcKmhrvhkfTiG83U4pz5UXWXnsB-q6KpiJg-wrQrTPBtTZeTPHJMVbAaJtd_K4RT9N6yzQ1sFLkT_5ii-Bx2Owj3vCq39nQVnSGlwE0gVlnWeWgvKIxdjirQnhgT6-meAdpnvxKUq15jAupdwF1BnoAnSZfVnW6WTTDeiyER7P0z2nH2wL0GXvRoAue0O_AgAA__-zMOKj">