Jordan Rose
2bd991a1c0
Move Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl.
...
Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl
(the latter by name) over to findPropertyDecl. This actually makes
-Wreceiver-is-weak a bit stronger than it was before.
llvm-svn: 165628
2012-10-10 16:42:54 +00:00
Jordan Rose
13d6b71929
-Wreceiver-is-weak: rephrase warning text and add a suggestion Note.
...
New output:
warning: weak property may be unpredictably set to nil
note: property declared here
note: assign the value to a strong variable to keep the object alive
during use
<rdar://problem/12277204>
llvm-svn: 164857
2012-09-28 22:21:42 +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
Jordan Rose
ee3d99f6be
Warn on weak properties declared in protocols as well.
...
Previously this caused a crash, since protocols are not interfaces.
llvm-svn: 159357
2012-06-28 16:39:28 +00:00
Fariborz Jahanian
22535def43
objective-c: Handle more warning cases for when
...
message receiver is 'weak' property.
// rdar://10225276
llvm-svn: 157946
2012-06-04 19:16:34 +00:00
Fariborz Jahanian
d155c78d18
objective-arc: Retune my previous patch so warning
...
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276
llvm-svn: 155169
2012-04-19 23:49:39 +00:00
Fariborz Jahanian
fce89c609d
objective-c arc: Issue warning under -Wreceiver-is-weak
...
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276
llvm-svn: 155159
2012-04-19 21:44:57 +00:00
Fariborz Jahanian
6bd2226037
objc-arc: provide a warning when 'receiver' of a message is 'weak'
...
in arc mode and opted-in with -Wreceiver-is-weak flag.
// rdar://10225276
llvm-svn: 154042
2012-04-04 20:05:25 +00:00