misra.py: Fix crash on c++ code (#2414)
This commit is contained in:
parent
a71f58ffc2
commit
c1770414ba
|
@ -124,7 +124,7 @@ def getEssentialTypeCategory(expr):
|
||||||
return e1
|
return e1
|
||||||
if expr.valueType:
|
if expr.valueType:
|
||||||
return expr.valueType.sign
|
return expr.valueType.sign
|
||||||
if expr.valueType and expr.valueType.typeScope:
|
if expr.valueType and expr.valueType.typeScope and expr.valueType.typeScope.className:
|
||||||
return "enum<" + expr.valueType.typeScope.className + ">"
|
return "enum<" + expr.valueType.typeScope.className + ">"
|
||||||
if expr.variable:
|
if expr.variable:
|
||||||
typeToken = expr.variable.typeStartToken
|
typeToken = expr.variable.typeStartToken
|
||||||
|
|
|
@ -10,6 +10,14 @@ class misra_21_1_C {
|
||||||
misra_21_1_C operator=(const misra_21_1_C &);
|
misra_21_1_C operator=(const misra_21_1_C &);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class C2 {
|
||||||
|
public:
|
||||||
|
C2();
|
||||||
|
private:
|
||||||
|
void* f;
|
||||||
|
};
|
||||||
|
C2::C2() : f(NULL) {}
|
||||||
|
|
||||||
static bool test_misra_21_1_crash()
|
static bool test_misra_21_1_crash()
|
||||||
{
|
{
|
||||||
auto misra_21_1_C a, b;
|
auto misra_21_1_C a, b;
|
||||||
|
|
Loading…
Reference in New Issue