Skip to content

Commit 526d72a

Browse files
authored
Fix invoke call on Clang (possibly a compiler bug) (#1225)
1 parent 5db060e commit 526d72a

File tree

3 files changed

+2
-42
lines changed

3 files changed

+2
-42
lines changed

strings/base_coroutine_foundation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ namespace winrt::impl
414414

415415
if (handler)
416416
{
417-
invoke(handler, *this, status);
417+
winrt::impl::invoke(handler, *this, status);
418418
}
419419
}
420420

@@ -539,7 +539,7 @@ namespace winrt::impl
539539

540540
if (handler)
541541
{
542-
invoke(handler, *this, status);
542+
winrt::impl::invoke(handler, *this, status);
543543
}
544544
}
545545

test/test/disconnected.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ TEST_CASE("disconnected,handler,1")
7878
source(nullptr, 123);
7979
}
8080

81-
#if defined(__clang__)
82-
// FIXME: Test is known to fail with unhandled exception when built with Clang.
83-
TEST_CASE("disconnected,handler,2", "[!shouldfail]")
84-
#else
8581
TEST_CASE("disconnected,handler,2")
86-
#endif
8782
{
8883
auto async = Action();
8984

@@ -93,12 +88,7 @@ TEST_CASE("disconnected,handler,2")
9388
});
9489
}
9590

96-
#if defined(__clang__)
97-
// FIXME: Test is known to abort when built with Clang. (Seems to be from unhandled exception thrown on a worker thread.)
98-
TEST_CASE("disconnected,handler,3", "[.clang-crash]")
99-
#else
10091
TEST_CASE("disconnected,handler,3")
101-
#endif
10292
{
10393
auto async = ActionProgress();
10494
handle signal{ CreateEventW(nullptr, true, false, nullptr) };
@@ -117,12 +107,7 @@ TEST_CASE("disconnected,handler,3")
117107
WaitForSingleObject(signal.get(), INFINITE);
118108
}
119109

120-
#if defined(__clang__)
121-
// FIXME: Test is known to fail with unhandled exception when built with Clang.
122-
TEST_CASE("disconnected,handler,4", "[!shouldfail]")
123-
#else
124110
TEST_CASE("disconnected,handler,4")
125-
#endif
126111
{
127112
auto async = Operation();
128113

@@ -132,12 +117,7 @@ TEST_CASE("disconnected,handler,4")
132117
});
133118
}
134119

135-
#if defined(__clang__)
136-
// FIXME: Test is known to abort when built with Clang. (Seems to be from unhandled exception thrown on a worker thread.)
137-
TEST_CASE("disconnected,handler,5", "[.clang-crash]")
138-
#else
139120
TEST_CASE("disconnected,handler,5")
140-
#endif
141121
{
142122
auto async = OperationProgress();
143123
handle signal{ CreateEventW(nullptr, true, false, nullptr) };

test/test_win7/disconnected.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ TEST_CASE("disconnected,1")
6767
source(nullptr, 123);
6868
}
6969

70-
#if defined(__clang__)
71-
// FIXME: Test is known to fail with unhandled exception when built with Clang.
72-
TEST_CASE("disconnected,2", "[!shouldfail]")
73-
#else
7470
TEST_CASE("disconnected,2")
75-
#endif
7671
{
7772
auto async = Action();
7873

@@ -82,12 +77,7 @@ TEST_CASE("disconnected,2")
8277
});
8378
}
8479

85-
#if defined(__clang__)
86-
// FIXME: Test is known to abort when built with Clang. (Seems to be from unhandled exception thrown on a worker thread.)
87-
TEST_CASE("disconnected,3", "[.clang-crash]")
88-
#else
8980
TEST_CASE("disconnected,3")
90-
#endif
9181
{
9282
auto async = ActionProgress();
9383
handle signal{ CreateEventW(nullptr, true, false, nullptr) };
@@ -106,12 +96,7 @@ TEST_CASE("disconnected,3")
10696
WaitForSingleObject(signal.get(), INFINITE);
10797
}
10898

109-
#if defined(__clang__)
110-
// FIXME: Test is known to fail with unhandled exception when built with Clang.
111-
TEST_CASE("disconnected,4", "[!shouldfail]")
112-
#else
11399
TEST_CASE("disconnected,4")
114-
#endif
115100
{
116101
auto async = Operation();
117102

@@ -121,12 +106,7 @@ TEST_CASE("disconnected,4")
121106
});
122107
}
123108

124-
#if defined(__clang__)
125-
// FIXME: Test is known to abort when built with Clang. (Seems to be from unhandled exception thrown on a worker thread.)
126-
TEST_CASE("disconnected,5", "[.clang-crash]")
127-
#else
128109
TEST_CASE("disconnected,5")
129-
#endif
130110
{
131111
auto async = OperationProgress();
132112
handle signal{ CreateEventW(nullptr, true, false, nullptr) };

0 commit comments

Comments
 (0)