summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
Commit message (Collapse)AuthorAgeFilesLines
* Fix a small bug in clang where generating some temporary files would have an ↵Argyrios Kyrtzidis2015-09-092-2/+2
| | | | | | | | extra period before the extension. Patch by Cameron Esfahani! llvm-svn: 247160
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-132-3/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Use llvm::reverse to make a bunch of loops use foreach. NFC.Pete Cooper2015-07-301-4/+3
| | | | | | | | | | | | | | | | In llvm commit r243581, a reverse range adapter was added which allows us to change code such as for (auto I = Fields.rbegin(), E = Fields.rend(); I != E; ++I) { in to for (const FieldDecl *I : llvm::reverse(Fields)) This commit changes a few of the places in clang which are eligible to use this new adapter. llvm-svn: 243663
* [AST] Remove StmtRange in favor of an iterator_range.Benjamin Kramer2015-07-181-4/+4
| | | | | | | | | StmtRange was just a convenient wrapper for two StmtIterators before we had real range support. This removes some of the implicit conversions StmtRange had leading to slightly more verbose code but also should make more obvious what's going on. No functional change intended. llvm-svn: 242615
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-4/+6
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* Switch users of the 'for (StmtRange range = stmt->children(); range; ↵Benjamin Kramer2015-07-021-2/+2
| | | | | | | | | ++range)‘ pattern to range for loops. The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obscure. No functionality change intended. llvm-svn: 241300
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-223-7/+7
| | | | llvm-svn: 240353
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-223-7/+7
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-202-46/+48
| | | | | | | | | | | | | | | | A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
* Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial typesBenjamin Kramer2015-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. llvm-svn: 238601
* Switch PPCallbacks to take the new MacroDefinition instead of ↵Richard Smith2015-05-041-1/+1
| | | | | | MacroDirective*, in order to preserve full information on module macro expansion. llvm-svn: 236404
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-296-31/+25
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-112-5/+3
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* [Objective-C SDK modernizer]. Patch to convert setter/getterFariborz Jahanian2015-04-021-5/+8
| | | | | | | methods in protocols to their respective property declarations. rdar://19372798 llvm-svn: 233977
* [SDK modernizer PATCH]. Fixes a bug whereby a call to superFariborz Jahanian2015-03-231-5/+0
| | | | | | | was not converted to property-dot syntax by removing an unused code. rdar://19140267 llvm-svn: 233019
* [SDK modernizer] Patch to fix type of the typed enums whenFariborz Jahanian2015-03-021-3/+3
| | | | | | migrating to NS_ENUM typedef. rdar://19994496 llvm-svn: 231036
* Cleanup: remove artificial division between lookup results and const lookupRichard Smith2015-02-211-2/+2
| | | | | | | results. No-one was ever modifying a lookup result, and it would not be reasonable to do so. llvm-svn: 230123
* Fix layering violation: include/clang/Basic/PlistSupport.h should not includeRichard Smith2015-01-281-6/+8
| | | | | | files from include/clang/Lex. Clean up module map. llvm-svn: 227361
* Objective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macrosFariborz Jahanian2015-01-261-2/+17
| | | | | | with typed enums. rdar://19352510 llvm-svn: 227104
* Objective-C moderinzer [qoi], add space on rhs when needed whenFariborz Jahanian2015-01-231-0/+4
| | | | | | | converting to property-dot syntax for setters. rdar://19381786 llvm-svn: 226944
* Objective-C modernizer. Avoid using property-dot syntax whenFariborz Jahanian2015-01-231-0/+4
| | | | | | | receiver type is not valid for property-dot syntz use. rdar://19381786 llvm-svn: 226927
* Objective-C SDK modernizer. When modernizing an enum to Fariborz Jahanian2014-12-101-4/+13
| | | | | | | NS_ENUM/NS_OPTIONS use the underlying type if there is no associated type. rdar://19198042 llvm-svn: 223934
* Objective-C SDK modernizer. Modernize to use Fariborz Jahanian2014-12-091-6/+12
| | | | | | | property-dot-syntax when receiver is 'super'. rdar://19140267 llvm-svn: 223846
* clang-format a recent commit I madeDavid Blaikie2014-11-191-1/+1
| | | | llvm-svn: 222317
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-192-7/+6
| | | | llvm-svn: 222306
* Objective-C SDK modernization tool. Use its own optionFariborz Jahanian2014-10-311-1/+1
| | | | | | | | ,-objcmt-migrate-property-dot-syntax, when migarting to use property-dot syntax in place of messaging expression. rdar://18839124 llvm-svn: 221001
* 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
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2014-09-111-6/+2
| | | | | | | In all these cases it looks like the intention was to handle error in a similar way to the file not existing. llvm-svn: 217614
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-102-3/+3
| | | | | | 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-272-2/+2
| | | | | | just letting them be implicitly created. llvm-svn: 216528
* Update for llvm api change.Rafael Espindola2014-08-253-15/+15
| | | | 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-173-10/+14
| | | | 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-102-27/+17
| | | | | | | | 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-172-17/+27
| | | | | | | | | 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-172-27/+17
| | | | | | | | | (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
* Make clang's rewrite engine a core featureAlp Toker2014-07-161-1/+1
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Update for llvm api change.Rafael Espindola2014-07-062-6/+8
| | | | llvm-svn: 212408
* PlistSupport.h: avoid gcc 'defined but not used' warningAlp Toker2014-07-061-2/+1
| | | | llvm-svn: 212396
* Modernize a couple of loopsAlp Toker2014-07-061-5/+2
| | | | llvm-svn: 212394
* writeARCDiagsToPlist(): make sure all diag levels get handledAlp Toker2014-07-061-6/+17
| | | | | | | Handle 'remark' level diagnostics as warnings instead of supplemental notes, and use a covered switch to ensure the mapping is kept up to date. llvm-svn: 212385
* Remove leftovers of '-arcmt-modify-in-memory' from r133315Alp Toker2014-07-051-16/+0
| | | | llvm-svn: 212381
OpenPOWER on IntegriCloud