summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
Commit message (Collapse)AuthorAgeFilesLines
...
* ObjC migrator: Add -objcmt-migrate-property to do propertyFariborz Jahanian2013-07-091-6/+14
| | | | | | | migration. Also, fixes an old bug where older migration flags were not being checked for properly. llvm-svn: 185948
* ObjC migration: Skip over setter/getter with attributesFariborz Jahanian2013-07-081-1/+6
| | | | | | for now. llvm-svn: 185879
* [Objective-C migrator] replace candidate user setter/getter withFariborz Jahanian2013-07-081-1/+1
| | | | | | their equivalent property declaration. wip. llvm-svn: 185873
* [objc migrator]: More knobs to do migration toFariborz Jahanian2013-07-051-8/+4
| | | | | | use of objc's properties. llvm-svn: 185724
* Use llvm::sys::fs::createTemporaryFile.Rafael Espindola2013-07-051-4/+3
| | | | llvm-svn: 185717
* [ObjectiveC migrator] relax the rules for setter/getterFariborz Jahanian2013-07-041-3/+8
| | | | | | | types when deciding on validity of a property inclusion. // rdar://14345082 llvm-svn: 185599
* Minor refactoring of my last patch.Fariborz Jahanian2013-07-031-22/+20
| | | | llvm-svn: 185593
* [ObjectiveC Migration]: Provide knobs for Fariborz Jahanian2013-07-031-2/+49
| | | | | | | | migrating setter/getter methods to an eventual property declaraiton. This is wip. // rdar://14345082 llvm-svn: 185591
* Modernize some low-hanging PathV1 uses.Benjamin Kramer2013-06-131-5/+3
| | | | llvm-svn: 183903
* Include PathV1.h in files that use it.Rafael Espindola2013-06-111-0/+1
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
* Cleanup handling of UniqueExternalLinkage.Rafael Espindola2013-05-132-4/+4
| | | | | | | | | | | | | 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. llvm-svn: 181677
* Remove DiagnosticConsumer::clone(), a bad idea that is now unused.Douglas Gregor2013-05-031-6/+0
| | | | llvm-svn: 181070
* [Preprocessor] For the MacroExpands preprocessor callback, also pass the ↵Argyrios Kyrtzidis2013-05-031-1/+1
| | | | | | | | MacroArgs object that provides information about the argument tokens for a function macro. llvm-svn: 181065
* Point diagnostics that complain about a use of a selector in an objc ↵Argyrios Kyrtzidis2013-05-012-4/+4
| | | | | | | | | | | | message, to the selector location. Previously it would point to the left bracket or the receiver, which can be particularly problematic if the receiver is a block literal and we end up point the diagnostic far away for the selector that is complaining about. rdar://13620447 llvm-svn: 180833
* ARCMigrate/Transforms.h: Remove \arg in comment. [-Wdocumentation]NAKAMURA Takumi2013-04-111-1/+1
| | | | llvm-svn: 179261
* [arcmt] Copy the diagnostics so we don't have to worry about invaliding ↵Argyrios Kyrtzidis2013-04-011-3/+9
| | | | | | | | iterators from the diagnostic list. Should fix http://llvm.org/PR15500 llvm-svn: 178500
* Add a hasExternalLinkage helper. No functionality change.Rafael Espindola2013-03-072-4/+4
| | | | llvm-svn: 176607
* [preprocessor] Use MacroDirective in the preprocessor callbacks to make ↵Argyrios Kyrtzidis2013-02-241-1/+1
| | | | | | | | available the full information about the macro (e.g if it was imported and where). llvm-svn: 175978
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-201-1/+1
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-181-14/+14
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* [arcmt] Make sure the function has an associated parameter for the argumentArgyrios Kyrtzidis2013-02-141-1/+1
| | | | | | | | before checking for its attributes. rdar://13192395 llvm-svn: 175184
* [arcmt] Make sure the objc migrators work fine when used with a PCH.Argyrios Kyrtzidis2013-02-051-2/+19
| | | | | | rdar://13140508 llvm-svn: 174386
* Re-sort all the headers. Lots of regressions have crept in here.Chandler Carruth2013-01-191-1/+1
| | | | | | | | | | Manually fix the order of UnwrappedLineParser.cpp as that one didn't have its associated header as the first header. This also uncovered a subtle inclusion order dependency as CLog.h didn't include LLVM.h to pick up using declarations it relied upon. llvm-svn: 172892
* [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a ↵Argyrios Kyrtzidis2013-01-161-3/+23
| | | | | | | | | | | | | | | | | | dictionary literal if we can see the elements of the arrays. for example: NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]]; --> NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" }; rdar://12428166 llvm-svn: 172679
* Rework the traversal of Objective-C categories and extensions toDouglas Gregor2013-01-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consider (sub)module visibility. The bulk of this change replaces myriad hand-rolled loops over the linked list of Objective-C categories/extensions attached to an interface declaration with loops using one of the four new category iterator kinds: visible_categories_iterator: Iterates over all visible categories and extensions, hiding any that have their "hidden" bit set. This is by far the most commonly used iterator. known_categories_iterator: Iterates over all categories and extensions, ignoring the "hidden" bit. This tends to be used for redeclaration-like traversals. visible_extensions_iterator: Iterates over all visible extensions, hiding any that have their "hidden" bit set. known_extensions_iterator: Iterates over all extensions, whether they are visible to normal name lookup or not. The effect of this change is that any uses of the visible_ iterators will respect module-import visibility. See the new tests for examples. Note that the old accessors for categories and extensions are gone; there are *Raw() forms for some of them, for those (few) areas of the compiler that have to manipulate the linked list of categories directly. This is generally discouraged. Part two of <rdar://problem/10634711>. llvm-svn: 172665
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-123-8/+8
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* [arcmt] Follow-up for r171484; make sure when adding brackets enclosing case ↵Argyrios Kyrtzidis2013-01-081-58/+136
| | | | | | | | | statements, that the case does not "contain" a declaration that is referenced "outside" of it, otherwise we will emit un-compilable code. llvm-svn: 171828
* Update CMakeLists.txtTed Kremenek2013-01-041-2/+2
| | | | llvm-svn: 171505
* Add file added in r171484 to CMakelists.txt.Filipe Cabecinhas2013-01-041-0/+1
| | | | llvm-svn: 171494
* [arcmt] Allow removing an -autorelease of a variable initialized in the ↵Argyrios Kyrtzidis2013-01-043-16/+58
| | | | | | | | previous statement. rdar://11074996 llvm-svn: 171485
* [arcmt] Adds brackets in case statements that "contain" initialization of ↵Argyrios Kyrtzidis2013-01-045-5/+135
| | | | | | | | | | retaining variable, thus emitting the "switch case is in protected scope" error. rdar://12952016 llvm-svn: 171484
* [arcmt] Don't error if an autoreleased variable is returned after the ↵Argyrios Kyrtzidis2013-01-041-18/+70
| | | | | | | | -autorelease. rdar://12952025 llvm-svn: 171482
* [arcmt] Rewrite uses of Block_copy/Block_release macros.Argyrios Kyrtzidis2013-01-031-9/+88
| | | | | | | | | | | | c = Block_copy(b); Block_release(c); ----> c = [b copy]; <removed> rdar://9408211 llvm-svn: 171454
* [arcmt] When capturing ARC errors, have a sanity check to make sureArgyrios Kyrtzidis2012-12-121-1/+2
| | | | | | the diagnostic has a valid location. llvm-svn: 170040
* [objc] For the ARC error that is emitted when a synthesized property ↵Argyrios Kyrtzidis2012-12-121-6/+12
| | | | | | | | | | | | | | | implementation has inconsistent ownership with the backing ivar, point the error location to the ivar. Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed. Also provide the location of @synthesize via a note. This also fixes the problem where an auto-synthesized property would emit an error without any location. llvm-svn: 170039
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-049-23/+23
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-041-8/+11
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. llvm-svn: 169229
* Don't include Type.h in DeclarationName.h.Benjamin Kramer2012-12-012-1/+3
| | | | | | Recursively prune some includes. llvm-svn: 169094
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-012-1/+3
| | | | | | | | | 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. llvm-svn: 169092
* s/tranform/transform/Benjamin Kramer2012-11-1413-13/+13
| | | | llvm-svn: 167929
* Remove old driver code to grab the iOS simulator version from the -D option.Bob Wilson2012-11-091-44/+0
| | | | | | | We can now rely on the -mios-simulator-version-min command line option and remove the awful hack. <rdar://problem/10304510> llvm-svn: 167603
* Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor2012-10-241-1/+1
| | | | | | reference-counted. llvm-svn: 166587
* Use a .def file for most of the diagnostic options.Douglas Gregor2012-10-231-0/+2
| | | | llvm-svn: 166520
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-9/+16
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-013-3/+4
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. llvm-svn: 163050
* Fixed invalid iterators. Since the iterator is invalidated after the erase() ↵Joao Matos2012-08-311-1/+1
| | | | | | call, we need to replace it with the new one returned. This was triggering an assert under MSVC 2012 and making all the ARCMT/ tests fail. llvm-svn: 163007
* Fix undefined behavior: member function calls where 'this' is a null pointer.Richard Smith2012-08-231-1/+1
| | | | llvm-svn: 162430
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-212-2/+2
| | | | | | | | diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. llvm-svn: 162252
* Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose2012-08-101-6/+43
| | | | | | | | | | | | | | | | | | | | The old behavior was to re-scan any files (like modules) where we may have directives but won't actually be parsing during the -verify invocation. Now, we keep the old behavior in Debug builds as a sanity check (though modules are a known entity), and expect all legitimate directives to come from comments seen by the preprocessor. This also affects the ARC migration tool, which captures diagnostics in order to filter some out. This change adds an explicit cleanup to CaptureDiagnosticsConsumer in order to let its sub-consumer handle the real end of diagnostics. This was originally split into four patches, but the tests do not run cleanly without all four, so I've combined them into one commit. Patches by Andy Gibbs, with slight modifications from me. llvm-svn: 161650
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+4
| | | | llvm-svn: 160851
OpenPOWER on IntegriCloud