The new performance constraints attributes ([[clang::nonallocating]] and stricter) should detect and warn about coroutines being called from a nonallocating context.
CC @dougsonos (I can't assign you because you aren't a member, but consider yourself "assigned")
C++20 coroutines allocate when beginning execution (source: [Coroutines (C++20) - cppreference.com](https://en.cppreference.com/w/cpp/language/coroutines))
>the coroutine state, which is internal, dynamically-allocated storage (unless the allocation is optimized out) …
>…
>When a coroutine begins execution, it performs the following:
>[allocates](https://en.cppreference.com/w/cpp/language/coroutines#Dynamic_allocation) the coroutine state object using [operator new](https://en.cppreference.com/w/cpp/memory/new/operator_new).
The new performance constraints attributes ([[clang::nonallocating]] and stricter) should detect and warn about coroutines being called from a nonallocating context.
CC @dougsonos (I can't assign you because you aren't a member, but consider yourself "assigned")
C++20 coroutines allocate when beginning execution (source: Coroutines (C++20) - cppreference.com)
The new performance constraints attributes ([[clang::nonallocating]] and stricter) should detect and warn about coroutines being called from a nonallocating context.
CC @dougsonos (I can't assign you because you aren't a member, but consider yourself "assigned")