do not set values if there is no expression#7295
Conversation
|
All tests still pass with the early returns added. Example output: Looks like this is related to unnamed parameters. @pfultz2 please have a look. |
Sorry, something went wrong.
|
Happens with unnamed parameters when a function body exists: void cb(int) {}
void func()
{
cb(0);
}Naming the parameter fixes it: |
Sorry, something went wrong.
7920895 to
e22ec20
Compare
August 8, 2025 12:56
|
The |
Sorry, something went wrong.
64bdf89 to
6cd4d80
Compare
August 15, 2025 12:01
5bd5804 to
1569700
Compare
August 19, 2025 07:02
danmar
left a comment
There was a problem hiding this comment.
spontanously this sounds good to me.
what is the motivation?
is there speedup or change of results or simpler code?
Sorry, something went wrong.
I cannot remember how I came across this but I assume it was in the context of some of the other drafts PRs where I try to get rid of unnecessary calls. Depending on the code this might have performance implications as less values are being generated. |
Sorry, something went wrong.
828da56 to
cfb9e74
Compare
September 8, 2025 07:50
|
Sorry, something went wrong.
|
I tested it with #7800 and there were no differences in the output. |
Sorry, something went wrong.
a86640d
into
cppcheck-opensource:main
Sep 9, 2025



No description provided.