Skip to content

[ObjC]Type defined as 'id' is not recognized as a valid object type. #4304

@llvmbot

Description

@llvmbot
Bugzilla Link 3932
Resolution FIXED
Resolved on Mar 12, 2010 00:57
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @tkremenek

Extended Description

When defining a new type as an id, this new type is not recognized as a valid id (objc object) by clang.
This is particulary annoying when this type is used where an objc object is required, as clang will report an error where gcc does not.

------------- test.m --------------
typedef id BYObjectIdentifier;

@​interface Foo {
void *isa;
}

@​property(copy) BYObjectIdentifier identifier;

@​end


clang -c test.m
error: property with 'copy' attribute must be of object type
@​property(copy) BYObjectIdentifier identifier;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions