clang 22.0.0git
InferAlloc.h
Go to the documentation of this file.
1/===--- InferAlloc.h - Allocation type inference ---------------*- C++ -*-===/
2/
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
6/
7/===----------------------------------------------------------------------===/
8/
9/ This file defines interfaces for allocation-related type inference.
10/
11/===----------------------------------------------------------------------===/
12
13#ifndef LLVM_CLANG_AST_INFERALLOC_H
14#define LLVM_CLANG_AST_INFERALLOC_H
15
17#include "clang/AST/Expr.h"
18#include "llvm/Support/AllocToken.h"
19#include <optional>
20
21namespace clang {
22namespace infer_alloc {
23
24/ Infer the possible allocated type from an allocation call expression.
26 const CastExpr *CastE);
27
28/ Get the information required for construction of an allocation token ID.
29std::optional<llvm::AllocTokenMetadata>
31
32} / namespace infer_alloc
33} / namespace clang
34
35#endif / LLVM_CLANG_AST_INFERALLOC_H
Defines the clang::ASTContext interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:220
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2877
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition Expr.h:3610
A (possibly-)qualified type.
Definition TypeBase.h:937
std::optional< llvm::AllocTokenMetadata > getAllocTokenMetadata(QualType T, const ASTContext &Ctx)
Get the information required for construction of an allocation token ID.
QualType inferPossibleType(const CallExpr *E, const ASTContext &Ctx, const CastExpr *CastE)
Infer the possible allocated type from an allocation call expression.
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant