cppcheck/addons/test/misra/misra-test.cpp

26 lines
337 B
C++
Raw Permalink Normal View History

// #8441
class C {
int a;
int b;
C(void) : a(1), b(1) { c; }
};
class misra_21_1_C {
public:
misra_21_1_C operator=(const misra_21_1_C &);
};
class C2 {
public:
C2(void);
private:
void* f;
};
2022-01-18 20:59:30 +01:00
C2::C2(void) : f(NULL) {}
static void test_misra_21_1_crash(void)
{
auto misra_21_1_C a, b; // 12.3
a = b;
}