Skip to content

Commit e45f671

Browse files
committed
Compatibility56: Suppress some -Wcast-function-type-mismatch warnings.
1 parent 58a97f1 commit e45f671

File tree

1 file changed

+6
-0
lines changed
  • stdlib/toolchain/Compatibility56/Concurrency

1 file changed

+6
-0
lines changed

stdlib/toolchain/Compatibility56/Concurrency/Task.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,11 @@ SWIFT_CC(swiftasync)
179179
static void task_wait_throwing_resume_adapter(SWIFT_ASYNC_CONTEXT AsyncContext *_context) {
180180

181181
auto context = static_cast<TaskFutureWaitAsyncContext *>(_context);
182+
#pragma clang diagnostic push
183+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
182184
auto resumeWithError =
183185
reinterpret_cast<AsyncVoidClosureEntryPoint *>(context->ResumeParent);
186+
#pragma clang diagnostic pop
184187
return resumeWithError(context->Parent, context->errorResult);
185188
}
186189

@@ -212,7 +215,10 @@ void SWIFT_CC(swiftasync) swift::swift56override_swift_task_future_wait_throwing
212215
waitingTask->ResumeTask = task_wait_throwing_resume_adapter;
213216
waitingTask->ResumeContext = callContext;
214217

218+
#pragma clang diagnostic push
219+
#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
215220
auto resumeFn = reinterpret_cast<TaskContinuationFunction *>(resumeFunction);
221+
#pragma clang diagnostic pop
216222

217223
// Wait on the future.
218224
assert(task->isFuture());

0 commit comments

Comments
 (0)