16#ifndef LLVM_CLANG_AST_INTERP_PRIMITIVES_H
17#define LLVM_CLANG_AST_INTERP_PRIMITIVES_H
51 if constexpr (std::is_signed_v<T>) {
52 return llvm::AddOverflow<T>(A, B, R);
60 if constexpr (std::is_signed_v<T>) {
61 return llvm::SubOverflow<T>(A, B, R);
69 if constexpr (std::is_signed_v<T>) {
70 return llvm::MulOverflow<T>(A, B, R);
71 }
else if constexpr (
sizeof(
T) <
sizeof(
int)) {
74 R =
static_cast<T>(
static_cast<unsigned>(A) *
static_cast<unsigned>(B));
bool CheckMulUB(T A, T B, T &R)
@ BlockAddress
A pointer to an interp::Block.
@ AddrLabelDiff
Difference between two AddrLabelExpr.
@ Number
Just a number, nothing else.
@ ExprAddress
A pointer to an Expr.
@ Address
A pointer to a ValueDecl.
@ LabelAddress
A pointer to a AddrLabelExpr.
@ FunctionAddress
A pointer to a FunctionDecl.
ComparisonCategoryResult Compare(const T &X, const T &Y)
Helper to compare two comparable types.
bool CheckSubUB(T A, T B, T &R)
bool CheckAddUB(T A, T B, T &R)
Top level wrappers for InstallAPI frontend operations.
ComparisonCategoryResult
An enumeration representing the possible results of a three-way comparison.
const FunctionProtoType * T
__packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 uint8_t