Skip to content

[OBJC] __attribute__((NSObject)) types should be usable as lightweight generic types #84592

@dmaclach

Description

@dmaclach
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"objective-c

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions