Skip to content

Commit ee50057

Browse files
committed
Re-fix clang_only test case edits that were somehow lost overnight
1 parent 2e88e74 commit ee50057

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

test/test_cpp20/clang_only.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@ using namespace winrt;
77
using namespace Windows::Foundation;
88
using namespace Windows::Storage::Pickers;
99

10-
// winrt::fire_and_forget PickImage()
11-
// {
12-
// FileOpenPicker picker{};
13-
// picker.ViewMode(PickerViewMode::Thumbnail);
14-
// picker.FileTypeFilter().Append(L".png"); // <--- crash occurred here
15-
// }
16-
17-
TEST_CASE("clang_library")
10+
TEST_CASE("clang_lto_visibility")
1811
{
19-
// PickImage();
20-
12+
// A previous bug report (https://github.com/microsoft/cppwinrt/pull/1482) represented a problem when some linker
13+
// options (-O3 -flto -fwhole-program-vtables) were used with cppwinrt generated code. The lack of public annotation
14+
// caused methods to be removed from the binary, leading to a crash. This test case aims to be a regression test for
15+
// that problem.
2116
FileOpenPicker picker{};
2217
picker.ViewMode(PickerViewMode::Thumbnail);
23-
picker.FileTypeFilter().Append(L".png"); // <--- crash occurred here
18+
picker.FileTypeFilter().Append(L".png"); // This line would trigger the crash.
2419

2520
REQUIRE(true);
2621
}

0 commit comments

Comments
 (0)