Here is an odd one: if there is a variadic function defined in a base class, cppcheck reports that a function calling it in a derived class could be static, albeit tagged as inconclusive:
class Base { int i{}; public: void foo(...) const { bar(); } // no warning without ... int bar() const { return i; } }; class Derived : public Base { public: void doIt() const { // performance:inconclusive: Technically the member function 'Derived::doIt' can be static foo(); } }; int main() { Derived d; d.doIt(); return 0; }
Thanks! There seems to be a parser problem. I created ticket https://trac.cppcheck.net/ticket/9885
Log in to post a comment.
Here is an odd one: if there is a variadic function defined in a base class, cppcheck reports that a function calling it in a derived class could be static, albeit tagged as inconclusive:
Thanks! There seems to be a parser problem. I created ticket https://trac.cppcheck.net/ticket/9885