Skip to content

Commit fb177b7

Browse files
committed
update diagnostics in clang importer
rdar://109281444 (cherry picked from commit 90077ab)
1 parent 63da65d commit fb177b7

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ ERROR(conforms_to_not_protocol,none,
248248
"%0 %1 referenced in protocol conformance '%2' is not a protocol", (DescriptiveDeclKind, ValueDecl *, StringRef))
249249

250250
ERROR(move_only_requires_move_only,none,
251-
"use of move-only C++ type '%0' requires -enable-experimental-move-only",
251+
"use of noncopyable C++ type '%0' requires -enable-experimental-move-only",
252252
(StringRef))
253253

254254
NOTE(unsupported_builtin_type, none, "built-in type '%0' not supported", (StringRef))

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ ERROR(expose_enum_case_tuple_to_cxx,none,
16971697
ERROR(expose_protocol_to_cxx_unsupported,none,
16981698
"protocol %0 can not yet be represented in C++", (ValueDecl *))
16991699
ERROR(expose_move_only_to_cxx,none,
1700-
"move-only %0 %1 can not yet be represented in C++", (DescriptiveDeclKind, ValueDecl *))
1700+
"noncopyable %0 %1 can not yet be represented in C++", (DescriptiveDeclKind, ValueDecl *))
17011701
ERROR(unexposed_other_decl_in_cxx,none,
17021702
"%0 %1 is not yet exposed to C++", (DescriptiveDeclKind, ValueDecl *))
17031703
ERROR(unsupported_other_decl_in_cxx,none,

test/Interop/SwiftToCxx/unsupported/unsupported-types-in-cxx.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ public func takesVoid(_ x: ()) {}
1212

1313
// CHECK: takeFloat
1414

15-
@_moveOnly
16-
public enum MoveOnlyEnum {
15+
public enum MoveOnlyEnum: ~Copyable {
1716
case a
1817
}
1918

20-
// CHECK: class MoveOnlyEnum { } SWIFT_UNAVAILABLE_MSG("move-only enum 'MoveOnlyEnum' can not yet be represented in C++");
19+
// CHECK: class MoveOnlyEnum { } SWIFT_UNAVAILABLE_MSG("noncopyable enum 'MoveOnlyEnum' can not yet be represented in C++");
2120

22-
@_moveOnly
23-
public struct MoveOnlyStruct {
21+
public struct MoveOnlyStruct: ~Copyable {
2422
let x: Int
2523
}
2624

27-
// CHECK: class MoveOnlyStruct { } SWIFT_UNAVAILABLE_MSG("move-only struct 'MoveOnlyStruct' can not yet be represented in C++");
25+
// CHECK: class MoveOnlyStruct { } SWIFT_UNAVAILABLE_MSG("noncopyable struct 'MoveOnlyStruct' can not yet be represented in C++");
2826

2927
public protocol TestProtocol {}
3028

0 commit comments

Comments
 (0)