cppcheck/addons/test/misra/misra-test.cpp
versat 0dd180d5a2 misra-test.cpp: Remove redundant unused function argument
The unused argument causes the new check for rule 2.7 to output an error
here.
I verified that the regression test still works without the unused
argument (misra.py would still crash).
Travis should be happy again.
2019-11-18 15:57:53 +01:00

18 lines
242 B
C++

// #8441
class C {
int a;
int b;
C() : a(1), b(1) { c; }
};
class misra_21_1_C {
public:
misra_21_1_C operator=(const misra_21_1_C &);
};
static bool test_misra_21_1_crash()
{
auto misra_21_1_C a, b;
a = b;
}