From 8ec84d0c3a9ab35a52e0e4198e6ec1411caccb41 Mon Sep 17 00:00:00 2001 From: "John M. Schanck" Date: Mon, 14 Sep 2020 17:24:37 -0400 Subject: [PATCH] inspect initializations --- test/test_boolean.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_boolean.py b/test/test_boolean.py index 7e5402be..deb07703 100644 --- a/test/test_boolean.py +++ b/test/test_boolean.py @@ -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();