[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)
Adrian Vogelsgesang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 13:39:14 PDT 2024
================
@@ -0,0 +1,84 @@
+// This file tests the coro_structured_concurrency attribute semantics.
+// RUN: %clang_cc1 -std=c++20 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
+
+#include "Inputs/coroutine.h"
+#include "Inputs/utility.h"
+
+template <typename T>
+struct [[clang::coro_structured_concurrency]] Task {
----------------
vogelsgesang wrote:
> through a handle you smuggled with the task, which this type does not allow to do
that's the point I am getting at. Most `task` types do not allow smuggling handles out of the wrappers types. As such, I expect that many task types would be annotated with both `coro_structured_concurrency` / `coro_inplace_task` and `coro_only_destroy_when_complete`. I guess we should have a test case that both attributes interact nicely with each other?
https://github.com/llvm/llvm-project/pull/94693
More information about the llvm-commits
mailing list