14#ifndef LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H
15#define LLVM_CLANG_LIB_AST_EXPRCONSTSHARED_H
75 llvm::APFloat D, llvm::APFloat &ResR,
78 llvm::APFloat D, llvm::APFloat &ResR,
82 UnaryExprOrTypeTrait ExprKind);
107 const llvm::APSInt &Imm,
bool Inverse =
false);
109 const llvm::APSInt &Amount);
111std::optional<llvm::APFloat>
113 std::optional<llvm::APSInt> RoundingMode,
bool IsMin);
124 case ConstantExprKind::Normal:
125 case ConstantExprKind::ClassTemplateArgument:
126 case ConstantExprKind::ImmediateInvocation:
131 case ConstantExprKind::NonClassTemplateArgument:
134 llvm_unreachable(
"unknown ConstantExprKind");
139 case ConstantExprKind::Normal:
140 case ConstantExprKind::ImmediateInvocation:
143 case ConstantExprKind::ClassTemplateArgument:
144 case ConstantExprKind::NonClassTemplateArgument:
147 llvm_unreachable(
"unknown ConstantExprKind");
153 return (
Builtin == Builtin::BI__builtin___CFStringMakeConstantString ||
154 Builtin == Builtin::BI__builtin___NSStringMakeConstantString ||
155 Builtin == Builtin::BI__builtin_ptrauth_sign_constant ||
156 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.
Expr::ConstantExprKind ConstantExprKind
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
const FunctionProtoType * T
@ None
The alignment was not explicit in code.
@ Union
The "union" keyword introduces the elaborated-type-specifier.
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
Diagnostic wrappers for TextAPI types for error reporting.
int32_t uint32_t uint32_t __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 uint8_t