Commit Graph

17 Commits

Author SHA1 Message Date
Manman Ren ef61168708 Objective-C diagnostics: isObjCNSObjectType should check through AttributedType.
For the following example:
typedef __attribute__((NSObject)) CGColorRef ColorAttrRef;
@property (strong, nullable) ColorAttrRef color;
The property type should be ObjC NSObject type and the compiler should not emit
error: property with 'retain (or strong)' attribute must be of object type

rdar://problem/27747154

llvm-svn: 278742
2016-08-15 21:05:00 +00:00
Aaron Ballman 34b3475cd3 Reworded the NSObject attribute diagnostics to be more consistent with other attribute diagnostics. Also updated the associated test case.
llvm-svn: 198368
2014-01-02 22:45:33 +00:00
Aaron Ballman b7243381c2 Added the attribute name to the err_attribute_wrong_number_arguments diagnostic for clarity; updated almost all of the affected test cases.
Thanks to Fariborz Jahanian for the suggestion!

llvm-svn: 186980
2013-07-23 19:30:11 +00:00
Aaron Ballman 7ced167a09 Correcting the NSObject and Overloadable attribute diagnostics so that the count reported matches reality.
llvm-svn: 186936
2013-07-23 12:13:14 +00:00
Ted Kremenek 2aa89dd03e Make this test portable.
llvm-svn: 162880
2012-08-30 00:27:25 +00:00
Ted Kremenek 7712eef0d7 Fix serious regression introduced in r157780 where __attribute__((NSObject))
could not be attached to a CFTypeRef.

Fixes <rdar://problem/12197822>

llvm-svn: 162872
2012-08-29 22:54:47 +00:00
Fariborz Jahanian bebd0ba549 objc: properties of NSObject attribute must
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar:// 11569860

llvm-svn: 157780
2012-05-31 23:18:32 +00:00
Patrick Beard acfbe9e1f2 Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>

llvm-svn: 154187
2012-04-06 18:12:22 +00:00
Ted Kremenek 05e916bc95 Fix regression from llvm-gcc where we should NOT emit a warning about __attribute__((NSObject)) on a property declaration. This is needed to have retain properties for non-object pointers. Fixes <rdar://problem/10930507>.
llvm-svn: 151786
2012-03-01 01:40:32 +00:00
Fariborz Jahanian 21c2484454 objc: after issuing the warning on direct use of __attribute__((NSObject))
on properties, prevent consequential error  diagnostics. // rdar://10591336

llvm-svn: 146737
2011-12-16 15:54:29 +00:00
Fariborz Jahanian a45495a9f2 objc: warn if NSObject attribute appears other than in a typedef.
// rdar://10453342

llvm-svn: 145358
2011-11-29 01:48:40 +00:00
Fariborz Jahanian df58603c26 Recognize __attribute__((NSObject)) directly applied
on retain properties. (radar 7809468).

llvm-svn: 99951
2010-03-30 22:40:11 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Fariborz Jahanian 0399c1c9c0 Change tests to use clang -cc1...
llvm-svn: 91297
2009-12-14 17:36:25 +00:00
John McCall 02dee0a46a Semantic checking for main().
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.

llvm-svn: 77047
2009-07-25 04:36:53 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Fariborz Jahanian 255c0958dd Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
objects as an objective-c object.

llvm-svn: 62197
2009-01-13 23:34:40 +00:00