History log of /external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b 31-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
1838703fea568b394407b83d1055b4c7f52fb105 06-Jul-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
that the migrator handles) but return their instances as 'id', resulting
in the compiler resolving 'objectForKey:' as the method from NSDictionary.

When checking if we can convert to subscripting syntax, check whether
the receiver is a result of a class method from a hardcoded list of
such classes. In such a case return the specific class as the interface
of the receiver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
c2abbe0b98ec21c0c0e844c20d037639ef284664 05-Jul-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Allow migrating to subscripting syntax for other classes
(apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc.
and the subscripting methods as well.

Part of rdar://11734969

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
8b9fcd7cd1f92e67655899d00fbaeb125c5a0d88 20-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Have the modern objc migration warning change from:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires a cast

to something like:

[NSNumber numberWithDouble:cppb];
warning: converting to boxing syntax requires casting 'bool' to 'double'

This is way better to fully understand the warning.
rdar://11705106

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
12b732a86cc2320dd6bc8fd7ef027b619c554f7e 19-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] When checking whether the subscripting methods are declared use
ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well
and update related tests.

rdar://11695288

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
6b4db9b329c6964955153292e21de0a342354437 07-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to literals,
since the change from +1 to +0 will be handled fine by ARC.

rdar://11606358

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
cacf718381dda1b23efedf3deb02170186095cc0 04-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Don't migrate to subscripting syntax if the required methods have not
been declared on NSArray/NSDictionary.

rdar://11581975

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
013a254a5b85cfb54066e4022649368689c9ab06 24-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Warn when modern objc migrator does not convert a NSNumber message because it requires a cast.

rdar://11525138

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
2bddd43bd87efedc308094e80af3917ef2c9a0d4 22-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.

rdar://11501256

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
0773659881064e7773a63eabc26a4d90293e2f04 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Accept char arrays for rewriting to @() syntax.

Part of rdar://11438360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
c5d33e959b45987bb97a7fcf639cdf5ce55987ed 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] When using NSNumber numberWithInteger:/numberWithUnsignedInteger: be
more liberal in rewriting when the parameter is an enum constant.

Part of rdar://11438360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
7fe103cdcc00a675aac04a11975dc078aba47db5 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Rewrite messages to NSString's stringWithUTF8String:/stringWithCString:
to use the @() boxing syntax.

It will also rewrite uses of stringWithCString:encoding: where the encoding that is
used is NSASCIIStringEncoding or NSUTF8StringEncoding.

rdar://11438360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
0d578a6f873697309e6dd027352fa0716e29986f 15-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
20119a87fbb7719c161d81fc5f721f1ee6ed7e66 15-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] When rewriting to subscripting syntax, make sure we put
the receiver in parentheses when necessary.

Part of rdar://11438360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
055b395294d190a432e9d87bb665634636a1418a 15-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] When rewriting to array/dictionary literals, add an explicit
cast to 'id' for any argument that requires it.

Part of rdar://11438360.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
bea6c0a2e77a78e3d27ee44461613acdd1d8ee9c 13-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused-but-set variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
30660a898545416f0fea2d717f16f75640001e38 06-Mar-2012 Ted Kremenek <kremenek@apple.com> 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.

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