Fix 13930: False positive: valueflow and other variable by pfultz2 · Pull Request #7827 · cppcheck-opensource/cppcheck
Seems to have no performance impact.
Differences from #7800:
Details
--- selfcheck.exp 2025-09-16 19:07:40.536686518 +0200 +++ selfcheck.res 2025-09-16 19:10:17.478078548 +0200 @@ -12375,15 +12375,15 @@ = always 0 0 always 0 Line 1366 - ch possible {symbolic=(next),symbolic=(end),0,62@103} + ch possible {symbolic=(next),symbolic=(end),0,92,62@103} != {!<=-1,!>=2,0} end possible {symbolic=(ch),62@103} && {!<=-1,!>=2,0} - ch {!symbolic=(end),0} + ch {!symbolic=(end),0,92} != {!<=-1,!>=2,1} '\r' always 13 && {!<=-1,!>=2,0} - ch {!symbolic=(end),0,!13} + ch {!symbolic=(end),0,!13,92} != {!<=-1,!>=2,1} '\n' always 10 && {!<=-1,!>=2,0} @@ -13626,6 +13626,8 @@ tok2 possible symbolic=(tok->next) Line 2108 true always 1 +Line 2109 + . possible symbolic=(tok2) Line 2112 & {lifetime[Address]=(temp),!0} Line 2113 @@ -15074,7 +15076,7 @@ Line 2872 "code point too large" always "code point too large" Line 2876 - narrow always {!<=-1,!>=2} + narrow {!<=-1,!>=2,0} || always {!<=-1,!>=2} utf8 always {!<=-1,!>=2} && always {!<=-1,!>=2}
The change on Line 2109 seems suspect. I only realize that because I had the same diff with an unintentional issue I temporally introduced in another PR - see #7768 (comment).