Oliver Stöneberg
Oliver Stöneberg
Requires https://github.com/danmar/simplecpp/issues/556 to be fixed first and a new simplecpp release.
"impossible" lookups with no exprid will be dealt with in a different PR.
It appears to not have much impact on performance but it gets rid of the `at()` which has irked me for quite a while.
Should be done but I am seeing slightly less executions when profiling this, which should not be happening since it does not functionally change. So still needs looking into.
> Should be done but I am seeing slightly less executions when profiling this, which should not be happening since it does not functionally change. So still needs looking into....
> There is indeed a behavior change introduced by this - #7800 surfaced a difference the tests did not catch: I missed that `getValue()` does not return impossible values by...
> I missed that `getValue()` does not return impossible values by default where `hasValue()` and `at()` do. I consistently added a parameter to the getter (even though they might not...
> > Should be done but I am seeing slightly less executions when profiling this, which should not be happening since it does not functionally change. So still needs looking...
``` /home/runner/work/cppcheck/cppcheck/lib/checkclass.cpp:3189:9: error: redundant parentheses around expression [readability-redundant-parentheses,-warnings-as-errors] 3189 | if ((true) || !mSettings->severity.isEnabled(Severity::warning)) // NOLINT(readability-simplify-boolean-expr) | ^ ~ ``` I filed https://github.com/llvm/llvm-project/issues/162899 about that.
I assume this is also related to the wrong compiler being chosen in current runners. I hope it doesn't deteriorate even more over time...