cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

refs #13698 - Library: avoid impossible type lookups

Open firewave opened this issue 10 months ago • 3 comments

firewave avatar Mar 13 '25 07:03 firewave

Okay - this appears to be quite a mess (surprise, surprise).

The function declaration stuff has lots of other cases. And I am also seeing function calls getting through which do not seem to be recognized as such.

firewave avatar Mar 13 '25 09:03 firewave

And I am also seeing function calls getting through which do not seem to be recognized as such.

I wonder if that is a chicken/egg issue. In the --dump output it is associated with a function but in the lookup it isn't. I guess because that relation has not yet been established at that point.

Maybe those type lookups need to be deferred?

firewave avatar Mar 13 '25 09:03 firewave

I think we can reorder the if-chain in parsedecl() to move up some checks to improve things.

firewave avatar Mar 13 '25 10:03 firewave

Closing as there is not much of value left here.

firewave avatar Sep 15 '25 18:09 firewave