summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
Commit message (Collapse)AuthorAgeFilesLines
* 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
* clang/lib: [CMake] Reformat, alphabetize lists.NAKAMURA Takumi2012-07-271-1/+2
| | | | llvm-svn: 160850
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160622
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-061-0/+1
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.Benjamin Kramer2012-07-0413-10/+23
| | | | llvm-svn: 159723
* Drop the ASTContext.h include from Stmt.h and fix up transitive users.Benjamin Kramer2012-07-041-0/+1
| | | | | | | | | | | | | | 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. llvm-svn: 159718
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-2/+8
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* [arcmt]Argyrios Kyrtzidis2012-06-201-1/+2
| | | | | | | -Disable -pedantic-errors when migrating per Jordan's suggestion. -Use llvm_move() per John's suggestion. llvm-svn: 158785
* [arcmt] When migrating to ARC disable -Werror so as to only block migrationArgyrios Kyrtzidis2012-06-201-2/+12
| | | | | | | | for "hard" ARC errors, not warnings. rdar://11691437 llvm-svn: 158781
* Structured comment parsing, first step.Dmitri Gribenko2012-06-201-1/+1
| | | | | | | | | * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
* Insert a space if necessary when suggesting CFBridgingRetain/Release.Jordan Rose2012-06-071-9/+16
| | | | | | | | | | | | This was a problem for people who write 'return(result);' Also fix ARCMT's corresponding code, though there's no test case for this because implicit casts like this are rejected by the migrator for being ambiguous, and explicit casts have no problem. <rdar://problem/11577346> llvm-svn: 158130
* [arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a ↵Argyrios Kyrtzidis2012-06-075-7/+32
| | | | | | | | | | +0 method, automatically insert a __bridge cast. radar://11560638 llvm-svn: 158127
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-062-3/+3
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Remove the last dead private member in clang.Benjamin Kramer2012-06-061-5/+3
| | | | llvm-svn: 158100
* Remove unused private member variables found by clang's new ↵Benjamin Kramer2012-06-063-12/+7
| | | | | | -Wunused-private-field. llvm-svn: 158086
* [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of ↵Argyrios Kyrtzidis2012-06-013-17/+49
| | | | | | | | | | __bridge_retained/__bridge_transfer when migrating. rdar://11569198 llvm-svn: 157785
* [objcmt] Warn when modern objc migrator does not convert a NSNumber message ↵Argyrios Kyrtzidis2012-05-241-0/+1
| | | | | | | | because it requires a cast. rdar://11525138 llvm-svn: 157395
* [arcmt] Remove an unused -autorelease, without failing with error, for thisArgyrios Kyrtzidis2012-05-234-18/+129
| | | | | | | | | | | idiom that is used commonly in setters: [backingValue autorelease]; backingValue = [newValue retain]; // in general a +1 assign rdar://9914061 llvm-svn: 157347
* [arcmt] Revert r156999 "Remove the "it is not safe to remove an unused ↵Argyrios Kyrtzidis2012-05-211-0/+11
| | | | | | | | | | 'autorelease' message" ARC migration error". Per feedback from John this is useful to have in general. llvm-svn: 157198
* [arcmt] Remove the "it is not safe to remove an unused 'autorelease' ↵Argyrios Kyrtzidis2012-05-171-11/+0
| | | | | | | | | | | | | | message" ARC migration error. This is more trouble that it is worth; autoreleasing a value without holding on it is a valid use-case, we should not "punish" correct code for the minority of broken/fragile programs that depend on the behavior of -autorelease. rdar://9914061 llvm-svn: 156999
* Fix use of uninitialized variable caught by GCC's -Wmaybe-uninitialized.David Blaikie2012-05-011-1/+3
| | | | | | Review by Doug Gregor. llvm-svn: 155880
* Remove ref/value inconsistency in redecl_iterator.David Blaikie2012-05-011-1/+1
| | | | | | | | | | | | | Similar to r155808 - this mistake has been made in a few iterators. Based on Chandler Carruth's feedback to r155808 I added an implicit conversion to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the dyn_cast (due to template argument deduction causing the conversion not to be used) - there for future convenience, though. This idiom (op T* for iterators) seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I fix up the other iterators here. llvm-svn: 155869
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-305-8/+8
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* [arcmt] When fixing the "unassigned init call" ARC error, make sureArgyrios Kyrtzidis2012-03-311-1/+5
| | | | | | | | to do a nil check for the result of the call. rdar://10950973 llvm-svn: 153793
* [arcmt] Fix a bug where a property in a class extension, that did not existArgyrios Kyrtzidis2012-03-291-3/+8
| | | | | | | | | in the interface, got its attribute rewritten twice, resulting in 'weakweak' or 'strongstrong'. rdar://11047179 llvm-svn: 153621
* Simplify some users of DenseMap::erase.Benjamin Kramer2012-03-241-4/+1
| | | | llvm-svn: 153389
* Kill cocoa::deriveNamingConvention and cocoa::followsFundamentalRule. They ↵Jordy Rose2012-03-171-1/+0
| | | | | | | | are now just simple wrappers around method families, and method decls can cache method family lookups. Also, no one is using them right now. The one difference between ObjCMethodDecl::getMethodFamily and Selector::getMethodFamily is that the former will do some additional sanity checking, and since CoreFoundation types don't look like Objective-C objects, an otherwise interesting method will get a method family of OMF_None. Future clients that use method families should consider how they want to handle CF types. llvm-svn: 153000
* [arcmt] The hard-coded list of weak-incompatible classes is no longer necessary.Argyrios Kyrtzidis2012-03-161-38/+0
| | | | | | rdar://10673816 llvm-svn: 152879
* [arcmt] iOS is always safe to use 'weak'. rdar://10950825Argyrios Kyrtzidis2012-03-161-0/+4
| | | | llvm-svn: 152878
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-116-19/+19
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr toJohn McCall2012-03-103-14/+3
| | | | | | | | track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-065-18/+375
| | | | | | | | | | | 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
* [arcmt]Argyrios Kyrtzidis2012-03-053-27/+39
| | | | | | | | | -Make sure we don't change to '__weak' a __block variable used as output. -Make sure we don't apply __weak twice. Fixes rdar://10520757&10521362 llvm-svn: 152020
* Move llvm/ADT/SaveAndRestore.h -> llvm/Support/SaveAndRestore.h.Argyrios Kyrtzidis2012-03-011-1/+1
| | | | | | Needs llvm update. llvm-svn: 151829
* Move "clang/Analysis/Support/SaveAndRestore.h" to "llvm/ADT/SaveAndRestore.h"Argyrios Kyrtzidis2012-02-271-1/+1
| | | | | | | | to make it more widely available. Depends on llvm commit r151564 llvm-svn: 151566
* [arcmt] GC migrator: don't try to remove redundant __strong, it doesArgyrios Kyrtzidis2012-02-251-25/+0
| | | | | | | | more harm than good. Fixes rdar://10522805&10521433 llvm-svn: 151424
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-12/+12
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-054-8/+8
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-054-9/+9
| | | | llvm-svn: 149798
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-042-0/+2
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
OpenPOWER on IntegriCloud