Skip to content

AstAttributeMechanism::remove

Erases the specified attribute.

Synopsis

Declared in <src/midend/astProcessing/AstAttributeMechanism.h>

void
remove(std::string const& name);

Description

If an attribute with the specified name exists then it is removed from the container. If the attribute implements the AstAttribute::CONTAINER_OWNERSHIP policy then this container deletes the attribute, otherwise it is up to the attribute's designer to implement a safe way to prevent attribute leaks, and the attribute must not be deleted until after this method returns.

New semantics: The old implementation did not delete the attribute value. It also printed an error message to standard error if the attribute did not exist.

Created with MrDocs