clang 20.0.0git
|
#include <cstddef>
Go to the source code of this file.
Namespaces | |
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
Functions | |
void * | operator new (size_t Bytes, const clang::ASTContext &C, size_t Alignment=8) |
Placement new for using the ASTContext's allocator. | |
void * | operator new[] (size_t Bytes, const clang::ASTContext &C, size_t Alignment=8) |
This placement form of operator new[] uses the ASTContext's allocator for obtaining memory. | |
void | operator delete (void *Ptr, const clang::ASTContext &C, size_t) |
Placement delete companion to the new above. | |
void | operator delete[] (void *Ptr, const clang::ASTContext &C, size_t) |
Placement delete[] companion to the new[] above. | |
|
inline |
Placement delete companion to the new above.
This operator is just a companion to the new above. There is no way of invoking it directly; see the new operator for more details. This operator is called implicitly by the compiler if a placement new expression using the ASTContext throws in the object constructor.
Definition at line 3544 of file ASTContext.h.
|
inline |
Placement delete[] companion to the new[] above.
This operator is just a companion to the new[] above. There is no way of invoking it directly; see the new[] operator for more details. This operator is called implicitly by the compiler if a placement new[] expression using the ASTContext throws in the object constructor.
Definition at line 3582 of file ASTContext.h.
|
inline |
Placement new for using the ASTContext's allocator.
This placement form of operator new uses the ASTContext's allocator for obtaining memory.
IMPORTANT: These are also declared in clang/AST/ASTContextAllocate.h! Any changes here need to also be made there.
We intentionally avoid using a nothrow specification here so that the calls to this operator will not perform a null check on the result – the underlying allocator never returns null pointers.
Usage looks like this (assuming there's an ASTContext 'Context' in scope):
Memory allocated through this placement new operator does not need to be explicitly freed, as ASTContext will free all of this memory when it gets destroyed. Please note that you cannot use delete on the pointer.
Bytes | The number of bytes to allocate. Calculated by the compiler. |
C | The ASTContext that provides the allocator. |
Alignment | The alignment of the allocated memory (if the underlying allocator supports it). |
Definition at line 3533 of file ASTContext.h.
|
inline |
This placement form of operator new[] uses the ASTContext's allocator for obtaining memory.
We intentionally avoid using a nothrow specification here so that the calls to this operator will not perform a null check on the result – the underlying allocator never returns null pointers.
Usage looks like this (assuming there's an ASTContext 'Context' in scope):
Memory allocated through this placement new[] operator does not need to be explicitly freed, as ASTContext will free all of this memory when it gets destroyed. Please note that you cannot use delete on the pointer.
Bytes | The number of bytes to allocate. Calculated by the compiler. |
C | The ASTContext that provides the allocator. |
Alignment | The alignment of the allocated memory (if the underlying allocator supports it). |
Definition at line 3571 of file ASTContext.h.