-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix 13930: False positive: valueflow and other variable #7827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Seems to have no performance impact. Differences from #7800: --- 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). |
@chrchr-github @danmar @orbitcowboy Can this be merged? |
copyOnWrite(); | ||
|
||
for (auto&& p : (*pm.mValues)) { | ||
if (skipUnknown) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called skipUnknown
? It seems to skip uninit values.
for (const auto& p : pm) | ||
origins[p.first.getExpressionId()] = origin; | ||
state.replace(std::move(pm)); | ||
state.replace(std::move(pm), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the parameter name: /*param*/ true
No description provided.