1 //===- ASTContextAllocate.h - ASTContext allocate functions -----*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file declares ASTContext allocation functions separate from the main
10 // code in ASTContext.h.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
15 #define LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H
25 // Defined in ASTContext.h
26 void *operator new(size_t Bytes, const clang::ASTContext &C,
27 size_t Alignment = 8);
28 void *operator new[](size_t Bytes, const clang::ASTContext &C,
29 size_t Alignment = 8);
31 // It is good practice to pair new/delete operators. Also, MSVC gives many
32 // warnings if a matching delete overload is not declared, even though the
33 // throw() spec guarantees it will not be implicitly called.
34 void operator delete(void *Ptr, const clang::ASTContext &C, size_t);
35 void operator delete[](void *Ptr, const clang::ASTContext &C, size_t);
37 #endif // LLVM_CLANG_AST_ASTCONTEXTALLOCATE_H