summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-101-1/+1
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* Use std::unique_ptr in a few methods that take ownership.Rafael Espindola2014-08-171-3/+4
| | | | llvm-svn: 215864
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-3/+3
| | | | | | | | 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-3/+3
| | | | | | | | | 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-3/+3
| | | | | | | | | (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
* DiagnosticsEngine: update severity setters to new terminologyAlp Toker2014-06-121-2/+2
| | | | llvm-svn: 210764
* Complete the switch from mappings to declarative diagnostic severitiesAlp Toker2014-06-121-1/+1
| | | | | | | | | This begins to address cognitive dissonance caused by treating the Note diagnostic level as a severity in the diagnostic engine. No change in functionality. llvm-svn: 210758
* ARCMT/GC-check-warn-nsalloc.m: don't provide a diag groupAlp Toker2014-05-191-2/+2
| | | | | | | This diagnostic is now controlled solely by -no-ns-alloc-error thus matching the original intended behaviour. llvm-svn: 209184
* Get ARCMT/GC-check-warn-nsalloc.m workingAlp Toker2014-05-191-4/+3
| | | | | | | | | | | | | The -no-ns-alloc-error migration option now causes the diagnostic to be ignored completely. If this isn't desired, the error can be downgraded to a warning using the usual -Wno-error=arcmt-ns-alloc. Note that we can't use -verify right now on this test because VerifyDiagnosticConsumer gets confused by multiple SourceManager instances, which is presumably the reason it was XFAILed in the first place and why the regression wasn't detected. We'll grep instead for now. llvm-svn: 209172
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-141-12/+12
| | | | | | class. llvm-svn: 203893
* [C++11] Remove the remaining uses of OwningPtr.Ahmed Charles2014-03-091-1/+1
| | | | | | Replace OwningArrayPtr with std::unique_ptr<T[]>. llvm-svn: 203388
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-5/+5
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-5/+4
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* [C++11] Switch from the llvm_move macro to directly calling std::move.Chandler Carruth2014-03-021-1/+1
| | | | llvm-svn: 202611
* ARCMigrate: Introduce proper diagnostics for TransformActionsAlp Toker2014-01-261-1/+4
| | | | | | | | | | | | | | | This starts to switch ARCMT to use proper diagnostic messages. The old use was based on incorrect example code from the documentation. The logic of the previous report() functions has been retained to support any external consumers that might be intercepting diagnostic messages through the old interface. Note that the change in test/Misc/warning-flags.c isn't a new warning without a flag, rather one that was previously invisible to the test. Adding a flag might be a good idea though. llvm-svn: 200124
* Re-apply r197076 and r197086; the build was fixed by chapuni in r197114.Hans Wennborg2013-12-121-38/+0
| | | | llvm-svn: 197116
* Revert r197076: "[objcmt] When emitting a remap file, use a json formatHans Wennborg2013-12-121-0/+38
| | | | | | | | | | | | | | | | | | 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
* [objcmt] When emitting a remap file, use a json format with the edit ↵Argyrios Kyrtzidis2013-12-111-38/+0
| | | | | | | | | | | 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
* [arcmt] Don't try to handle files that are already ARC'ified, this is not ↵Argyrios Kyrtzidis2013-09-171-19/+0
| | | | | | | | possible currently. rdar://14461559 llvm-svn: 190880
* Clean up some Triple usage in clang.Cameron Esfahani2013-09-141-1/+1
| | | | llvm-svn: 190737
* [arcmt] Only disable ARC in the second compilation if there were actually ↵Argyrios Kyrtzidis2013-07-221-10/+21
| | | | | | | | ARC errors in the checking phase. rdar://14490204 llvm-svn: 186850
* [arcmt] After checking is successful disable auto-synthesize to avoid ↵Argyrios Kyrtzidis2013-07-191-0/+3
| | | | | | | | | | "@synthesize of 'weak' property is only allowed in ARC" errors. rdar://14461559 llvm-svn: 186709
* 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
* [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
* [arcmt] Make sure the objc migrators work fine when used with a PCH.Argyrios Kyrtzidis2013-02-051-2/+19
| | | | | | rdar://13140508 llvm-svn: 174386
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-2/+2
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* [arcmt] Adds brackets in case statements that "contain" initialization of ↵Argyrios Kyrtzidis2013-01-041-4/+6
| | | | | | | | | | retaining variable, thus emitting the "switch case is in protected scope" error. rdar://12952016 llvm-svn: 171484
* [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
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-4/+4
| | | | | | | | | | | | | 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
* 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
* 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-011-1/+1
| | | | | | | 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
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-211-1/+1
| | | | | | | | 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
* [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
* Remove unused private member variables found by clang's new ↵Benjamin Kramer2012-06-061-2/+1
| | | | | | -Wunused-private-field. llvm-svn: 158086
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-7/+7
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-4/+42
| | | | | | | | | | | 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
* 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-051-2/+2
| | | | | | | (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-051-6/+6
| | | | llvm-svn: 149798
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-261-2/+5
| | | | | | | | leaves "finalize' behind and in arc mode, does not include it. This allows the migrated source to be compiled in both gc and arc mode. // rdar://10532441 llvm-svn: 149079
* arc migrator: Added an option to the migratorFariborz Jahanian2012-01-261-0/+2
| | | | | | unused yet. llvm-svn: 149001
* arc migrator: Provide infrastructure to add optionsFariborz Jahanian2012-01-251-0/+2
| | | | | | | | | specific to migrator. Use its first option to warn migrating from GC to arc when NSAllocateCollectable/NSReallocateCollectable is used. // rdar://10532541 llvm-svn: 148887
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-201-9/+10
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* Refine placement of LangOptions object in CompilerInvocation by adding a new ↵Ted Kremenek2011-11-181-1/+0
| | | | | | baseclass CompilerInvocationBase with a custom copy constructor. This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object. llvm-svn: 144973
* Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted ↵Ted Kremenek2011-11-171-11/+12
| | | | | | | | | | | | | | | | | object. I discovered that llvm::RefCountedBase<T> has a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted, we can keep it around after the CompilerInvocation object goes away. As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this object may outlive the CompilerInvocation object. This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to mainline LLVM. llvm-svn: 144930
OpenPOWER on IntegriCloud