[cfe-commits] r125699 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprObjC.cpp test/SemaObjC/property-missing.m

Douglas Gregor dgregor at apple.com
Wed Feb 16 18:12:12 PST 2011


On Feb 16, 2011, at 5:59 PM, Ted Kremenek wrote:

> Hi Fariborz,
> 
> I'm not certain this diagnostic is any better:
> 
> +	myObject.someOtherObject.someProperty = 0; // expected-error {{property 'someOtherObject' names an object of forward class type in class object 'MyClass *'}}
> 
> What is a "forward class type"?  I know what you mean; you're talking about a Objective-C class that has only been forward declared, but there is no such thing as a forward class type.
> 
> How about:
> 
> property 'someOtherObject' refers to a Objective-C class ('SomeOtherClass') with only a forward declaration (no @interface available)
> 
> This diagnostic clearly spells out that (a) no @interface is available for (b) the class SomeOtherClass when (c) accessing the property someOtherObject.

In the C/C++ world, we would say that the type MyClass is 'incomplete', then point to the forward declaration.

	- Doug



More information about the cfe-commits mailing list