def is_anonymous(self):
    """
        Check if the record is anonymous.
        """
if self.kind == CursorKind.FIELD_DECL:
    return self.type.get_declaration().is_anonymous()
Finding anonymous enums with libclang