Oliver Stöneberg

Results 1147 comments of Oliver Stöneberg

Pulled out of #6089 as per https://github.com/danmar/cppcheck/pull/6089#discussion_r1520521540.

Feel free to open your own PR in favor of this. The individual validate functions should be made private. This was added in d45f5c94cba8c58a9107ae3ffe8ad72fc83d8792 over 8(!!!) years ago and was...

> I think the impact on performance should be negligible (linear in the number of variables). As this is in the Tokenizer we might not need to explicitly profile at...

I am still seeing a crash with this trace. Will investigate later.

```cpp i a;u n(;a[]),n(){a[]=0} ``` ``` /home/user/CLionProjects/cppcheck-rider/lib/checkautovariables.cpp:61:105: runtime error: member access within null pointer of type 'const Scope' #0 0x5cd9c01906fb in isArrayArg(Token const*, Settings const*) /home/user/CLionProjects/cppcheck-rider/lib/checkautovariables.cpp:61:105 #1 0x5cd9c018d8f4 in CheckAutoVariables::autoVariables()...

Closing again - this time in favor of #6197.

As usual - please add a unit test for this. This looks related to #5411 which I still need to finish up. Also didn't we already add such code? I...

This is okay as a catch-all to avoid the crashes (which is the most important in the short-term) but I still think it should be caught earlier. This needs a...