Skip to content

For loops with variable declaration messes up token input/output positions #3

@mstorsjo

Description

@mstorsjo

This input gets converted incorrectly
int main () { for( int i = 0; i < 9; i++ ); return 0; }
into this:
int main () { { int i = 0; for( ; i < 9; i++ ); }return0; }

The token input/output positions need to be updated correctly.. somewhere.., so we produce enough whitespace between "return0;". I added a test case for it in a branch in my repo as well: mstorsjo@for-loop-test

This exact piece of code is used in x264's configure script for testing for the C99 features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions