misra.py: Add regression test for R21.1 crash (#2356)

This commit is contained in:
Georgy Komarov 2019-11-13 22:36:31 +03:00 committed by Sebastian
parent 09eaa412b1
commit da163ae0e8
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,3 @@
// #8441
class C {
int a;
@ -6,3 +5,13 @@ class C {
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(const C* cc)
{
auto misra_21_1_C a, b;
a = b;
}