Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions test/Interop/Cxx/class/nonescapable-lifetimebound.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ struct SWIFT_NONESCAPABLE View {
View() : member(nullptr) {}
View(const int *p [[clang::lifetimebound]]) : member(p) {}
View(const View&) = default;
private:
const int *member;
friend struct OtherView;
};

struct SWIFT_NONESCAPABLE OtherView {
OtherView() : member(nullptr) {}
OtherView(View v [[clang::lifetimebound]]) : member(v.member) {}
OtherView(const OtherView&) = default;
private:
const int *member;
};
Expand Down Expand Up @@ -77,15 +68,14 @@ private:
const int *member;
};

// CHECK: sil [clang makeOwner] {{.*}} : $@convention(c) () -> Owner
// CHECK: sil [clang makeOwner] {{.*}}: $@convention(c) () -> Owner
// CHECK: sil [clang getView] {{.*}} : $@convention(c) (@in_guaranteed Owner) -> _scope(0) @autoreleased View
// CHECK: sil [clang getViewFromFirst] {{.*}} : $@convention(c) (@in_guaranteed Owner, @in_guaranteed Owner) -> _scope(0) @autoreleased View
// CHECK: sil [clang getViewFromEither] {{.*}} : $@convention(c) (@in_guaranteed Owner, @in_guaranteed Owner) -> _scope(0, 1) @autoreleased View
// CHECK: sil [clang Owner.handOutView] {{.*}} : $@convention(cxx_method) (@in_guaranteed Owner) -> _scope(0) @autoreleased View
// CHECK: sil [clang Owner.handOutView2] {{.*}} : $@convention(cxx_method) (View, @in_guaranteed Owner) -> _scope(1) @autoreleased View
// CHECK: sil [clang getViewFromEither] {{.*}} : $@convention(c) (@guaranteed View, @guaranteed View) -> _inherit(0, 1) @autoreleased View
// CHECK: sil [clang View.init] {{.*}} : $@convention(c) () -> @out View
// CHECK: sil [clang OtherView.init] {{.*}} : $@convention(c) (@guaranteed View) -> _inherit(0) @out OtherView

//--- test.swift

Expand All @@ -101,5 +91,4 @@ public func test() {
let _ = o.handOutView2(v1)
let _ = getViewFromEither(v1, v2)
let defaultView = View()
let _ = OtherView(defaultView)
}