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

    <tr>
        <th>Summary</th>
        <td>
            [OBJC] __attribute__((NSObject)) types should be usable as lightweight generic types
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
typedef __attribute__((NSObject)) struct Foo *FooRef;
NSArray<FooRef> *array;
```

Currently gives you the error `type argument 'FooRef' (aka 'const struct Foo *') is neither an Objective-C object nor a block type`
which is not true given that it has `__attribute__((NSObject))` and as per https://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers is a retainable type.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMksFuozAQhp_GXEaJwAQIBw5puhz20ErtA0SDmWBvHTuyx63y9isg22p72ZWQsTxj_99v_xijmRxRJ6oHUT1mmFj70I0XVBaVzgY_3jpR5_cvfxT5gW9XGukMpxMyBzMkptNJyL2Q-6fX5-EXKRayFbKFyCEpht57EPLQe_9CZ1E-rMc8vR5CwJsoj38KP-YuXBfvTd-k1_GYQiDH9gaTeacIN5-ANQGF4AOIOp8JAcOULuQYhGzuCrIBIff4hvOa8i7yN0Qhm5nbRHBkWFMAdLBaMu-0OYJf5uB8AITBevUGs9gn4Ic2Si_7PQOHRAuiA9bIYBg0xhnwn1cn6hzQjYARrhRAM1-jKA9C9kL2yqKbtta-X7Y-TEL2o1dRyP6Q2F-QjXqhMwVyio4-OTZu2mq-WCHLQIzG4WBpszrZXL1xTCHOzAhf9cXWNhu7cmzLFjPqiiZv213dFnWmuz0SNWVTYYmybqtGtVWVY1PjUNSjGorMdDKXu7zM27woqqLeqpra8zDIczXKc6F2YpfTBY399JGZGBN1-13VysziQDYuqZTS0QcsRSHlHNLQzXs2Q5qi2OXWRI5fp7Bhu8T5-eHnUVSP_xHT2WqEqH2yIwwEKS43gBGsmTR_0DzCRI6CUWt3loLt_n6VybBOw1b5i5D9jHP_ba7Br2L9YmJ-qcXk7wAAAP__bmMfIg">