simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

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

Open danmar opened this issue 11 months ago • 0 comments

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.

danmar avatar Jan 17 '25 15:01 danmar