================ @@ -11220,6 +11220,11 @@ class Sema final { VarDecl *buildCoroutinePromise(SourceLocation Loc); void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body); + // Heuristically tells if the function is get_return_object by matching ---------------- ilya-biryukov wrote:
I think it's useful to mention that `get_return_object` is coming from the coroutine's `promise_type` as defined by the C++ standard. (I think it might not be obvious). Also, could we change the name to something like `CanBeReturnObject` to clearly indicate it's a heuristic to the users. https://github.com/llvm/llvm-project/pull/77066 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits