summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ObjCMT.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C SDK modernization. import Foundation evenFariborz Jahanian2014-10-091-7/+4
| | | | | | | when a previous definition of NS_OPTION is available ; e.g. from a pch. enhancement to rdar://18498550 llvm-svn: 219448
* Objective-C SDK modernization. convert message expression Fariborz Jahanian2014-10-091-0/+105
| | | | | | to Objective-C dot-syntax. rdar://18498572 llvm-svn: 219424
* Objective-C SDK modernization. When modernizing toFariborz Jahanian2014-10-071-7/+25
| | | | | | | | use NS_ENUM/NS_OPTIONS macros, add an import of Foundation.h (or its module) as necessary. rdar://18498550 llvm-svn: 219225
* Objective-C SDK modernizer. Patch to support modernizationFariborz Jahanian2014-10-061-16/+26
| | | | | | | | to NS_ENUM/NS_OPTION macros when typedef names are other than NSInteger/NSUInteger (int8_t, etc.). rdar://18532199 llvm-svn: 219173
* Objective-C Modernizer. Patch to remove dangling spaceFariborz Jahanian2014-10-011-2/+6
| | | | | | | before the semicolon wahen modernizing to use NS_ENUM/NS_OPTIONS macros. rdar://18498539 llvm-svn: 218809
* Objective-C SDK modernizer. Do not modernize an enum Fariborz Jahanian2014-09-151-1/+1
| | | | | | | which already has the underlying interger type specification. // rdar://1826225 llvm-svn: 217783
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-101-2/+2
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* Update for llvm API change.Rafael Espindola2014-08-271-1/+1
| | | | llvm-svn: 216576
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-271-1/+1
| | | | | | just letting them be implicitly created. llvm-svn: 216528
* Update for llvm api change.Rafael Espindola2014-08-251-4/+4
| | | | llvm-svn: 216397
* Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper2014-08-251-5/+3
| | | | llvm-svn: 216370
* Use the pointer-like API of ErrorOr.Rafael Espindola2014-08-171-1/+1
| | | | | | Thanks to David Blaikie for the suggestion. llvm-svn: 215866
* Use std::unique_ptr in a few methods that take ownership.Rafael Espindola2014-08-171-3/+4
| | | | llvm-svn: 215864
* Update for llvm api changes.Rafael Espindola2014-08-171-1/+1
| | | | llvm-svn: 215856
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-24/+14
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-14/+24
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-171-24/+14
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* Update for llvm api change.Rafael Espindola2014-07-061-3/+4
| | | | llvm-svn: 212408
* Remove llvm:: from uses of ArrayRef.Craig Topper2014-06-281-4/+4
| | | | llvm-svn: 211987
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-2/+2
| | | | llvm-svn: 210780
* [objcmt] Make sure we don't edit the return type to add 'instancetype' if ↵Argyrios Kyrtzidis2014-05-211-4/+8
| | | | | | | | the return type is already that. rdar://16961577 llvm-svn: 209264
* [C++11] Use 'nullptr'.Craig Topper2014-05-071-9/+9
| | | | llvm-svn: 208163
* [objcmt] Revert r191796, it's not needed anymore.Argyrios Kyrtzidis2014-04-281-31/+1
| | | | | | rdar://16223810 llvm-svn: 207391
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-141-10/+10
| | | | | | class. llvm-svn: 203893
* [C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and ↵Aaron Ballman2014-03-131-3/+1
| | | | | | instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203839
* Renaming the recently-created (r203830) props() range API to properties() ↵Aaron Ballman2014-03-131-2/+2
| | | | | | for clarity. llvm-svn: 203835
* [C++11] Replacing ObjCContainerDecl iterators meth_begin() and meth_end() ↵Aaron Ballman2014-03-131-15/+4
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203832
* [C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() ↵Aaron Ballman2014-03-131-6/+2
| | | | | | with iterator_range props(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203830
* [C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() ↵Aaron Ballman2014-03-081-3/+1
| | | | | | with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203353
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-4/+4
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202639
* Update for llvm api change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202053
* Enforce safe usage of DiagnosticsEngine::getCustomDiagID()Alp Toker2014-01-261-11/+5
| | | | | | | | | | | | | | | | Replace the last incorrect uses and templatize the function to require a compile-time constant string preventing further misuse. The diagnostic formatter expects well-formed input and has undefined behaviour with arbitrary input or crafted user strings in source files. Accepting user input would also have caused unbounded generation of new diagnostic IDs which can be problematic in long-running sessions or language bindings. This completes the work to fix several incorrect callers that passed user input or raw messages to the diagnostics engine where a constant format string was expected. llvm-svn: 200132
* Identify two more unsafe uses of getCustomDiagID()Alp Toker2014-01-261-0/+4
| | | | llvm-svn: 200126
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-16/+15
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-2/+2
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Replacing calls to getAttr with calls to hasAttr for clarity. No functional ↵Aaron Ballman2013-12-191-16/+16
| | | | | | change intended -- this only replaces Boolean uses of getAttr. llvm-svn: 197648
* ObjectiveC migrator. Fixes a bug when protocolFariborz Jahanian2013-12-171-1/+3
| | | | | | conformance is inferred. // rdar://15515206 llvm-svn: 197448
* Re-apply r197076 and r197086; the build was fixed by chapuni in r197114.Hans Wennborg2013-12-121-0/+340
| | | | llvm-svn: 197116
* Revert r197076: "[objcmt] When emitting a remap file, use a json formatHans Wennborg2013-12-121-340/+0
| | | | | | | | | | | | | | | | | | with the edit entries, instead of applying the changes" (And also revert the follow-up r197086.) This seems to have broken Linux builds, which were failing with the following: /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::ObjCMethodDecl const*)' /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::FunctionDecl const*)' collect2: error: ld returned 1 exit status llvm-svn: 197111
* Objective-C migrator: when inferring 'readonly' property of anFariborz Jahanian2013-12-121-1/+3
| | | | | | | Objective-C object conforming to 'NSCopying' protocol, infer a 'copy' property, instead of 'strong'. // rdar://15525937 llvm-svn: 197102
* Remove extra qualification to fix build with g++ after r197076Alp Toker2013-12-111-1/+1
| | | | llvm-svn: 197086
* [objcmt] When emitting a remap file, use a json format with the edit ↵Argyrios Kyrtzidis2013-12-111-0/+340
| | | | | | | | | | | entries, instead of applying the changes to a temp file directly. This allows to combine the edits when they can be different based on whether you saw the implementation or not, e.g. with the designated initializer migration. llvm-svn: 197076
* [objcmt] When whitelisting the headers we want to modify, allow changing theArgyrios Kyrtzidis2013-12-111-9/+43
| | | | | | | | | | the ObjC implementation declarations, just don't change implementations for classes that are not in the whitelisted headers. For example, if we change a method to return 'instancetype' we should also update the method definition in the implementation. llvm-svn: 197075
* [objcmt] Add a modernization option to infer and suggest designated ↵Argyrios Kyrtzidis2013-12-101-0/+59
| | | | | | | | initializers. rdar://15509284 llvm-svn: 196943
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-5/+5
| | | | llvm-svn: 196510
* ObjectiveC migrator. delegate property must be Fariborz Jahanian2013-11-211-7/+7
| | | | | | | inferred as 'assign', not 'assign' and 'strong'. // rdar://15509831 llvm-svn: 195368
* ObjectiveC migrator. use strong instead of Fariborz Jahanian2013-11-211-2/+2
| | | | | | | retain attribute for inferred properties. // rdar://15519923 llvm-svn: 195292
* ObjectiveC migrator. Do not migrate categories withFariborz Jahanian2013-11-191-39/+11
| | | | | | 'Deprecated' name suffix. llvm-svn: 195137
OpenPOWER on IntegriCloud