New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate-c: Check for error before working on while loop body #1445

Merged
merged 3 commits into from Aug 31, 2018

Conversation

Projects
None yet
2 participants
@Hejsil
Member

Hejsil commented Aug 31, 2018

fixes #1428

@andrewrk

Looks good, merge at will

? trans_do_loop(c, scope, (const DoStmt *)stmt)
: trans_while_loop(c, scope, (const WhileStmt *)stmt);
if (while_node != nullptr) {

This comment has been minimized.

@andrewrk

andrewrk Aug 31, 2018

Member

I think it would be clearer like this:

if (while_node == nullptr)
    return ErrorUnexpected;

@Hejsil Hejsil merged commit e036f65 into master Aug 31, 2018

0 of 4 checks passed

continuous-integration/travis-ci/push The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@Hejsil Hejsil deleted the trans-c-check-while-error branch Aug 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment