misra.py: Add safety check
This commit is contained in:
parent
785f32465f
commit
029056b0b4
|
@ -2702,6 +2702,8 @@ class MisraChecker:
|
|||
continue
|
||||
if not token.astParent:
|
||||
continue
|
||||
if (token.astOperand1 is None) or (token.astOperand2 is None):
|
||||
continue
|
||||
if token.astOperand1.str == '[' and token.astOperand1.previous.str in ('{', ','):
|
||||
continue
|
||||
if not (token.astParent.str in [',', ';', '{']):
|
||||
|
|
Loading…
Reference in New Issue