This is an archive of the discontinued LLVM Phabricator instance.

[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 Timeline

EricWF updated this revision to Diff 73710.Oct 5 2016, 4:31 PM
EricWF retitled this revision from to [Coroutines] Fix co_return statement for initializer list arguments.
EricWF updated this object.
EricWF added reviewers: rsmith, GorNishanov.
EricWF added a subscriber: cfe-commits.
GorNishanov 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
GorNishanov edited edge metadata.Oct 6 2016, 10:11 AM

LGTM, but, I cannot approve clang patches. Let's wait on @rsmith to give the go ahead.

rsmith accepted this revision.Oct 6 2016, 10:14 AM
rsmith edited edge metadata.
This revision is now accepted and ready to land.Oct 6 2016, 10:14 AM
EricWF closed this revision.Oct 6 2016, 2:32 PM