I have been able to reproduce an error happened in our company with this checker.
Using the online demo (https://cppcheck.sourceforge.io/demo/), for this code that declare the two nested structs A::Foo and B::Foo, cppcheck seems to be confused about the definition of Foo:
I have been able to reproduce an error happened in our company with this checker.
Using the online demo (https://cppcheck.sourceforge.io/demo/), for this code that declare the two nested structs A::Foo and B::Foo, cppcheck seems to be confused about the definition of Foo:
Yields:
I can't reproduce this with 2.15dev.
Weird... I was testing this privately in V2.14, and the online demo with this toy example is V2.10.
I will try to check this in a more updated version.
I also cannot reproduce it now