Skip to content

Commit 7576843

Browse files
committed
more cleanup
1 parent e2f0cef commit 7576843

File tree

1 file changed

+8
-9
lines changed
  • lib/ClangImporter/SwiftBridging/swift

1 file changed

+8
-9
lines changed

lib/ClangImporter/SwiftBridging/swift/bridging

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
/// automatic reference counting.
5252
///
5353
/// This example shows how to use this macro to let Swift know that
54-
/// a non-copyable reference counted C++ class can be imported as a reference counted type in Swift:
54+
/// a reference counted C++ class can be imported as a reference counted type in Swift:
5555
/// ```c++
56-
/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject) SWIFT_NONCOPYABLE
56+
/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject)
5757
/// SharedObject : IntrusiveReferenceCounted<SharedObject> {
5858
/// public:
5959
/// static SharedObject* create();
@@ -82,10 +82,9 @@
8282
/// type in Swift.
8383
////
8484
/// This example shows how to use this macro to let Swift know that
85-
/// a non-copyable singleton C++ class can be imported as a reference type in Swift:
85+
/// a singleton C++ class can be imported as a reference type in Swift:
8686
/// ```c++
87-
/// class SWIFT_IMMORTAL_REFERENCE SWIFT_NONCOPYABLE
88-
/// LoggerSingleton {
87+
/// class SWIFT_IMMORTAL_REFERENCE LoggerSingleton {
8988
/// public:
9089
/// static LoggerSingleton &getInstance();
9190
/// void log(int x);
@@ -100,16 +99,16 @@
10099
/// ```
101100
#define SWIFT_IMMORTAL_REFERENCE \
102101
__attribute__((swift_attr("import_reference"))) \
103-
__attribute__((swift_attr("retain:immortal")))) \
104-
__attribute__((swift_attr("release:immortal"))))
102+
__attribute__((swift_attr("retain:immortal"))) \
103+
__attribute__((swift_attr("release:immortal")))
105104

106105
/// Specifies that a `class` or `struct` is a reference type whose lifetime
107106
/// is not managed automatically. The programmer must validate that any reference
108107
/// to such object is valid themselves. This annotation lets Swift import such a type as a reference type in Swift.
109108
#define SWIFT_UNSAFE_REFERENCE \
110109
__attribute__((swift_attr("import_reference"))) \
111-
__attribute__((swift_attr("retain:immortal")))) \
112-
__attribute__((swift_attr("release:immortal")))) \
110+
__attribute__((swift_attr("retain:immortal"))) \
111+
__attribute__((swift_attr("release:immortal"))) \
113112
__attribute__((swift_attr("unsafe")))
114113

115114
/// Specifies a name that will be used in Swift for this declaration instead of its original name.

0 commit comments

Comments
 (0)