History log of /external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
24016765c905a02c9df94ef0b8a50c5e74fff5c2 09-Aug-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] When handling unbridged casts, handle the body of BlockDecl separately because ParentMap does not record
Stmt parent nodes inside a BlockDecl.

Fixes rdar://14686900

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
181e3ecc0907ae0103586a9f4db52241995a8267 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
531db82c6ecfb4772c6870731c06ad8718f1e0ce 07-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Add a hasExternalLinkage helper. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
33ace0669393acb84c24a7ff7a80e8759777b3e8 14-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Make sure the function has an associated parameter for the argument
before checking for its attributes.

rdar://13192395

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
5d2faa41bc63a2a29535ae3dbbc99daabf14ea2f 03-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Rewrite uses of Block_copy/Block_release macros.

c = Block_copy(b);
Block_release(c);
---->
c = [b copy];
<removed>

rdar://9408211

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
accaf19bc1129c0273ec50dba52318e60bc29103 14-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> s/tranform/transform/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
471c8b49982d1132f30b0b0da27fef94fd6e4f67 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
d880b3aa6d594d1a7f2d307c29378c6f59b216ff 07-Jun-2012 Jordan Rose <jordan_rose@apple.com> Insert a space if necessary when suggesting CFBridgingRetain/Release.

This was a problem for people who write 'return(result);'

Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.

<rdar://problem/11577346>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
76a5245d7fb558625453ebe2281ee0bc9c93c245 07-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a +0 method,
automatically insert a __bridge cast.

radar://11560638

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
684190b8dbe5258f4708ffbd816b8c5ee5b3502d 01-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.

rdar://11569198

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
6f42b62b6194f53bcbc349f5d17388e1936535d7 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import OwningPtr<> into clang namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move a method from IdentifierTable.h out of line and remove the SmallString include.

Fix all the transitive include users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
9c7aed308aa701e0ba573c04ebe8d17a4c1486c4 31-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> arc migrator: twik previous patch to exclude user provided
explicit type cast. // rdar://10521744


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
2908ffbc5f54323f150405fa2b06f50788ae55c7 31-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> arc migrator: Do not attempt to migrate to bridge casts which
cancel out each other. Leave it alone so users can take a look
(unmigrated code forces error diagnostic). // rdar://10521744


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
30c42404202d2e2512e51efc6066bd614cfdb5a4 28-Sep-2011 Douglas Gregor <dgregor@apple.com> When 'bool' is not a built-in type but is defined as a macro, print
'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
4532b5553db699d5bed250454f9a45e0f66f4bf8 14-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Use __bridge_retained when passing an objc object to a CF parameter
annotated with cf_consumed attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
33e56f3273457bfa22c7c50bc46cf5a18216863d 10-Sep-2011 John McCall <rjmccall@apple.com> Rename the ARC cast kinds to start with "ARC".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee 09-Sep-2011 John McCall <rjmccall@apple.com> Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
18fd0c6915b45c4daafe18e3cd324c13306f913f 27-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] More automatic transformations and safety improvements; rdar://9615812 :

- Replace calling -zone with 'nil'. -zone is obsolete in ARC.
- Allow removing retain/release on a static global var.
- Fix assertion hit when scanning for name references outside a NSAutoreleasePool scope.
- Automatically add bridged casts for results of objc method calls and when calling CFRetain, for example:

NSString *s;
CFStringRef ref = [s string]; -> CFStringRef ref = (__bridge CFStringRef)([s string]);
ref = s.string; -> ref = (__bridge CFStringRef)(s.string);
ref = [NSString new]; -> ref = (__bridge_retained CFStringRef)([NSString new]);
ref = [s newString]; -> ref = (__bridge_retained CFStringRef)([s newString]);
ref = [[NSString alloc] init]; -> ref = (__bridge_retained CFStringRef)([[NSString alloc] init]);
ref = [[s string] retain]; -> ref = (__bridge_retained CFStringRef)([s string]);
ref = CFRetain(s); -> ref = (__bridge_retained CFTypeRef)(s);
ref = [s retain]; -> ref = (__bridge_retained CFStringRef)(s);

- Emit migrator error when trying to cast to CF type the result of autorelease/release:
for

CFStringRef f3() {
return (CFStringRef)[[[NSString alloc] init] autorelease];
}

emits:

t.m:12:10: error: [rewriter] it is not safe to cast to 'CFStringRef' the result of 'autorelease' message; a __bridge cast may result in a pointer to a destroyed object and a __bridge_retained may leak the object
return (CFStringRef)[[[NSString alloc] init] autorelease];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t.m:12:3: note: [rewriter] remove the cast and change return type of function to 'NSString *' to have the object automatically autoreleased
return (CFStringRef)[[[NSString alloc] init] autorelease];
^

- Before changing attributes to weak/unsafe_unretained, check if the backing ivar
is set to a +1 object, in which case use 'strong' instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
2c18ca0575b60082f2a9f4563b4071071960d37c 15-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Don't remove retains/releases on a global variable, flag them with errors. rdar://9402555.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
7196d06c2fb020a91a26e727be1871110b4a0dc9 21-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Break apart Transforms.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp