clang 20.0.0git
|
Defines the clang::ASTContext interface. More...
#include "clang/AST/ASTFwd.h"
#include "clang/AST/CanonicalType.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/ComparisonCategories.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/SYCLKernelInfo.h"
#include "clang/AST/TemplateName.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Support/TypeSize.h"
#include <optional>
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/Basic/AMDGPUTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
Go to the source code of this file.
Classes | |
struct | clang::TypeInfo |
struct | clang::TypeInfoChars |
class | clang::ASTContext |
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic analysis of a file. More... | |
struct | clang::ASTContext::CUDAConstantEvalContext |
struct | clang::ASTContext::CUDAConstantEvalContextRAII |
struct | clang::ASTContext::BuiltinVectorTypeInfo |
struct | clang::ASTContext::SectionInfo |
Namespaces | |
namespace | llvm |
Diagnostic wrappers for TextAPI types for error reporting. | |
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
namespace | clang::Builtin |
namespace | clang::comments |
namespace | clang::interp |
namespace | clang::serialization |
Macros | |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) CanQualType SingletonId; |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) CanQualType Id##Ty; |
#define | SVE_TYPE(Name, Id, SingletonId) CanQualType SingletonId; |
#define | PPC_VECTOR_TYPE(Name, Id, Size) CanQualType Id##Ty; |
#define | RVV_TYPE(Name, Id, SingletonId) CanQualType SingletonId; |
#define | WASM_TYPE(Name, Id, SingletonId) CanQualType SingletonId; |
#define | AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) CanQualType SingletonId; |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) CanQualType SingletonId; |
#define | OPT_LIST(V) |
#define | V(N, I) ObjCEncOptions& set##N() { Bits |= 1 << I; return *this; } |
#define | V(N, I) bool N() const { return Bits & 1 << I; } |
Typedefs | |
typedef SmallVector< CXXBaseSpecifier *, 4 > | clang::CXXCastPath |
A simple array of base specifiers. | |
Enumerations | |
enum class | clang::AlignRequirementKind { clang::None , clang::RequiredByTypedef , clang::RequiredByRecord , clang::RequiredByEnum } |
Functions | |
const StreamingDiagnostic & | clang::operator<< (const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section) |
Insertion operator for diagnostics. | |
Selector | clang::GetNullarySelector (StringRef name, ASTContext &Ctx) |
Utility function for constructing a nullary selector. | |
Selector | clang::GetUnarySelector (StringRef name, ASTContext &Ctx) |
Utility function for constructing an unary selector. | |
void * | operator new (size_t Bytes, const clang::ASTContext &C, size_t Alignment) |
Placement new for using the ASTContext's allocator. | |
void | operator delete (void *Ptr, const clang::ASTContext &C, size_t) |
Placement delete companion to the new above. | |
void * | operator new[] (size_t Bytes, const clang::ASTContext &C, size_t Alignment) |
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. | |
Defines the clang::ASTContext interface.
Definition in file ASTContext.h.
#define AMDGPU_TYPE | ( | Name, | |
Id, | |||
SingletonId, | |||
Width, | |||
Align | |||
) | CanQualType SingletonId; |
Definition at line 1216 of file ASTContext.h.
Definition at line 1202 of file ASTContext.h.
#define HLSL_INTANGIBLE_TYPE | ( | Name, | |
Id, | |||
SingletonId | |||
) | CanQualType SingletonId; |
Definition at line 1219 of file ASTContext.h.
#define IMAGE_TYPE | ( | ImgType, | |
Id, | |||
SingletonId, | |||
Access, | |||
Suffix | |||
) | CanQualType SingletonId; |
Definition at line 1194 of file ASTContext.h.
#define OPT_LIST | ( | V | ) |
Definition at line 3430 of file ASTContext.h.
Definition at line 1208 of file ASTContext.h.
#define RVV_TYPE | ( | Name, | |
Id, | |||
SingletonId | |||
) | CanQualType SingletonId; |
Definition at line 1211 of file ASTContext.h.
#define SVE_TYPE | ( | Name, | |
Id, | |||
SingletonId | |||
) | CanQualType SingletonId; |
Definition at line 1205 of file ASTContext.h.
#define V | ( | N, | |
I | |||
) | ObjCEncOptions& set##N() { Bits |= 1 << I; return *this; } |
Definition at line 3443 of file ASTContext.h.
Definition at line 3443 of file ASTContext.h.
#define WASM_TYPE | ( | Name, | |
Id, | |||
SingletonId | |||
) | CanQualType SingletonId; |
Definition at line 1214 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 3646 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 3684 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 3635 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 3673 of file ASTContext.h.