Commit Graph

20 Commits

Author SHA1 Message Date
Ted Kremenek 6eb25628c5 Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is used so profusely
in many APIs and large codebases that this made the deprecated warning trigger happy to
the point of not being useful.

llvm-svn: 150223
2012-02-10 02:45:47 +00:00
Fariborz Jahanian 30febeb224 Look for declaration of CFBridgingRetain/CFBridgingRetain before
changing the diagnostic. Also use correct spelling for both.

llvm-svn: 149554
2012-02-01 22:56:20 +00:00
Fariborz Jahanian bcdc282d85 objc-arc: In various diagnostics mention
CFBridgingRetain/CFBridgingRelease calls instead
of __bridge_retained/__bridge_transfer casts as preferred
way of moving cf objects to arc land. // rdar://10207950

llvm-svn: 149449
2012-01-31 23:42:37 +00:00
Argyrios Kyrtzidis 7e79129d15 [arcmt] The migrator tests for the buildbot in http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/
are messed up, XFAIL does not help. Waiting until DISABLE is supported..

llvm-svn: 148012
2012-01-12 02:34:32 +00:00
Argyrios Kyrtzidis 33976a6365 [arcmt] XFAIL on mingw.
llvm-svn: 147830
2012-01-10 02:39:29 +00:00
Argyrios Kyrtzidis 10398a3789 [arcmt] Disable tests in mingw, no idea why they are failing there.
llvm-svn: 147713
2012-01-07 02:24:23 +00:00
Argyrios Kyrtzidis c5dbeeadc1 [arcmt] Un-XFAIL a test.
llvm-svn: 146210
2011-12-09 00:17:47 +00:00
Fariborz Jahanian 6bdeb14d5d objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930

llvm-svn: 145999
2011-12-07 00:30:00 +00:00
John McCall 4124c4924d Teach the ARC compiler to not require __bridge casts when
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.

llvm-svn: 142219
2011-10-17 18:40:02 +00:00
John McCall 9b0a7cea0f Make -fobjc-nonfragile-abi the -cc1 default, since it's the
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.

This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.

Most, though, it involved a perl script to translate a ton
of test cases.

Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.

llvm-svn: 140957
2011-10-02 01:16:38 +00:00
Argyrios Kyrtzidis a6fe4bfdf5 [arcmt] It's not safe to remove the -release on "[[someivar delegate] release];" since it's very likely
that, after migration, the object that was passed to 'setDelegate:' will not be properly retained, e.g:

-whatever {
  id x = [[MyDoHicky alloc] init];
  [someivar setDelegate: x]; // x won't get retained in ARC.
}
-dealloc {
  [[someivar delegate] release]; // give migration error here.
}

rdar://8858009

llvm-svn: 135327
2011-07-15 23:48:56 +00:00
Argyrios Kyrtzidis f2a27f40d6 [arcmt] Don't remove retains/releases on a global variable, flag them with errors. rdar://9402555.
llvm-svn: 135213
2011-07-14 23:32:04 +00:00
Argyrios Kyrtzidis 08903e4c16 [arcmt] Allow -retain of an __unsafe_unretained receiver if the result gets used.
Keep the error if the result is unused. rdar://9552694.

llvm-svn: 135209
2011-07-14 22:46:12 +00:00
Argyrios Kyrtzidis 84b528f3b1 [arcmt] Emit an error for unused -autorelease messages.
An unused autorelease is badness. If we remove it the receiver
will likely die immediately while previously it was kept alive
by the autorelease pool. This is bad practice in general, so leave it
and emit an error to force the user to restructure his code.

rdar://9599884

llvm-svn: 135193
2011-07-14 21:26:49 +00:00
Argyrios Kyrtzidis 7192a3b841 [ARC] When casting from a pointer to an objective-c object with known ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:

id x;
(NSString**)&x; // Casting as (__strong NSString**).

llvm-svn: 134275
2011-07-01 22:22:59 +00:00
Argyrios Kyrtzidis 5a9e5c4df6 [arcmt] Add test for rdar://9601437.
llvm-svn: 133807
2011-06-24 18:41:23 +00:00
Argyrios Kyrtzidis cff00d9c12 Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
rdar://9477613.

llvm-svn: 133779
2011-06-24 00:08:59 +00:00
Argyrios Kyrtzidis 59b5f356ad [arcmt] Make -Warc-unsafe-retained-assign an error when migrating. rdar://8939557
llvm-svn: 133627
2011-06-22 18:03:59 +00:00
Argyrios Kyrtzidis 90b6a2a6a7 [arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager
because it is going to modify the input file.

llvm-svn: 133323
2011-06-18 00:53:41 +00:00
John McCall d70fb9812a The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.

llvm-svn: 133104
2011-06-15 23:25:17 +00:00