mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These tests are using FileCheck to check the result of diagnostic formatting in ways that don't match the new formatter. Force the old formatter or, where possible, generalize so that they match both formatters.
45 lines
1.3 KiB
Swift
45 lines
1.3 KiB
Swift
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: not %target-swift-frontend -typecheck -I %t/Inputs %t/test.swift -enable-experimental-cxx-interop -diagnostic-style llvm 2>&1 | %FileCheck %s
|
|
|
|
//--- Inputs/module.modulemap
|
|
module Test {
|
|
header "test.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
//--- Inputs/test.h
|
|
struct A {
|
|
A(const A&) = delete;
|
|
};
|
|
|
|
struct __attribute__((swift_attr("import_unsafe"))) B {
|
|
B(const B&) = delete;
|
|
};
|
|
|
|
namespace Namespace {
|
|
struct Nested {
|
|
Nested(const Nested&) = delete;
|
|
};
|
|
}
|
|
|
|
//--- test.swift
|
|
|
|
import Test
|
|
|
|
// CHECK: note: record 'A' is not automatically available: does not have a copy constructor or destructor; does this type have reference semantics?
|
|
// CHECK: struct A {
|
|
// CHECK: ^
|
|
// CHECK: SWIFT_SHARED_REFERENCE(<#retain#>, <#release#>)
|
|
public func test(x: A) { }
|
|
// CHECK: note: record 'B' is not automatically available: does not have a copy constructor or destructor; does this type have reference semantics?
|
|
// CHECK: struct {{.*}}B {
|
|
// CHECK: ^
|
|
// CHECK: SWIFT_SHARED_REFERENCE(<#retain#>, <#release#>)
|
|
public func test(x: B) { }
|
|
// CHECK: note: record 'Nested' is not automatically available: does not have a copy constructor or destructor; does this type have reference semantics?
|
|
// CHECK: struct Nested {
|
|
// CHECK: ^
|
|
// CHECK: SWIFT_SHARED_REFERENCE(<#retain#>, <#release#>)
|
|
public func test(x: Namespace.Nested) { }
|