Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaCoroutine.cpp
Show First 20 Lines • Show All 637 Lines • ▼ Show 20 Lines | if (Suspend.isInvalid()) { | ||||
Diag(KWLoc, diag::note_declared_coroutine_here) << Keyword; | Diag(KWLoc, diag::note_declared_coroutine_here) << Keyword; | ||||
return StmtError(); | return StmtError(); | ||||
} | } | ||||
return cast<Stmt>(Suspend.get()); | return cast<Stmt>(Suspend.get()); | ||||
}; | }; | ||||
StmtResult InitSuspend = buildSuspends("initial_suspend"); | StmtResult InitSuspend = buildSuspends("initial_suspend"); | ||||
if (InitSuspend.isInvalid()) | if (InitSuspend.isInvalid()) | ||||
return true; | return false; | ||||
StmtResult FinalSuspend = buildSuspends("final_suspend"); | StmtResult FinalSuspend = buildSuspends("final_suspend"); | ||||
if (FinalSuspend.isInvalid()) | if (FinalSuspend.isInvalid()) | ||||
return true; | return false; | ||||
ScopeInfo->setCoroutineSuspends(InitSuspend.get(), FinalSuspend.get()); | ScopeInfo->setCoroutineSuspends(InitSuspend.get(), FinalSuspend.get()); | ||||
return true; | return true; | ||||
} | } | ||||
// Recursively walks up the scope hierarchy until either a 'catch' or a function | // Recursively walks up the scope hierarchy until either a 'catch' or a function | ||||
// scope is found, whichever comes first. | // scope is found, whichever comes first. | ||||
▲ Show 20 Lines • Show All 941 Lines • Show Last 20 Lines |