inspect initializations

This commit is contained in:
John M. Schanck 2020-09-14 17:24:37 -04:00 committed by Kris Kwiatkowski
父節點 331733e9e0
當前提交 fdd73d893c

查看文件

@ -27,6 +27,12 @@ class ForbiddenLineVisitor(pycparser.c_ast.NodeVisitor):
v.visit(node.rvalue)
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):
if node.args:
v = ForbiddenOpVisitor();