Skip to content

Commit ddfa4ab

Browse files
committed
Fix clang tests using -fobjc-arc on Linux
A few tests that used `-fobjc-arc` were failing because the default runtime on Linux does not support arc. Manually specify the macosx runtime for these tests.
1 parent 6be68b9 commit ddfa4ab

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clang/test/Refactor/Extract/captured-variable-types.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ void silenceStrongInARC() {
5353
// CHECK-ARC: "static int extracted(Interface *pointer) {\nreturn mutationOfObjCPointer(pointer);\n}\n\n"
5454
// CHECK-ARC: "static void extracted(Interface **pointer) {\n*pointer = 0;\n}\n\n"
5555

56-
// RUN: clang-refactor-test perform -action extract -selected=silence-strong-in-arc -selected=silence-strong2-in-arc %s -fobjc-arc | FileCheck --check-prefix=CHECK-ARC %s
56+
// RUN: clang-refactor-test perform -action extract -selected=silence-strong-in-arc -selected=silence-strong2-in-arc %s -fobjc-arc -fobjc-runtime=macosx | FileCheck --check-prefix=CHECK-ARC %s

clang/test/Refactor/Extract/extract-objc-property.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ - (void)test {
2626
// CHECK: "static HasProperty *extracted(HasProperty *object) {\nreturn object.implicitProp;\n}\n\n"
2727
}
2828

29-
// RUN: clang-refactor-test perform -action extract -selected=property -selected=implicit %s -fobjc-arc | FileCheck %s
30-
// RUN: clang-refactor-test perform -action extract -selected=property-name -selected=implicit-name %s -fobjc-arc | FileCheck %s
29+
// RUN: clang-refactor-test perform -action extract -selected=property -selected=implicit %s -fobjc-arc -fobjc-runtime=macosx | FileCheck %s
30+
// RUN: clang-refactor-test perform -action extract -selected=property-name -selected=implicit-name %s -fobjc-arc -fobjc-runtime=macosx | FileCheck %s
3131

3232
- (void)prohibitSetterExtraction {
3333
// setter-pref-begin: +2:8
@@ -42,7 +42,7 @@ - (void)prohibitSetterExtraction {
4242
// implicit-setter-pref-end: -2:22
4343
}
4444
// CHECK-SETTER: Failed to initiate the refactoring action (property setter can't be extracted)!
45-
// RUN: not clang-refactor-test initiate -action extract -selected=setter -selected=setter-pref -selected=implicit-setter -selected=implicit-setter-pref %s -fobjc-arc 2>&1 | FileCheck --check-prefix=CHECK-SETTER %s
45+
// RUN: not clang-refactor-test initiate -action extract -selected=setter -selected=setter-pref -selected=implicit-setter -selected=implicit-setter-pref %s -fobjc-arc -fobjc-runtime=macosx 2>&1 | FileCheck --check-prefix=CHECK-SETTER %s
4646

4747
@end
4848

@@ -57,4 +57,4 @@ void avoidExtractionCrash(HasIntProp *f) {
5757
// avoid-extraction-crash-end: -1:5
5858
}
5959

60-
// RUN: clang-refactor-test perform -action extract -selected=avoid-extraction-crash %s -fobjc-arc | FileCheck --check-prefix=AVOID-CRASH %s
60+
// RUN: clang-refactor-test perform -action extract -selected=avoid-extraction-crash %s -fobjc-arc -fobjc-runtime=macosx | FileCheck --check-prefix=AVOID-CRASH %s

clang/test/Refactor/Extract/return-block.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: clang-refactor-test perform -action extract -selected=%s:16:27-18:4 %s -fobjc-arc | FileCheck %s
1+
// RUN: clang-refactor-test perform -action extract -selected=%s:16:27-18:4 %s -fobjc-arc -fobjc-runtime=macosx | FileCheck %s
22
// RUN: clang-refactor-test perform -action extract -selected=%s:16:27-18:4 %s | FileCheck --check-prefix=NOARC %s
33
@interface I
44

@@ -7,7 +7,7 @@ @interface I
77
@implementation I
88

99
- (void) doStuff: (int)x block: (void (^)(int))block {
10-
10+
1111
}
1212

1313
- (void)foo {}

0 commit comments

Comments
 (0)