ObjC literals (NSDictionary, NSArray, Boxed Expressions) use the same code to instantiate ObjCInterfaceDecl of corresponding classes.
The patch extracts duplicated code into one method and unifies
validation of the ObjCInterfaceDecl’s.
Also, diagnostic for NSDictionary/NSArray was changed a bit.
Before:
@class NSDictionary;
// …
id dictionary = @{}; // expected-error {{declaration of
'dictionaryWithObjects:forKeys:count:' is missing in NSDictionary class}}
After:
@class NSDictionary; // expected-note {{forward declaration of class here}}
// …
id dictionary = @{}; // expected-error {{NSDictionary must be available to use
Objective-C dictionary literals}}
Implementation ‘before’ is correct, but it’s not that precise and might be
confusing.
--
AlexDenisov
Software Engineer,
http://lowlevelbits.org
lookup_objc_literal_interface_decl.patch
Description: Binary data
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
