CPP: Replace getAllocatorCall with getDeallocator call.

This commit is contained in:
Alex Eyers-Taylor
2023-08-25 13:55:30 +01:00
parent 04f8ed6af0
commit a3711e1df0
5 changed files with 13 additions and 8 deletions

View File

@@ -963,13 +963,18 @@ class DeleteOrDeleteArrayExpr extends Expr, TDeleteOrDeleteArrayExpr {
expr_deallocator(underlyingElement(this), unresolveElement(result), _)
}
/**
* DEPRECATED: use `getDeallocatorCall` instead.
*/
deprecated FunctionCall getAllocatorCall() { result = this.getChild(0) }
/**
* Gets the call to a non-default `operator delete` that deallocates storage, if any.
*
* This will only be present when the type being deleted has a custom `operator delete` and
* is not a class with a virtual destructor.
*/
FunctionCall getAllocatorCall() { result = this.getChild(0) }
FunctionCall getDeallocatorCall() { result = this.getChild(0) }
/**
* Holds if the deallocation function expects a size argument.