[clang-tools-extra] [clang] [coroutines] Do not check coroutine wrappers for skipped function bodies (PR #76729)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 3 02:27:31 PST 2024
================
@@ -15845,7 +15845,7 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
}
void Sema::CheckCoroutineWrapper(FunctionDecl *FD) {
- if (!FD)
+ if (!FD || FD->hasSkippedBody())
----------------
usx95 wrote:
Moved the check to calling code. `CheckCompletedCoroutineBody` suffers from the same problem, i.e., use of `FSI->isCoroutine()` is invalid. So both coroutine related actions are now behind this check.
https://github.com/llvm/llvm-project/pull/76729
More information about the cfe-commits
mailing list