def bind_aliases(decls):
visited = set()<EOL>typedefs = [<EOL>decl for decl in decls if isinstance(decl, declarations.typedef_t)]<EOL>for decl in typedefs:<EOL><INDENT>type_ = declarations.remove_alias(decl.decl_type)<EOL>if not isinstance(type_, declarations.declarated_t):<EOL><INDENT>continue<EOL><DEDENT>cls_inst = type_.declaration<EOL>if not isinstance(cls_inst, declarations.class_types):<EOL><INDENT>continue<EOL><DEDENT>if id(cls_inst) not in visited:<EOL><INDENT>visited.add(id(cls_inst))<EOL>del cls_inst.aliases[:]<EOL><DEDENT>cls_inst.aliases.append(decl)<EOL><DEDENT>
This function binds between class and it's typedefs.

:param decls: list of all declarations

:rtype: None