summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineDominators.cpp
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2019-03-15 20:25:49 +0000
committerBrian Gesiak <modocache@gmail.com>2019-03-15 20:25:49 +0000
commit9db9b1a17501c000c1ac085006448156130cff83 (patch)
treedddd382710cb8c5befbdfbbf08fa18bc658b2a09 /llvm/lib/CodeGen/MachineDominators.cpp
parent0bb9b5b481b7608a32835d0e1ff3240063383235 (diff)
downloadbcm5719-llvm-9db9b1a17501c000c1ac085006448156130cff83.tar.gz
bcm5719-llvm-9db9b1a17501c000c1ac085006448156130cff83.zip
[coroutines][PR40978] Emit error for co_yield within catch block
Summary: As reported in https://bugs.llvm.org/show_bug.cgi?id=40978, it's an error to use the `co_yield` or `co_await` keywords outside of a valid "suspension context" as defined by [expr.await]p2 of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4775.pdf. Whether or not the current scope was in a function-try-block's (https://en.cppreference.com/w/cpp/language/function-try-block) handler could be determined using scope flag `Scope::FnTryCatchScope`. No such flag existed for a simple C++ catch statement, so this commit adds one. Reviewers: GorNishanov, tks2103, rsmith Reviewed By: GorNishanov Subscribers: EricWF, jdoerfert, cfe-commits, lewissbaker Tags: #clang Differential Revision: https://reviews.llvm.org/D59076 llvm-svn: 356296
Diffstat (limited to 'llvm/lib/CodeGen/MachineDominators.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud