14#ifndef LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H
15#define LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H
78 llvm::APFloat D, llvm::APFloat &ResR,
81 llvm::APFloat D, llvm::APFloat &ResR,
85 UnaryExprOrTypeTrait ExprKind);
110 const llvm::APSInt &Imm,
bool Inverse =
false);
112 const llvm::APSInt &Amount);
114std::optional<llvm::APFloat>
116 std::optional<llvm::APSInt> RoundingMode,
bool IsMin);
127 case ConstantExprKind::Normal:
128 case ConstantExprKind::ClassTemplateArgument:
129 case ConstantExprKind::ImmediateInvocation:
130 case ConstantExprKind::Initializer:
135 case ConstantExprKind::NonClassTemplateArgument:
138 llvm_unreachable(
"unknown ConstantExprKind");
143 case ConstantExprKind::Normal:
144 case ConstantExprKind::ImmediateInvocation:
145 case ConstantExprKind::Initializer:
148 case ConstantExprKind::ClassTemplateArgument:
149 case ConstantExprKind::NonClassTemplateArgument:
152 llvm_unreachable(
"unknown ConstantExprKind");
158 return (
Builtin == Builtin::BI__builtin___CFStringMakeConstantString ||
159 Builtin == Builtin::BI__builtin___NSStringMakeConstantString ||
160 Builtin == Builtin::BI__builtin_ptrauth_sign_constant ||
161 Builtin == Builtin::BI__builtin_function_start);
Defines enumerations for traits support.
const Expr * ignorePointerCastsAndParens(const Expr *E)
A more selective version of E->IgnoreParenCasts for tryEvaluateBuiltinObjectSize. This ignores some c...
bool isReadByLvalueToRvalueConversion(const CXXRecordDecl *RD)
Determine whether a type would actually be read by an lvalue-to-rvalue conversion.
bool isTemplateArgument(ConstantExprKind Kind)
unsigned ConvertBuiltinIDToX86BuiltinID(const ASTContext &Ctx, unsigned BuiltinID)
Convert a builtin ID to the canonical x86 builtin ID the constant evaluators dispatch on in their x86...
uint8_t GFNIAffine(uint8_t XByte, const llvm::APInt &AQword, const llvm::APSInt &Imm, bool Inverse=false)
CharUnits GetAlignOfExpr(const ASTContext &Ctx, const Expr *E, UnaryExprOrTypeTrait ExprKind)
bool isOpaqueConstantCall(const CallExpr *E)
Should this call expression be treated as forming an opaque constant?
bool isForManglingOnly(ConstantExprKind Kind)
Determines whether the given kind of constant expression is only ever used for name mangling.
llvm::APSInt NormalizeRotateAmount(const llvm::APSInt &Value, const llvm::APSInt &Amount)
bool isGlobalLValue(const ValueDecl *D, const Expr *E)
GCCTypeClass EvaluateBuiltinClassifyType(QualType T, const LangOptions &LangOpts)
EvaluateBuiltinClassifyType - Evaluate __builtin_classify_type the same way as GCC.
void HandleComplexComplexMul(llvm::APFloat A, llvm::APFloat B, llvm::APFloat C, llvm::APFloat D, llvm::APFloat &ResR, llvm::APFloat &ResI)
std::optional< llvm::APFloat > EvalScalarMinMaxFp(const llvm::APFloat &A, const llvm::APFloat &B, std::optional< llvm::APSInt > RoundingMode, bool IsMin)
GCCTypeClass
Values returned by __builtin_classify_type, chosen to match the values produced by GCC's builtin.
@ PointerToMemberFunction
uint8_t GFNIMul(uint8_t AByte, uint8_t BByte)
void HandleComplexComplexDiv(llvm::APFloat A, llvm::APFloat B, llvm::APFloat C, llvm::APFloat D, llvm::APFloat &ResR, llvm::APFloat &ResI)
uint8_t GFNIMultiplicativeInverse(uint8_t Byte)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a C++ struct/union/class.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
unsigned getBuiltinCallee() const
getBuiltinCallee - If this is a call to a builtin, return the builtin ID of the callee.
This is an opaque type for sizes expressed in character units.
This represents one expression.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A (possibly-)qualified type.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Top level wrappers for InstallAPI frontend operations.
DynAllocKind
Kind of source for a dynamic allocation.
Expr::ConstantExprKind ConstantExprKind
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
const FunctionProtoType * T
@ Union
The "union" keyword introduces the elaborated-type-specifier.
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
CharUnits GetAlignOfDynamicAlloc(const ASTContext &Ctx, QualType AllocType, DynAllocKind AllocKind)
Diagnostic wrappers for TextAPI types for error reporting.
__builtin_bitreverse32 uint32_t __builtin_riscv_aaddu_u32 __builtin_riscv_asubu_u32 __builtin_elementwise_add_sat __builtin_elementwise_sub_sat int32_t uint32_t uint32_t uint8_t