summaryrefslogtreecommitdiffstats
path: root/clang/test/ARCMT
Commit message (Collapse)AuthorAgeFilesLines
* Quickfix for failing tests.George Karpenkov2018-08-171-2/+2
| | | | llvm-svn: 340110
* [ObjC] Allow declaring __strong pointer fields in structs in Objective-CAkira Hatanaka2018-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | ARC mode. Declaring __strong pointer fields in structs was not allowed in Objective-C ARC until now because that would make the struct non-trivial to default-initialize, copy/move, and destroy, which is not something C was designed to do. This patch lifts that restriction. Special functions for non-trivial C structs are synthesized that are needed to default-initialize, copy/move, and destroy the structs and manage the ownership of the objects the __strong pointer fields point to. Non-trivial structs passed to functions are destructed in the callee function. rdar://problem/33599681 Differential Revision: https://reviews.llvm.org/D41228 llvm-svn: 326307
* Avoid assumption that lit tests are writable. NFCSam McCall2018-01-084-4/+4
| | | | llvm-svn: 321997
* clang/test/ARCMT/remap-applying.c: Use %/s on the command line of echo(1).NAKAMURA Takumi2017-04-282-2/+2
| | | | llvm-svn: 301619
* [ARCMigrate] When applying changes from remap files, disable the ↵Argyrios Kyrtzidis2017-04-282-0/+8
| | | | | | | | | 'adjustRemovals' functionality of EditedSource 'adjustRemovals' is used to avoid situation when removing a range inadvertently causes 2 separate identifiers to get joined into one. But it is not useful when the edits are character precise, as is the case with the remap files. llvm-svn: 301602
* [test] Port clang tests to canonicalized booleansMichal Gorny2017-01-251-1/+1
| | | | | | | | | | | Use the new llvm_canonicalize_cmake_booleans() function to canonicalize booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables used to hold canonicalized values with in-place canonicalization. Use implicit logic in Python code to avoid overrelying on exact 0/1 values. Differential Revision: https://reviews.llvm.org/D28529 llvm-svn: 293052
* [test/objcmt] Add a follow-up test case for r275600.Argyrios Kyrtzidis2016-07-155-2/+12
| | | | llvm-svn: 275609
* [objcmt] Fix a buffer overflow crash than can occur while modernizing enums.Argyrios Kyrtzidis2016-07-153-1/+29
| | | | | | | | Note that due to the nature of the crash it requires libgmalloc or asan for it to crash consistently. rdar://19932927 llvm-svn: 275600
* [objcmt] Don't add an #import of Foundation unnecessarily, if the NS_ENUM ↵Argyrios Kyrtzidis2016-07-151-3/+0
| | | | | | macro is already defined. llvm-svn: 275589
* [arcmt/objcmt] Fix ParentMap crash with invalid code.Argyrios Kyrtzidis2016-07-142-0/+38
| | | | | | rdar://22489560 llvm-svn: 275466
* Re-apply "test: Use add_lit_testsuites so that subsets of tests can be ↵Justin Bogner2016-07-057-3/+3
| | | | | | | | | | | | | | | | | specified" This version should actually remove the empty directories I removed all of the files from. Thanks to tstellar for pointing out git-svn's --rmdir flag. Original message: This creates make/ninja targets like check-clang-codegen and check-clang-unit, much like LLVM already has. I had to move some input files into Input directories so they weren't picked up as test directories. llvm-svn: 274565
* Revert "test: Use add_lit_testsuites so that subsets of tests can be specified"Justin Bogner2016-07-057-3/+3
| | | | | | | This reverts r274560. It's breaking a bunch of bots due to a directory with a space in the name. Doesn't repro locally for some reason. llvm-svn: 274562
* test: Use add_lit_testsuites so that subsets of tests can be specifiedJustin Bogner2016-07-057-3/+3
| | | | | | | | | This creates make/ninja targets like check-clang-codegen and check-clang-unit, much like LLVM already has. I had to move some input files into Input directories so they weren't picked up as test directories. llvm-svn: 274560
* Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall2015-10-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 llvm-svn: 251041
* Some minor ARC diagnostic improvements.John McCall2015-10-211-1/+1
| | | | llvm-svn: 250917
* Don't inherit availability information when implementing a protocol requirement.Douglas Gregor2015-09-301-3/+3
| | | | | | | | | | When an Objective-C method implements a protocol requirement, do not inherit any availability information from the protocol requirement. Rather, check that the implementation is not less available than the protocol requirement, as we do when overriding a method that has availability. Fixes rdar://problem/22734745. llvm-svn: 248949
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-112-0/+4
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-084-1/+4
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-074-4/+1
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-074-1/+4
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-161-2/+2
| | | | llvm-svn: 239791
* [Objective-C SDK modernizer]. Patch to convert setter/getterFariborz Jahanian2015-04-022-0/+15
| | | | | | | 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-232-3/+21
| | | | | | | was not converted to property-dot syntax by removing an unused code. rdar://19140267 llvm-svn: 233019
* Revert r231008 (and dependent r231019).Daniel Jasper2015-03-032-4/+0
| | | | | | | | | As Chandler responded on the initial commit, just directly setting the triple through -Xclang option to the driver creates havoc on other platforms. The driver test should specifically go into test/Driver and test the cc1 commandline itself. llvm-svn: 231063
* [SDK modernizer] Patch to fix type of the typed enums whenFariborz Jahanian2015-03-022-0/+14
| | | | | | migrating to NS_ENUM typedef. rdar://19994496 llvm-svn: 231036
* Attempt to fix buildbot.Fariborz Jahanian2015-03-022-2/+2
| | | | llvm-svn: 231019
* [SDK modernizer]. Patch fixes driver's lack ofFariborz Jahanian2015-03-022-0/+4
| | | | | | | recognition of mernizer's -objcmt-migrate-property-dot-syntax option. rdar://19994452 llvm-svn: 231008
* Allow (Object *)kMyGlobalCFObj casts without bridgingBen Langmuir2015-02-252-6/+16
| | | | | | | | | | | | | | | | Previously we allowed these casts only for constants declared in system headers, which we assume are retain/release-neutral. Now also allow them for constants in user headers, treating them as +0. Practically, this means that we will now allow: id x = (id)kMyGlobalConst; But unlike with system headers we cannot mix them with +1 values: id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK Thanks to John for suggesting this improvement. llvm-svn: 230534
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-254-4/+0
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-254-0/+4
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Objective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macrosFariborz Jahanian2015-01-262-2/+34
| | | | | | with typed enums. rdar://19352510 llvm-svn: 227104
* Objective-C moderinzer [qoi], add space on rhs when needed whenFariborz Jahanian2015-01-232-0/+42
| | | | | | | converting to property-dot syntax for setters. rdar://19381786 llvm-svn: 226944
* Objective-C modernizer. Avoid using property-dot syntax whenFariborz Jahanian2015-01-232-0/+44
| | | | | | | receiver type is not valid for property-dot syntz use. rdar://19381786 llvm-svn: 226927
* ObjC getters with names like "newItem" should still be linked to the @property.Jordan Rose2015-01-162-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Two years ago I added a compile-time "optimization" to ObjCMethodDecl::findPropertyDecl: exit early if the current method is part of a special Objective-C method family (like 'new' or 'init'). However, if a property (declared with @property) has a name that matches a method family, the getter picks up that family despite being declared by the property. The early exit then made ObjCMethodDecl::findPropertyDecl decide that there was no associated property, despite the method itself being marked as an accessor. This corrects that by removing the early exit. This does /not/ change the fact that such a getter is considered to return a value with a +1 retain count. The best way to eliminate this is by adding the objc_method_family(none) attribute to the getter, but unlike the existing ns_returns_not_retained that can't be applied directly to the property -- you have to redeclare the getter instead. (It'd be nice if @property just implied objc_method_family(none) for its getter, but that would be a backwards-incompatible change.) rdar://problem/19038838 llvm-svn: 226338
* Objective-C SDK modernizer. When modernizing an enum to Fariborz Jahanian2014-12-102-18/+18
| | | | | | | 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-092-0/+44
| | | | | | | property-dot-syntax when receiver is 'super'. rdar://19140267 llvm-svn: 223846
* Objective-C. Fixes a regression caused by implementationFariborz Jahanian2014-11-131-8/+3
| | | | | | | | of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. llvm-svn: 221933
* [Objective-C Sema]. Issue availability/deprecated warning when Fariborz Jahanian2014-11-071-3/+8
| | | | | | | there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 llvm-svn: 221562
* Objective-C SDK modernization tool. Use its own optionFariborz Jahanian2014-10-312-3/+3
| | | | | | | | ,-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-092-0/+5
| | | | | | | 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-092-0/+78
| | | | | | to Objective-C dot-syntax. rdar://18498572 llvm-svn: 219424
* Objective-C SDK modernization. When modernizing toFariborz Jahanian2014-10-072-0/+48
| | | | | | | | 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-062-0/+78
| | | | | | | | 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-012-11/+48
| | | | | | | 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-152-0/+16
| | | | | | | which already has the underlying interger type specification. // rdar://1826225 llvm-svn: 217783
* Reword switch/goto diagnostics "protected scope" diagnostics. Making up a termRichard Smith2014-09-061-1/+1
| | | | | | | | "protected scope" is very unhelpful here and actively confuses users. Instead, simply state the nature of the problem in the diagnostic: we cannot jump from here to there. The notes explain nicely why not. llvm-svn: 217293
* Objective-C modernization. Convert -initWithUTF8String messagingFariborz Jahanian2014-08-252-2/+12
| | | | | | with auto-boxing syntax for literals. rdar://18080352 llvm-svn: 216405
* [analyzer] Check for NULL passed to CFAutorelease.Jordan Rose2014-06-212-30/+62
| | | | | | Patch by Sean McBride, tests adjusted by me. llvm-svn: 211453
* Objective-C. Revert my patch in r211234.Fariborz Jahanian2014-06-182-3/+3
| | | | llvm-svn: 211237
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-182-3/+3
| | | | | | | retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 llvm-svn: 211234
OpenPOWER on IntegriCloud