[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 6 23:02:47 PST 2019
EricWF added inline comments.
================
Comment at: lib/Sema/SemaCoroutine.cpp:675
+ // Second emphasis of [expr.await]p2: must be outside of an exception handler.
+ if (S.getCurScope()->getFlags() & Scope::CatchScope) {
+ S.Diag(Loc, diag::err_coroutine_within_handler) << Keyword;
----------------
We can still build a valid AST after encountering this error, no?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59076/new/
https://reviews.llvm.org/D59076
More information about the cfe-commits
mailing list