summaryrefslogtreecommitdiff
path: root/test/ARCMT
AgeCommit message (Collapse)Author
2017-04-28clang/test/ARCMT/remap-applying.c: Use %/s on the command line of echo(1).NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301619 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28[ARCMigrate] When applying changes from remap files, disable the ↵Argyrios Kyrtzidis
'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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25[test] Port clang tests to canonicalized booleansMichal Gorny
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15[test/objcmt] Add a follow-up test case for r275600.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15[objcmt] Fix a buffer overflow crash than can occur while modernizing enums.Argyrios Kyrtzidis
Note that due to the nature of the crash it requires libgmalloc or asan for it to crash consistently. rdar://19932927 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275600 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15[objcmt] Don't add an #import of Foundation unnecessarily, if the NS_ENUM ↵Argyrios Kyrtzidis
macro is already defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14[arcmt/objcmt] Fix ParentMap crash with invalid code.Argyrios Kyrtzidis
rdar://22489560 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-05Re-apply "test: Use add_lit_testsuites so that subsets of tests can be ↵Justin Bogner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-05Revert "test: Use add_lit_testsuites so that subsets of tests can be specified"Justin Bogner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274562 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-05test: Use add_lit_testsuites so that subsets of tests can be specifiedJustin Bogner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274560 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251041 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-21Some minor ARC diagnostic improvements.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250917 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30Don't inherit availability information when implementing a protocol requirement.Douglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-11[Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis
This was not working correctly, leading to erroneously rejecting valid edits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247462 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-08Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl
of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241653 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl
failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241642 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-07Wrap clang modules and pch files in an object file container.Adrian Prantl
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241620 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-16Commit some test changes somehow missed in r239789.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239791 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-02[Objective-C SDK modernizer]. Patch to convert setter/getterFariborz Jahanian
methods in protocols to their respective property declarations. rdar://19372798 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233977 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-23[SDK modernizer PATCH]. Fixes a bug whereby a call to superFariborz Jahanian
was not converted to property-dot syntax by removing an unused code. rdar://19140267 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03Revert r231008 (and dependent r231019).Daniel Jasper
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02[SDK modernizer] Patch to fix type of the typed enums whenFariborz Jahanian
migrating to NS_ENUM typedef. rdar://19994496 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231036 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02Attempt to fix buildbot.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02[SDK modernizer]. Patch fixes driver's lack ofFariborz Jahanian
recognition of mernizer's -objcmt-migrate-property-dot-syntax option. rdar://19994452 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231008 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25Allow (Object *)kMyGlobalCFObj casts without bridgingBen Langmuir
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230534 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230454 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230423 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26Objective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macrosFariborz Jahanian
with typed enums. rdar://19352510 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227104 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23Objective-C moderinzer [qoi], add space on rhs when needed whenFariborz Jahanian
converting to property-dot syntax for setters. rdar://19381786 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226944 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23Objective-C modernizer. Avoid using property-dot syntax whenFariborz Jahanian
receiver type is not valid for property-dot syntz use. rdar://19381786 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16ObjC getters with names like "newItem" should still be linked to the @property.Jordan Rose
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226338 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10Objective-C SDK modernizer. When modernizing an enum to Fariborz Jahanian
NS_ENUM/NS_OPTIONS use the underlying type if there is no associated type. rdar://19198042 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09Objective-C SDK modernizer. Modernize to use Fariborz Jahanian
property-dot-syntax when receiver is 'super'. rdar://19140267 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223846 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-13Objective-C. Fixes a regression caused by implementationFariborz Jahanian
of new warning for deprecated method call for receiver of type 'id'. This addresses rdar://18960378 where unintended warnings being issued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221933 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-07[Objective-C Sema]. Issue availability/deprecated warning when Fariborz Jahanian
there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221562 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31Objective-C SDK modernization tool. Use its own optionFariborz Jahanian
,-objcmt-migrate-property-dot-syntax, when migarting to use property-dot syntax in place of messaging expression. rdar://18839124 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221001 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-09Objective-C SDK modernization. import Foundation evenFariborz Jahanian
when a previous definition of NS_OPTION is available ; e.g. from a pch. enhancement to rdar://18498550 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219448 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-09Objective-C SDK modernization. convert message expression Fariborz Jahanian
to Objective-C dot-syntax. rdar://18498572 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219424 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-07Objective-C SDK modernization. When modernizing toFariborz Jahanian
use NS_ENUM/NS_OPTIONS macros, add an import of Foundation.h (or its module) as necessary. rdar://18498550 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219225 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-06Objective-C SDK modernizer. Patch to support modernizationFariborz Jahanian
to NS_ENUM/NS_OPTION macros when typedef names are other than NSInteger/NSUInteger (int8_t, etc.). rdar://18532199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01Objective-C Modernizer. Patch to remove dangling spaceFariborz Jahanian
before the semicolon wahen modernizing to use NS_ENUM/NS_OPTIONS macros. rdar://18498539 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-15Objective-C SDK modernizer. Do not modernize an enum Fariborz Jahanian
which already has the underlying interger type specification. // rdar://1826225 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217783 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-06Reword switch/goto diagnostics "protected scope" diagnostics. Making up a termRichard Smith
"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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217293 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-25Objective-C modernization. Convert -initWithUTF8String messagingFariborz Jahanian
with auto-boxing syntax for literals. rdar://18080352 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216405 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-21[analyzer] Check for NULL passed to CFAutorelease.Jordan Rose
Patch by Sean McBride, tests adjusted by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211453 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-18Objective-C. Revert my patch in r211234.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211237 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-18Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian
retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211234 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21[objcmt] Make sure we don't edit the return type to add 'instancetype' if ↵Argyrios Kyrtzidis
the return type is already that. rdar://16961577 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209264 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19ARCMT/GC-check-warn-nsalloc.m: don't provide a diag groupAlp Toker
This diagnostic is now controlled solely by -no-ns-alloc-error thus matching the original intended behaviour. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209184 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-19Improve test verification from r209172Alp Toker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209175 91177308-0d34-0410-b5e6-96231b3b80d8