Browse Source

inspect initializations

master
John M. Schanck 4 years ago
parent
commit
8ec84d0c3a
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      test/test_boolean.py

+ 6
- 0
test/test_boolean.py View File

@@ -27,6 +27,12 @@ class ForbiddenLineVisitor(pycparser.c_ast.NodeVisitor):
v.visit(node.rvalue) v.visit(node.rvalue)
self.errors.extend(v.errors) self.errors.extend(v.errors)


def visit_Decl(self, node):
if node.init:
v = ForbiddenOpVisitor();
v.visit(node.init)
self.errors.extend(v.errors)

def visit_FuncCall(self, node): def visit_FuncCall(self, node):
if node.args: if node.args:
v = ForbiddenOpVisitor(); v = ForbiddenOpVisitor();


Loading…
Cancel
Save