Previously the statement co_return {42} would be transformed into P.return_void(), since the type of {42} is represented as void by Clang.
This patch fixes the bug by checking for InitListExpr arguments and transforming them accordingly.
Paths
| Differential D25296
[coroutines] Fix co_return statement for initializer list arguments ClosedPublic Authored by EricWF on Oct 5 2016, 4:31 PM.
Details Summary Previously the statement co_return {42} would be transformed into P.return_void(), since the type of {42} is represented as void by Clang. This patch fixes the bug by checking for InitListExpr arguments and transforming them accordingly.
Diff Detail Event TimelineGorNishanov retitled this revision from [Coroutines] Fix co_return statement for initializer list arguments to [coroutines] Fix co_return statement for initializer list arguments.Oct 5 2016, 5:04 PM Comment Actions LGTM, but, I cannot approve clang patches. Let's wait on @rsmith to give the go ahead. This revision is now accepted and ready to land.Oct 6 2016, 10:14 AM
Revision Contents
Diff 73710 lib/Sema/SemaCoroutine.cpp
test/SemaCXX/coroutines.cpp
|