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

    <tr>
        <th>Summary</th>
        <td>
            TableGen "Value <name> unknown!" error does not point to the value's name
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            tablegen
      </td>
    </tr>

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

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

<pre>
    Adapted from a report on Discourse: https://discourse.llvm.org/t/issue-with-using-listflatten-operator-in-llvm-tblgen-compilation/83456

This TableGen fails to compile because there's no existing value to override:
```
def SomeTargetFeatures {
  let FlattenedFeatures = [];
}
```
Which is expected, but the error is misleading because it points to the `[]` not to the value name:
```
<source>:2:27: error: Value 'FlattenedFeatures' unknown!
  let FlattenedFeatures = [];
 ^
Compiler returned: 1
```
In the original report, they had a ! operator on the right hand side and at least visually, it looked like a problem with that ! operator instead.

It should error with:
```
<source>:2:27: error: Value 'FlattenedFeatures' unknown!
  let FlattenedFeatures = [];
      ^
Compiler returned: 1
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVE1v4zYQ_TX0ZSCDIu3IPuigjaNizxu0Z0ocS9NQpECOvJt_X1Bysk3aQ3tbw4IIcb7em3ljUqLBI9bi-EUcLzuz8BhifTE3st9m6l-QedcF-1o31syMFq4xTGAg4hwiQ_BwodSHJSYUuoGReU5CN0K1QrX27Wrv3G3ahzgI1bJQLaW0YPGdeCyWRH4oHCW-OsOMvggzRsMhFuSL7Fdw5wb0RR-mmZxhCl6o9qQPxwchGyGb55ESPJvO4W_o4WrIJeAAmz1Ch71ZEgKPGFGoKoEPgD8oMfkBbsYtmM3DDWMkm2HksA_y_peNxSt8CxM-mzggt2h4iZhAVF-EbAAcMrRb7Wh_3uoLbKQKne1EdfkU9o-R-hEoAf6YsWe0Qj1Ct3AuFDDGEPPlRMmhsbnUNyDEMAfyvKLMxjnelupBgg_89n3D5s30L6CEfkxhiT0K_SR0o_JT5RaumfPh99VbqOof4ISqYPEvPnz3QpX_gwQQxychm8etMxEi8hI92pyu_FTgV79iCJEG8sbdJy5zxCO-wmgsGBCqhLd5ycOYPSINI8NovIVEFiEfDINDkxhulBbj3GuOQwwuhBe04OgFwcAcQ-dwgjyYwKPhj_HJJ0Zj99vUfWVIY1icvfcqO_0qNK-__8r1ztbanvXZ7LAuK62V1pXUu7E20hxPvTlJq0pdaVn2D_p07pU-Hfurlecd1UqqQ6mkLvXhpPS-rK6H07FXlSwPZV9KcZA4GXLv-t-tyq_L8nQ4y50zHbq07h6lOAt4QC-Uypso1qv2u2VI4iDzfkg_ozCxw_pd8kKpO4v6cZv2p78Tp9S9RTZgWvWxyueDSra9YCbcLdHVH9fYQDwu3b4Pk1BtruH-KuYY_sT-faElodo7slut_goAAP__Hk-zoQ">