[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 17 06:21:54 PST 2023


================
@@ -15811,6 +15813,20 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
           << FixItHint::CreateInsertion(P.first, "self->");
 }
 
+void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
+  if (!FD || getCurFunction()->isCoroutine())
----------------
usx95 wrote:

Moved `getCurFunction()` out and updated docs to say that it expects FD to be non-coroutine.

https://github.com/llvm/llvm-project/pull/71945


More information about the cfe-commits mailing list