Skip to content

Commit 3fe8b71

Browse files
authored
Merge pull request #72912 from apple/egorzhdan/cxx-interop-compat-mode
[cxx-interop] Pull changes from `swift-6` compat mode into `swift-5.9`
2 parents e373cae + b330376 commit 3fe8b71

26 files changed

+69
-78
lines changed

include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ ERROR(conforms_to_ambiguous,none,
247247
ERROR(conforms_to_not_protocol,none,
248248
"%0 %1 referenced in protocol conformance '%2' is not a protocol", (DescriptiveDeclKind, ValueDecl *, StringRef))
249249

250-
ERROR(move_only_requires_move_only,none,
251-
"use of noncopyable C++ type '%0' requires -enable-experimental-move-only",
252-
(StringRef))
253-
254250
ERROR(failed_base_method_call_synthesis,none,
255251
"failed to synthesize call to the base method %0 of type %0",
256252
(ValueDecl *, ValueDecl *))

lib/ClangImporter/ImportDecl.cpp

Lines changed: 39 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,22 +2192,12 @@ namespace {
21922192
Impl.ImportedDecls[{decl->getCanonicalDecl(), getVersion()}] = result;
21932193

21942194
if (recordHasMoveOnlySemantics(decl)) {
2195-
if (Impl.isCxxInteropCompatVersionAtLeast(6)) {
2196-
if (decl->isInStdNamespace() && decl->getName() == "promise") {
2197-
// Do not import std::promise.
2198-
return nullptr;
2199-
}
2200-
result->getAttrs().add(new (Impl.SwiftContext)
2201-
MoveOnlyAttr(/*Implicit=*/true));
2202-
} else {
2203-
Impl.addImportDiagnostic(
2204-
decl,
2205-
Diagnostic(
2206-
diag::move_only_requires_move_only,
2207-
Impl.SwiftContext.AllocateCopy(decl->getNameAsString())),
2208-
decl->getLocation());
2195+
if (decl->isInStdNamespace() && decl->getName() == "promise") {
2196+
// Do not import std::promise.
22092197
return nullptr;
22102198
}
2199+
result->getAttrs().add(new (Impl.SwiftContext)
2200+
MoveOnlyAttr(/*Implicit=*/true));
22112201
}
22122202

22132203
// FIXME: Figure out what to do with superclasses in C++. One possible
@@ -2666,8 +2656,7 @@ namespace {
26662656
// SemaLookup.cpp).
26672657
if (!decl->isBeingDefined() && !decl->isDependentContext() &&
26682658
areRecordFieldsComplete(decl)) {
2669-
if (decl->hasInheritedConstructor() &&
2670-
Impl.isCxxInteropCompatVersionAtLeast(6)) {
2659+
if (decl->hasInheritedConstructor()) {
26712660
for (auto member : decl->decls()) {
26722661
if (auto usingDecl = dyn_cast<clang::UsingDecl>(member)) {
26732662
for (auto usingShadowDecl : usingDecl->shadows()) {
@@ -2838,14 +2827,12 @@ namespace {
28382827
void
28392828
addExplicitProtocolConformances(NominalTypeDecl *decl,
28402829
const clang::CXXRecordDecl *clangDecl) {
2841-
if (Impl.isCxxInteropCompatVersionAtLeast(6)) {
2842-
// Propagate conforms_to attribute from public base classes.
2843-
for (auto base : clangDecl->bases()) {
2844-
if (base.getAccessSpecifier() != clang::AccessSpecifier::AS_public)
2845-
continue;
2846-
if (auto *baseClangDecl = base.getType()->getAsCXXRecordDecl())
2847-
addExplicitProtocolConformances(decl, baseClangDecl);
2848-
}
2830+
// Propagate conforms_to attribute from public base classes.
2831+
for (auto base : clangDecl->bases()) {
2832+
if (base.getAccessSpecifier() != clang::AccessSpecifier::AS_public)
2833+
continue;
2834+
if (auto *baseClangDecl = base.getType()->getAsCXXRecordDecl())
2835+
addExplicitProtocolConformances(decl, baseClangDecl);
28492836
}
28502837

28512838
if (!clangDecl->hasAttrs())
@@ -3763,39 +3750,34 @@ namespace {
37633750

37643751
if (decl->isVirtual()) {
37653752
if (auto funcDecl = dyn_cast_or_null<FuncDecl>(method)) {
3766-
if (Impl.isCxxInteropCompatVersionAtLeast(6)) {
3767-
if (auto structDecl =
3768-
dyn_cast_or_null<StructDecl>(method->getDeclContext())) {
3769-
// If this is a method of a Swift struct, any possible override of
3770-
// this method would get sliced away, and an invocation would get
3771-
// dispatched statically. This is fine because it matches the C++
3772-
// behavior.
3773-
if (decl->isPure()) {
3774-
// If this is a pure virtual method, we won't have any
3775-
// implementation of it to invoke.
3776-
Impl.markUnavailable(
3777-
funcDecl, "virtual function is not available in Swift "
3778-
"because it is pure");
3779-
}
3780-
} else if (auto classDecl = dyn_cast_or_null<ClassDecl>(
3781-
funcDecl->getDeclContext())) {
3782-
// This is a foreign reference type. Since `class T` on the Swift
3783-
// side is mapped from `T*` on the C++ side, an invocation of a
3784-
// virtual method `t->method()` should get dispatched dynamically.
3785-
// Create a thunk that will perform dynamic dispatch.
3786-
// TODO: we don't have to import the actual `method` in this case,
3787-
// we can just synthesize a thunk and import that instead.
3788-
auto result = synthesizer.makeVirtualMethod(decl);
3789-
if (result) {
3790-
return result;
3791-
} else {
3792-
Impl.markUnavailable(
3793-
funcDecl, "virtual function is not available in Swift");
3794-
}
3753+
if (auto structDecl =
3754+
dyn_cast_or_null<StructDecl>(method->getDeclContext())) {
3755+
// If this is a method of a Swift struct, any possible override of
3756+
// this method would get sliced away, and an invocation would get
3757+
// dispatched statically. This is fine because it matches the C++
3758+
// behavior.
3759+
if (decl->isPure()) {
3760+
// If this is a pure virtual method, we won't have any
3761+
// implementation of it to invoke.
3762+
Impl.markUnavailable(funcDecl,
3763+
"virtual function is not available in Swift "
3764+
"because it is pure");
3765+
}
3766+
} else if (auto classDecl = dyn_cast_or_null<ClassDecl>(
3767+
funcDecl->getDeclContext())) {
3768+
// This is a foreign reference type. Since `class T` on the Swift
3769+
// side is mapped from `T*` on the C++ side, an invocation of a
3770+
// virtual method `t->method()` should get dispatched dynamically.
3771+
// Create a thunk that will perform dynamic dispatch.
3772+
// TODO: we don't have to import the actual `method` in this case,
3773+
// we can just synthesize a thunk and import that instead.
3774+
auto result = synthesizer.makeVirtualMethod(decl);
3775+
if (result) {
3776+
return result;
3777+
} else {
3778+
Impl.markUnavailable(
3779+
funcDecl, "virtual function is not available in Swift");
37953780
}
3796-
} else {
3797-
Impl.markUnavailable(
3798-
funcDecl, "virtual functions are not yet available in Swift");
37993781
}
38003782
}
38013783
}
@@ -4053,8 +4035,7 @@ namespace {
40534035
// 1. Types
40544036
// 2. C++ methods from privately inherited base classes
40554037
if (!isa<clang::TypeDecl>(decl->getTargetDecl()) &&
4056-
!(isa<clang::CXXMethodDecl>(decl->getTargetDecl()) &&
4057-
Impl.isCxxInteropCompatVersionAtLeast(6)))
4038+
!isa<clang::CXXMethodDecl>(decl->getTargetDecl()))
40584039
return nullptr;
40594040
// Constructors (e.g. `using BaseClass::BaseClass`) are handled in
40604041
// VisitCXXRecordDecl, since we need them to determine whether a struct

lib/ClangImporter/ImportType.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,6 @@ static ParamDecl *getParameterInfo(ClangImporter::Implementation *impl,
26232623
// (https://github.com/apple/swift/issues/70124)
26242624
if (param->hasDefaultArg() && !isInOut &&
26252625
!isa<clang::CXXConstructorDecl>(param->getDeclContext()) &&
2626-
impl->isCxxInteropCompatVersionAtLeast(6) &&
26272626
impl->isDefaultArgSafeToImport(param)) {
26282627
SwiftDeclSynthesizer synthesizer(*impl);
26292628
if (CallExpr *defaultArgExpr = synthesizer.makeDefaultArgument(

test/Interop/Cxx/class/conforms-to.swift

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// RUN: %target-swift-frontend %S/Inputs/conforms-to-imported.swift -module-name ImportedModule -emit-module -emit-module-path %t/ImportedModule.swiftmodule
33

44
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -enable-experimental-cxx-interop
5-
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -cxx-interoperability-mode=swift-6 -D UPCOMING_SWIFT
6-
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -cxx-interoperability-mode=upcoming-swift -D UPCOMING_SWIFT
5+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -cxx-interoperability-mode=swift-5.9
6+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -cxx-interoperability-mode=swift-6
7+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %t -I %S/Inputs -module-name SwiftTest -cxx-interoperability-mode=upcoming-swift
78

89
import ConformsTo
910
import ImportedModule
@@ -23,11 +24,9 @@ func callee(_ _: Testable) {
2324
func caller(_ x: HasTest) {
2425
callee(x)
2526
}
26-
#if UPCOMING_SWIFT
2727
func caller(_ x: DerivedFromHasTest) { callee(x) }
2828
func caller(_ x: DerivedFromDerivedFromHasTest) { callee(x) }
2929
func caller(_ x: DerivedFromDerivedFromHasTestWithDuplicateArg) { callee(x) }
30-
#endif
3130

3231
func callee(_ _: Playable) {
3332

@@ -36,7 +35,6 @@ func callee(_ _: Playable) {
3635
func caller(_ x: Playable) {
3736
callee(x)
3837
}
39-
#if UPCOMING_SWIFT
4038
func caller(_ x: DerivedFromHasPlay) { callee(x) }
4139
func caller(_ x: DerivedFromDerivedFromHasPlay) { callee(x) }
4240

@@ -48,15 +46,12 @@ func caller(_ x: DerivedFromHasTestAndPlay) {
4846
callee(x as Testable)
4947
callee(x as Playable)
5048
}
51-
#endif
5249

5350
func callee(_ _: ProtocolFromImportedModule) {
5451
}
5552

5653
func caller(_ x: HasImportedConf) {
5754
callee(x)
5855
}
59-
#if UPCOMING_SWIFT
6056
func caller(_ x: DerivedFromHasImportedConf) { callee(x) }
6157
func caller(_ x: DerivedFromDerivedFromHasImportedConf) { callee(x) }
62-
#endif

test/Interop/Cxx/class/inheritance/using-base-members-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-5.9
12
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-6
23
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
34

test/Interop/Cxx/class/inheritance/using-base-members.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs/ -Xfrontend -cxx-interoperability-mode=upcoming-swift)
34
//

test/Interop/Cxx/class/inheritance/virtual-methods-irgen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-emit-ir -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
2+
// RUN: %target-swift-emit-ir -I %S/Inputs -cxx-interoperability-mode=swift-5.9 %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
23
// RUN: %target-swift-emit-ir -I %S/Inputs -cxx-interoperability-mode=swift-6 %s -validate-tbd-against-ir=none -Xcc -fignore-exceptions | %FileCheck %s
34

45
import VirtualMethods

test/Interop/Cxx/class/inheritance/virtual-methods-module-interface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-swift-ide-test -print-module -cxx-interoperability-mode=swift-5.9 -print-implicit-attrs -module-to-print=VirtualMethods -I %S/Inputs -source-filename=x | %FileCheck %s
12
// RUN: %target-swift-ide-test -print-module -cxx-interoperability-mode=swift-6 -print-implicit-attrs -module-to-print=VirtualMethods -I %S/Inputs -source-filename=x | %FileCheck %s
23
// RUN: %target-swift-ide-test -print-module -cxx-interoperability-mode=upcoming-swift -print-implicit-attrs -module-to-print=VirtualMethods -I %S/Inputs -source-filename=x | %FileCheck %s
34

test/Interop/Cxx/class/inheritance/virtual-methods-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
2+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-5.9
23
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-6
34

45
import VirtualMethods

test/Interop/Cxx/class/inheritance/virtual-methods.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift)
34

test/Interop/Cxx/class/move-only/move-only-cxx-value-type.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift)
22
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
3+
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9 -O)
34
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O)
45
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
56

test/Interop/Cxx/class/protocol-conformance-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Tests that a C++ class can conform to a Swift protocol.
22

33
// RUN: %target-typecheck-verify-swift -I %S/Inputs -enable-experimental-cxx-interop
4+
// RUN: %target-typecheck-verify-swift -I %S/Inputs -D VIRTUAL_METHODS -cxx-interoperability-mode=swift-5.9
45
// RUN: %target-typecheck-verify-swift -I %S/Inputs -D VIRTUAL_METHODS -cxx-interoperability-mode=swift-6
56
// RUN: %target-typecheck-verify-swift -I %S/Inputs -D VIRTUAL_METHODS -cxx-interoperability-mode=upcoming-swift
67

test/Interop/Cxx/class/type-classification-module-interface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-swift-ide-test -print-module -module-to-print=TypeClassification -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-5.9 | %FileCheck %s
12
// RUN: %target-swift-ide-test -print-module -module-to-print=TypeClassification -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-6 | %FileCheck %s
23
// RUN: %target-swift-ide-test -print-module -module-to-print=TypeClassification -I %S/Inputs -source-filename=x -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
34
// RUN: %target-swift-ide-test -print-module -skip-unsafe-cxx-methods -module-to-print=TypeClassification -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-6 | %FileCheck %s -check-prefix=CHECK-SKIP-UNSAFE

test/Interop/Cxx/class/type-classification-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-5.9
12
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-6
23
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
34

test/Interop/Cxx/function/default-arguments-irgen.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=swift-5.9 %s | %FileCheck %s
12
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=swift-6 %s | %FileCheck %s
23
// RUN: %target-swift-emit-irgen -I %S/Inputs -cxx-interoperability-mode=upcoming-swift %s | %FileCheck %s
34

test/Interop/Cxx/function/default-arguments-module-interface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-swift-ide-test -print-module -module-to-print=DefaultArguments -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-5.9 | %FileCheck %s
12
// RUN: %target-swift-ide-test -print-module -module-to-print=DefaultArguments -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-6 | %FileCheck %s
23
// RUN: %target-swift-ide-test -print-module -module-to-print=DefaultArguments -I %S/Inputs -source-filename=x -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
34

test/Interop/Cxx/function/default-arguments-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-5.9
12
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=swift-6
23
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
34

test/Interop/Cxx/operators/member-inline-module-interface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-swift-ide-test -print-module -module-to-print=MemberInline -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-5.9 | %FileCheck %s
12
// RUN: %target-swift-ide-test -print-module -module-to-print=MemberInline -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-6 | %FileCheck %s
23
// RUN: %target-swift-ide-test -print-module -module-to-print=MemberInline -I %S/Inputs -source-filename=x -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
34

test/Interop/Cxx/operators/member-inline-typechecker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-5.9
12
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-6
23
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=upcoming-swift
34

test/Interop/Cxx/operators/member-inline.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=upcoming-swift)
34
//

test/Interop/Cxx/operators/move-only/move-only-synthesized-properties.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift)
34
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)
5+
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-5.9 -O)
46
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=swift-6 -O)
57
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O)
68
// RUN: %target-run-simple-swift(-I %S/Inputs/ -cxx-interoperability-mode=upcoming-swift -O -enable-experimental-feature NoncopyableGenerics -D HAS_NONCOPYABLE_GENERICS)

test/Interop/Cxx/operators/move-only/move-only-synthesized-property-typecheck.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-5.9 -DNO_CONSUME
12
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=swift-6 -DNO_CONSUME
23
// RUN: %target-typecheck-verify-swift -I %S/Inputs -cxx-interoperability-mode=upcoming-swift -DNO_CONSUME
34

test/Interop/Cxx/stdlib/use-std-chrono.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift)
34
// RUN: %target-run-simple-swift(-I %S/Inputs -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++14)

test/Interop/Cxx/stdlib/use-std-optional.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=swift-5.9)
12
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=swift-6)
23
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=upcoming-swift)
34
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -cxx-interoperability-mode=upcoming-swift -Xcc -std=c++20)

0 commit comments

Comments
 (0)