Skip to content

Commit 9596dcd

Browse files
committed
Gardening: Migrate test suite to GH issues: ClangImporter
1 parent a2ece9e commit 9596dcd

11 files changed

+41
-25
lines changed

test/ClangImporter/Inputs/enum-anon.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ enum {
88
VarConstant2
99
} global;
1010

11-
typedef struct SR2511 {
12-
int x;
11+
// NB: The order of fields here is important.
12+
typedef struct Struct {
13+
int firstField;
1314

1415
enum {
15-
SR2511A = 0, SR2511B, SR2511C
16-
} y;
16+
NestedConstant1 = 0, NestedConstant2, NestedConstant3
17+
} adhocAnonEnumField;
1718

18-
int z;
19-
} SR2511;
19+
int lastField;
20+
} Struct;
2021

2122
#if __OBJC__
2223
enum : unsigned short {

test/ClangImporter/MixedSource/submodule.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
@_exported import Mixed
44
@_exported import Mixed.Submodule
55

6-
// SR-12265: Make sure we can perform a scoped import on a submodule in a mixed
6+
// https://github.com/apple/swift/issues/54693
7+
// Make sure we can perform a scoped import on a submodule in a mixed
78
// source target.
89
import func Mixed.Submodule.fromSubmodule
910

test/ClangImporter/availability_returns_twice.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
// RUN: %target-typecheck-verify-swift
2+
23
// UNSUPPORTED: OS=windows-msvc
4+
35
// `setjmp` is not available on WebAssembly/WASI
46
// UNSUPPORTED: OS=wasi
5-
// In Android jmp_buf is int[16], which doesn't convert to &Int (SR-9136)
7+
8+
// https://github.com/apple/swift/issues/51632
9+
// In Android jmp_buf is int[16], which doesn't convert to &Int
610
// XFAIL: OS=linux-androideabi
711
// XFAIL: OS=linux-android
812
// XFAIL: OS=openbsd

test/ClangImporter/cfuncs_parse.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ func test_pow() {
6767
pow(1.5, 2.5)
6868
}
6969

70-
#if !((os(Android) || os(Linux)) && arch(arm64))
70+
// https://github.com/apple/swift/issues/51573
7171
// long doubles in AAPCS64 are 128 bits, which is not supported by
72-
// Swift, so don't test this. SR-9072.
72+
// Swift, so don't test this.
73+
#if !((os(Android) || os(Linux)) && arch(arm64))
7374
func test_powl() {
7475
powl(1.5, 2.5)
7576
}

test/ClangImporter/cxx_interop_ir.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s | %FileCheck %s
2-
//
3-
// We can't yet call member functions correctly on Windows (SR-13129).
2+
3+
// https://github.com/apple/swift/issues/55575
4+
// We can't yet call member functions correctly on Windows.
45
// XFAIL: OS=windows-msvc
56

67
import CXXInterop

test/ClangImporter/enum-anon-sized.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ func verifyIsUInt32(_: inout UInt32) { }
66

77
var a = Constant2
88
var b = VarConstant2
9-
var c = SR2511().y
9+
10+
/// https://github.com/apple/swift/issues/45116
11+
/// Anonymous enums used as ad-hoc types should not be naively imported
12+
/// as `Int`.
13+
var c = Struct().adhocAnonEnumField
1014

1115
verifyIsInt(&a)
1216
#if !os(Windows)
@@ -17,9 +21,9 @@ verifyIsInt32(&b)
1721
verifyIsInt32(&c)
1822
#endif
1923

20-
// CHECK: %TSo6SR2511V = type <{ %Ts5Int32V, [[ENUM_TYPE:%Ts5Int32V|%Ts6UInt32V]], %Ts5Int32V }>
21-
// CHECK-LABEL: define{{.*}} i32 @"$s4main6testIR1xs5Int32VSPySo6SR2511VG_tF"(
22-
public func testIR(x: UnsafePointer<SR2511>) -> CInt {
24+
// CHECK: %TSo6StructV = type <{ %Ts5Int32V, [[ENUM_TYPE:%Ts5Int32V|%Ts6UInt32V]], %Ts5Int32V }>
25+
// CHECK-LABEL: define{{.*}} i32 @"$s4main6testIR1xs5Int32VSPySo6StructVG_tF"(
26+
public func testIR(x: UnsafePointer<Struct>) -> CInt {
2327
// CHECK: store i32 1, i32* getelementptr inbounds ([[ENUM_TYPE]], [[ENUM_TYPE]]* bitcast (i32* @global to [[ENUM_TYPE]]*), i32 0, i32 0), align 4
2428
global = VarConstant2
2529

@@ -30,6 +34,6 @@ public func testIR(x: UnsafePointer<SR2511>) -> CInt {
3034

3135
// Force the definition of the type above.
3236
// CHECK: ret
33-
return x.pointee.z
37+
return x.pointee.lastField
3438
} // CHECK-NEXT: {{^}$}}
3539

test/ClangImporter/enum-anon.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h -DDIAGS -verify
1+
// RUN: %target-swift-frontend -typecheck %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h -verify
22

33
func testDiags() {
44
#if _runtime(_ObjC)
@@ -17,6 +17,7 @@ func testDiags() {
1717

1818
// The nested anonymous enum value should still have top-level scope, because
1919
// that's how C works. It should also have the same type as the field (above).
20-
let _: String = SR2511.SR2511B // expected-error {{type 'SR2511' has no member 'SR2511B'}}
20+
let _: String = Struct.NestedConstant2
21+
// expected-error@-1 {{type 'Struct' has no member 'NestedConstant2'}}
2122
}
2223

test/ClangImporter/indirect_field_codegen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -emit-silgen -I %S/Inputs/custom-modules %s | %FileCheck %s
22

3-
// https://bugs.swift.org/browse/SR-10571
3+
// https://github.com/apple/swift/issues/52971
44

55
import IndirectFields
66

test/ClangImporter/objc_async.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ func testMirrored(instance: ClassWithAsync) async {
260260
@available(SwiftStdlib 5.5, *)
261261
@SomeGlobalActor func sgActorFn() {}
262262

263-
// Check inferred isolation for overridden decls from ObjC.
264-
// Note that even if the override is not present, it
265-
// can have an affect. -- rdar://87217618 / SR-15694
263+
// rdar://87217618
264+
// https://github.com/apple/swift/issues/57973
265+
// Check inferred isolation for overridden decls from ObjC. Note that even if
266+
// the override is not present, it can have an affect.
266267
@MainActor
267268
@available(SwiftStdlib 5.5, *)
268269
class FooFrame: PictureFrame {

test/ClangImporter/objc_protocol_renaming.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import Foundation
1515
import ProtoRenaming
1616
import ImplementProtoRenaming
1717

18-
// SR-3917: compiler crash when using an "old" name for an imported requirement
18+
// https://github.com/apple/swift/issues/46502
19+
// Compiler crash when using an "old" name for an imported requirement
1920
class MyGraphViewSubclass : MyGraphView {
2021
@objc func doSomethingToGraphView(_ view: GraphView) { } // expected-error{{method 'doSomethingToGraphView' with Objective-C selector 'doSomethingToGraphView:' conflicts with method 'doSomething(to:)' from superclass 'MyGraphView' with the same Objective-C selector}}
2122
}

test/ClangImporter/objc_redeclared_properties.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func test(obj: RPFoo) {
3333
obj.accessorInProto = nil // okay
3434
}
3535

36-
func sr8490(obj: RPSub) {
36+
// https://github.com/apple/swift/issues/51011
37+
func f_51011(obj: RPSub) {
3738
obj.accessorInProto = nil
3839
}

0 commit comments

Comments
 (0)