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

    <tr>
        <th>Summary</th>
        <td>
            lifetimebound has a confusing diagnostic about not being a type attribute
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            clang:diagnostics
      </td>
    </tr>

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

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

<pre>
    Given:
```
void func(int * [[clang::lifetimebound]] param);
static_assert((int [[clang::lifetimebound]]) 12);
int * [[clang::lifetimebound]] foo;
```
we issue a "lifetimebound attribute cannot be applied to types" diagnostic for the use in the cast expression, but it can be applied to types as shown by the other cases.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUklGPmzAMgH-NebGuAgNteeChvar7GZMDBjKlCUpMb_fvJ7i7XW_awyYhkcjy5_izOSU7epEW6jPUl4wXnUJsTxyDP7NzN_aZCf1r-83exUN5gvwC-Qn2-fu3Xe_B9jgsvgM6Wq8IdMINeO4c-3FNK0_ODqL2JiYsvof6AvUFZ458A2qgPL-RkrLa7junJFGBjh_Af4ABNVjQI-y_njKE8Dvxj_ZeBG1KiyAjEH1JRlaN1iwq2LH3QdEI8jw7Kz1qQH2dJQER9pZHH5LaDocQUSfBJQlavx07Toryc46Skg0e6BnNomh1pf4NiZwwTeHFo3ndCEEniStH0i7r27JvyoYzaYsD1dW-qIoqm9quprrpKB-OBRfmwKY-HnqTD01XDlVVSWZbyqnKm7wqqjovql1dseyLoxxIygPtGapcbmzdzrn7bRfimG1m2iI_UE2ZYyMubctE9CF8iMGr-B6IgJ4fAp9OVkXr-sV25T6ZZUxQ5c4mTZ-V1KqT9qv-iRMydsEPS7J-fNTMJiyKbyNZQ7yZ-xxYtkTXTqpzWpeCrkDX0eq0mF0XbkDXte7772mO4Yd0CnTd2k1A1_eO7y39CgAA__-tFwpk">