$ cppcheck --debug-normal --enable=style --inconclusive test.cpp
Checking test.cpp ...
##file test.cpp
1: struct A {
2: int a ; a = 1 ;
3: void test ( ) { f (@7 0 , 0 ) ; }
4: void f<int> ( int x , int y ) ;
5: } ;
6:
7: int main ( ) {
8: A a@4 ;
9: a@4 .@8 f<int> (@9 0 , 0 ) ;
10: } void A :: f<int> ( int x , int y ) { a@1 = 2 ; }
##Value flow
Line 2
1 always 1
Line 3
0 always 0
0 always 0
Line 9
0 always 0
0 always 0
Line 4
2 always 2
test.cpp:3:10: performance:inconclusive: Technically the member function 'A::test' can be static (but you may consider moving to unnamed namespace). [functionStatic]
void test() { f(0, 0); }
^
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With 324e267:
I created this ticket: https://trac.cppcheck.net/ticket/9983