simplecpp
simplecpp copied to clipboard
simplecpp::TokenList::constFold does not fold '( 0 ) && 10 < X' properly
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.