Skip to content

simplecpp::TokenList::constFold does not fold '( 0 ) && 10 < X' properly #404

@danmar

Description

@danmar

Test code:

    std::istringstream i("( 0 ) && 10 < X");
    simplecpp::TokenList tokenList(i, filenames);
    tokenList.constFold();
    tokenList.dump();

Output:

( 0 < X )

As 0 && expr is 0 I believe the output should just be 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions