Skip to content

Improve diagnostics for missing Obj-C properties #3606

@llvmbot

Description

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

Extended Description

This:

void f(NSObject *o)
{
o.foo;
}

results in the following error when compiled with gcc:

iMac:clang andersca$ gcc -fsyntax-only t.m
t.m: In function 'f':
t.m:5: error: request for member 'sliff' in something not a structure or union

And when compiled with clang:

iMac:clang andersca$ clang -fsyntax-only t.m
t.m:5:5: error: member reference base type 'NSObject *' is not a structure or union
o.sliff;
~ ^

It would be nice to give a better diagnostic about missing properties if we notice that the object in question is an Objective-C object.

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