Commit Graph

12 Commits

Author SHA1 Message Date
Bob Wilson f4f54e3178 arc-repeated-use-of-weak should not warn about IBOutlet properties
Revision r211132 was supposed to disable -Warc-repeated-use-of-weak for
Objective-C properties marked with the IBOutlet attribute. Those properties
are supposed to be weak but they are only accessed from the main thread
so there is no risk of asynchronous updates setting them to nil. That
combination makes -Warc-repeated-use-of-weak very noisy. The previous
change only handled one kind of access to weak IBOutlet properties.
Instead of trying to add checks for all the different kinds of property
accesses, this patch removes the previous special case check and adds a
check at the point where the diagnostic is reported. rdar://21366461

llvm-svn: 270665
2016-05-25 05:41:57 +00:00
Bob Wilson 410ae489b4 Remove the (ignored) -Wreceived-is-weak diagnostic.
We kept this around for a while since Xcode 6 and earlier had a build
setting for this warning. It was removed in Xcode 7 so there should be
no need for this warning now.

llvm-svn: 266938
2016-04-21 00:11:24 +00:00
Fariborz Jahanian a9dccd41e9 [Objective-C diagnostic PATCH] Accept and ignore -Wreceiver-is-weak
warning until Xcode removes the warning setting.
rdar://20262140

llvm-svn: 233093
2015-03-24 17:14:20 +00:00
Fariborz Jahanian 2954c67e4b [Objective-C Sema]. Remove -Wreceiver-is-weak warning.
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.

llvm-svn: 231851
2015-03-10 21:28:33 +00:00
Bob Wilson 7400e596a3 Predefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>
These macros are used as markers for Interface Builder and need to be defined
to empty strings since they have no impact on the code.

Patch by Ted Kremenek.

llvm-svn: 215259
2014-08-08 23:46:25 +00:00
Fariborz Jahanian 9277ff426d Objective-C ARC. Do not warn about properties with both
IBOutlet and weak attributes when accessed being
unpredictably set to nil because usage of such properties
are always single threaded and its ivar cannot be set
to nil asynchronously. // rdar://15885642 

llvm-svn: 211132
2014-06-17 23:35:13 +00:00
Rafael Espindola ea1ba0adfc Replace -fobjc-default-synthesize-properties with disable-objc-default-synthesize-properties.
We want the modern behavior most of the time, so inverting the option simplifies
the driver and the tests.

llvm-svn: 191551
2013-09-27 20:21:48 +00:00
Ted Kremenek 7ee25676a5 QoI: -Wreadonly-iboutlet-property should have the warning's location on the property.
There's no need to refer to the @implementation at all.

Fixes <rdar://problem/13186515>

llvm-svn: 174802
2013-02-09 07:13:16 +00:00
Fariborz Jahanian f3c171ebec objective-C: don't issue bogus warning about
"auto-synthesized may not work correctly with 'nib' loader"
when 'readonly' property is redeclared 'readwrite' in class
extension. // rdar://13123861

llvm-svn: 174775
2013-02-08 23:32:30 +00:00
Ted Kremenek 875a402dc3 Turn -Wobjc-root-class on by default. <rdar://problem/11203649>.
llvm-svn: 160707
2012-07-25 07:26:32 +00:00
Fariborz Jahanian b52d8d2e5f objective-c: When default synthesizing readonly IBOutlet properties
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209

llvm-svn: 157193
2012-05-21 17:02:43 +00:00
Fariborz Jahanian 199a9b57a6 objective-c: Warn if default synthesizing readonly IBOutlet properties
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://11448209

llvm-svn: 157121
2012-05-19 18:17:17 +00:00