diff --git a/scripts/decls_json.py b/scripts/decls_json.py index a27edd040..4f64a0df1 100755 --- a/scripts/decls_json.py +++ b/scripts/decls_json.py @@ -8,7 +8,7 @@ def has_annotation(node, annotation): for child in node.get_children(): - if child.kind == clang.cindex.CursorKind.ANNOTATE_ATTR and annotation in child.spelling: + if child.kind == clang.cindex.CursorKind.ANNOTATE_ATTR and child.spelling and annotation in child.spelling: return True return False