Commit Graph

3 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 491e4aed31 [objcmt] Rewrite [NSNumber numberWith*] messages to the new @() boxing syntax.
There are some caveats:
-If an implicit cast (e.g. int -> float for numberWithFloat:) was required, the message
 will not get rewritten
-If the message was with numberWithInteger:/numberWithUnsignedInteger:, which are very
 commonly used, be more liberal and allow the boxing syntax if the underlying type has
 same signedness and will not lose precision.

Part of rdar://11438360

llvm-svn: 156844
2012-05-15 19:17:49 +00:00
Argyrios Kyrtzidis c1dfed6572 [objcmt] When rewriting to array/dictionary literals, add an explicit
cast to 'id' for any argument that requires it.

Part of rdar://11438360.

llvm-svn: 156782
2012-05-14 22:01:53 +00:00
Ted Kremenek f7639e1b4a Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator.  We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

llvm-svn: 152141
2012-03-06 20:06:33 +00:00