A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/Interp_8h_source.html below:

clang: lib/AST/ByteCode/Interp.h Source File

13#ifndef LLVM_CLANG_AST_INTERP_INTERP_H 14#define LLVM_CLANG_AST_INTERP_INTERP_H 16#include "../ExprConstShared.h" 35#include "llvm/ADT/APFloat.h" 36#include "llvm/ADT/APSInt.h" 42using APSInt

= llvm::APSInt;

123 const CallExpr

*CE,

unsigned

ArgSize);

133 const Expr

*NewExpr);

149

uint32_t VarArgSize);

151

uint32_t VarArgSize);

153

uint32_t VarArgSize);

155 const CallExpr

*CE, uint32_t BuiltinID);

161 bool

TargetIsUCharOrByte);

163template

<

typename

T>

165 const Expr

*

E

= S.Current->getExpr(OpPC);

166

S.CCEDiag(

E

, diag::note_constexpr_overflow) << SrcValue <<

E

->

getType

();

167 return

S.noteUndefinedBehavior();

170 const

FixedPoint &FP);

175template

<ShiftDir Dir,

typename

LT,

typename

RT>

178 if

(RHS.isNegative()) {

180

S.CCEDiag(

Loc

, diag::note_constexpr_negative_shift) << RHS.toAPSInt();

181 if

(!S.noteUndefinedBehavior())

187 if

(

Bits

> 1 && RHS >= RT::from(

Bits

, RHS.bitWidth())) {

188 const Expr

*

E

= S.Current->getExpr(OpPC);

189 const APSInt

Val = RHS.toAPSInt();

191

S.CCEDiag(

E

, diag::note_constexpr_large_shift) << Val << Ty <<

Bits

;

192 if

(!S.noteUndefinedBehavior())

197 if

(LHS.isSigned() && !S.

getLangOpts

().CPlusPlus20) {

198 const Expr

*

E

= S.Current->getExpr(OpPC);

201 if

(LHS.isNegative()) {

202

S.CCEDiag(

E

, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();

203 if

(!S.noteUndefinedBehavior())

205

}

else if

(LHS.toUnsigned().countLeadingZeros() <

206 static_cast<unsigned>

(RHS)) {

207

S.CCEDiag(

E

, diag::note_constexpr_lshift_discards);

208 if

(!S.noteUndefinedBehavior())

221template

<

typename

T>

224 const auto

*Op = cast<BinaryOperator>(S.Current->getExpr(OpPC));

225 if constexpr

(std::is_same_v<T, Floating>) {

226

S.CCEDiag(Op, diag::note_expr_divide_by_zero)

227

<< Op->getRHS()->getSourceRange();

231

S.FFDiag(Op, diag::note_expr_divide_by_zero)

232

<< Op->getRHS()->getSourceRange();

236 if constexpr

(!std::is_same_v<T, FixedPoint>) {

237 if

(LHS.isSigned() && LHS.isMin() && RHS.isNegative() && RHS.isMinusOne()) {

238 APSInt

LHSInt = LHS.toAPSInt();

240

(-LHSInt.extend(LHSInt.getBitWidth() + 1)).toString(Trunc, 10);

242 const Expr

*

E

= S.Current->getExpr(OpPC);

243

S.CCEDiag(

Loc

, diag::note_constexpr_overflow) << Trunc <<

E

->

getType

();

250template

<

typename

SizeT>

252 unsigned

ElemSize,

bool

IsNoThrow) {

258 if

((NumElements->bitWidth() - NumElements->isSigned()) <

267

assert(MaxElements.isPositive());

268 if

(NumElements->toAPSInt().getActiveBits() >

270

*NumElements > MaxElements) {

274 if

(NumElements->isSigned() && NumElements->isNegative()) {

275

S.FFDiag(

Loc

, diag::note_constexpr_new_negative)

278

S.FFDiag(

Loc

, diag::note_constexpr_new_too_large)

290

APFloat::opStatus Status,

FPOptions

FPO);

306inline bool Invalid

(InterpState &S, CodePtr OpPC);

315 const

Function *

Func

);

317

template <PrimType Name, class T = typename PrimConv<Name>::T>

319 const T

&

Ret

= S.Stk.pop<

T

>();

322

assert(S.Current->getFrameOffset() == S.Stk.size() &&

"Invalid frame"

);

323 if

(!S.checkingPotentialConstantExpression() || S.Current->Caller)

327

PC = S.Current->getRetPC();

330

S.Stk.push<

T

>(

Ret

);

333

S.Current =

nullptr

;

341

assert(S.Current->getFrameOffset() == S.Stk.size() &&

"Invalid frame"

);

343 if

(!S.checkingPotentialConstantExpression() || S.Current->Caller)

347

PC = S.Current->getRetPC();

352

S.Current =

nullptr

;

362

template <typename U>

class

OpAP>

375 if constexpr

(std::is_same_v<T, FixedPoint>)

382 if

(S.checkingForUndefinedBehavior()) {

383 const Expr

*

E

= S.Current->getExpr(OpPC);

389

S.report(

E

->

getExprLoc

(), diag::warn_integer_constant_overflow)

400

template <PrimType Name, class T = typename PrimConv<Name>::T>

402 const T

&RHS = S.Stk.pop<

T

>();

403 const T

&LHS = S.Stk.pop<

T

>();

404 const unsigned Bits

= RHS.bitWidth() + 1;

405 return

AddSubMulHelper<T, T::add, std::plus>(S, OpPC,

Bits

, LHS, RHS);

410 if

(RM == llvm::RoundingMode::Dynamic)

411 return

llvm::RoundingMode::NearestTiesToEven;

426

template <PrimType Name, class T = typename PrimConv<Name>::T>

428 const T

&RHS = S.Stk.pop<

T

>();

429 const T

&LHS = S.Stk.pop<

T

>();

430 const unsigned Bits

= RHS.bitWidth() + 1;

431 return

AddSubMulHelper<T, T::sub, std::minus>(S, OpPC,

Bits

, LHS, RHS);

445

template <PrimType Name, class T = typename PrimConv<Name>::T>

447 const T

&RHS = S.Stk.pop<

T

>();

448 const T

&LHS = S.Stk.pop<

T

>();

449 const unsigned Bits

= RHS.bitWidth() * 2;

450 return

AddSubMulHelper<T, T::mul, std::multiplies>(S, OpPC,

Bits

, LHS, RHS);

464

template <PrimType Name, class T = typename PrimConv<Name>::T>

470 if constexpr

(std::is_same_v<T, Floating>) {

476 APFloat

ResR(A.getSemantics());

477 APFloat

ResI(A.getSemantics());

482 Result

.atIndex(0).initialize();

484 Result

.atIndex(1).initialize();

488 const T

&LHSR = LHS.atIndex(0).deref<

T

>();

489 const T

&LHSI = LHS.atIndex(1).deref<

T

>();

492 unsigned Bits

= LHSR.bitWidth();

496 if

(T::mul(LHSR, RHSR,

Bits

, &A))

499 if

(T::mul(LHSI, RHSI,

Bits

, &B))

501 if

(T::sub(A, B,

Bits

, &

Result

.atIndex(0).deref<

T

>()))

503 Result

.atIndex(0).initialize();

506 if

(T::mul(LHSR, RHSI,

Bits

, &A))

508 if

(T::mul(LHSI, RHSR,

Bits

, &B))

510 if

(T::add(A, B,

Bits

, &

Result

.atIndex(1).deref<

T

>()))

512 Result

.atIndex(1).initialize();

519

template <PrimType Name, class T = typename PrimConv<Name>::T>

525 if constexpr

(std::is_same_v<T, Floating>) {

531 APFloat

ResR(A.getSemantics());

532 APFloat

ResI(A.getSemantics());

537 Result

.atIndex(0).initialize();

539 Result

.atIndex(1).initialize();

543 const T

&LHSR = LHS.atIndex(0).deref<

T

>();

544 const T

&LHSI = LHS.atIndex(1).deref<

T

>();

547 unsigned Bits

= LHSR.bitWidth();

553

S.FFDiag(

E

, diag::note_expr_divide_by_zero);

559 if

(T::mul(RHSR, RHSR,

Bits

, &A) || T::mul(RHSI, RHSI,

Bits

, &B)) {

563 if

(T::add(A, B,

Bits

, &Den))

568

S.FFDiag(

E

, diag::note_expr_divide_by_zero);

573 T

&ResultR =

Result

.atIndex(0).deref<

T

>();

574 T

&ResultI =

Result

.atIndex(1).deref<

T

>();

576 if

(T::mul(LHSR, RHSR,

Bits

, &A) || T::mul(LHSI, RHSI,

Bits

, &B))

578 if

(T::add(A, B,

Bits

, &ResultR))

580 if

(T::div(ResultR, Den,

Bits

, &ResultR))

582 Result

.atIndex(0).initialize();

585 if

(T::mul(LHSI, RHSR,

Bits

, &A) || T::mul(LHSR, RHSI,

Bits

, &B))

587 if

(T::sub(A, B,

Bits

, &ResultI))

589 if

(T::div(ResultI, Den,

Bits

, &ResultI))

591 Result

.atIndex(1).initialize();

601

template <PrimType Name, class T = typename PrimConv<Name>::T>

603 const T

&RHS = S.Stk.pop<

T

>();

604 const T

&LHS = S.Stk.pop<

T

>();

606 unsigned Bits

= RHS.bitWidth();

618

template <PrimType Name, class T = typename PrimConv<Name>::T>

620 const T

&RHS = S.Stk.pop<

T

>();

621 const T

&LHS = S.Stk.pop<

T

>();

623 unsigned Bits

= RHS.bitWidth();

635

template <PrimType Name, class T = typename PrimConv<Name>::T>

637 const T

&RHS = S.Stk.pop<

T

>();

638 const T

&LHS = S.Stk.pop<

T

>();

640 unsigned Bits

= RHS.bitWidth();

652

template <PrimType Name, class T = typename PrimConv<Name>::T>

654 const T

&RHS = S.Stk.pop<

T

>();

655 const T

&LHS = S.Stk.pop<

T

>();

660 const unsigned Bits

= RHS.bitWidth() * 2;

672

template <PrimType Name, class T = typename PrimConv<Name>::T>

674 const T

&RHS = S.Stk.pop<

T

>();

675 const T

&LHS = S.Stk.pop<

T

>();

680 const unsigned Bits

= RHS.bitWidth() * 2;

687 if constexpr

(std::is_same_v<T, FixedPoint>) {

715 const auto

&Val = S.Stk.pop<

Boolean

>();

724

template <PrimType Name, class T = typename PrimConv<Name>::T>

726 const T

&

Value

= S.Stk.pop<

T

>();

735 "don't expect other types to fail at constexpr negation"

);

739 if

(S.checkingForUndefinedBehavior()) {

740 const Expr

*

E

= S.Current->getExpr(OpPC);

743

NegatedValue.trunc(

Result

.bitWidth())

746

S.report(

E

->

getExprLoc

(), diag::warn_integer_constant_overflow)

763template

<

typename

T, IncDecOp Op, PushVal DoPush>

767 if constexpr

(std::is_same_v<T, Boolean>) {

800 if

(S.checkingForUndefinedBehavior()) {

801 const Expr

*

E

= S.Current->getExpr(OpPC);

804

APResult.trunc(

Result

.bitWidth())

807

S.report(

E

->

getExprLoc

(), diag::warn_integer_constant_overflow)

819

template <PrimType Name, class T = typename PrimConv<Name>::T>

825 return

IncDecHelper<T, IncDecOp::Inc, PushVal::Yes>(S, OpPC, Ptr);

831

template <PrimType Name, class T = typename PrimConv<Name>::T>

837 return

IncDecHelper<T, IncDecOp::Inc, PushVal::No>(S, OpPC, Ptr);

844

template <PrimType Name, class T = typename PrimConv<Name>::T>

850 return

IncDecHelper<T, IncDecOp::Dec, PushVal::Yes>(S, OpPC, Ptr);

856

template <PrimType Name, class T = typename PrimConv<Name>::T>

862 return

IncDecHelper<T, IncDecOp::Dec, PushVal::No>(S, OpPC, Ptr);

865template

<IncDecOp Op, PushVal DoPush>

875

llvm::APFloat::opStatus Status;

891 return

IncDecFloatHelper<IncDecOp::Inc, PushVal::Yes>(S, OpPC, Ptr, FPOI);

899 return

IncDecFloatHelper<IncDecOp::Inc, PushVal::No>(S, OpPC, Ptr, FPOI);

907 return

IncDecFloatHelper<IncDecOp::Dec, PushVal::Yes>(S, OpPC, Ptr, FPOI);

915 return

IncDecFloatHelper<IncDecOp::Dec, PushVal::No>(S, OpPC, Ptr, FPOI);

920

template <PrimType Name, class T = typename PrimConv<Name>::T>

922 const T

&Val = S.Stk.pop<

T

>();

924 if

(!T::comp(Val, &

Result

)) {

938template

<

typename

T>

940

assert((!std::is_same_v<T, MemberPointer>) &&

941 "Non-equality comparisons on member pointer types should already be " 942 "rejected in Sema."

);

944 const T

&RHS = S.Stk.pop<

T

>();

945 const T

&LHS = S.Stk.pop<

T

>();

946

S.Stk.push<BoolT>(BoolT::from(

Fn

(LHS.compare(RHS))));

950template

<

typename

T>

952 return

CmpHelper<T>(S, OpPC,

Fn

);

963

S.FFDiag(

Loc

, diag::note_constexpr_pointer_comparison_unspecified)

976 for

(

const auto

&FP : {LHS, RHS}) {

979

S.FFDiag(

Loc

, diag::note_constexpr_pointer_weak_comparison)

997

S.FFDiag(

Loc

, diag::note_constexpr_pointer_comparison_unspecified)

1002 unsigned

VL = LHS.getByteOffset();

1004

S.Stk.push<BoolT>(BoolT::from(

Fn

(

Compare

(VL, VR))));

1015 if

(LHS.isZero() && RHS.

isZero

()) {

1021 for

(

const auto

&

P

: {LHS, RHS}) {

1026

S.FFDiag(

Loc

, diag::note_constexpr_pointer_weak_comparison)

1033 unsigned

VL = LHS.getByteOffset();

1040 if

(!LHS.isZero() && LHS.isArrayRoot())

1041

VL = LHS.atIndex(0).getByteOffset();

1045

S.Stk.push<BoolT>(BoolT::from(

Fn

(

Compare

(VL, VR))));

1052

S.FFDiag(

Loc

, diag::note_constexpr_pointer_comparison_past_end)

1055

}

else if

(RHS.

isOnePastEnd

() && !LHS.isOnePastEnd() && !LHS.isZero() &&

1056

LHS.getOffset() == 0) {

1058

S.FFDiag(

Loc

, diag::note_constexpr_pointer_comparison_past_end)

1063 bool

BothNonNull = !LHS.isZero() && !RHS.

isZero

();

1065 for

(

const auto

&

P

: {LHS, RHS}) {

1068 if

(BothNonNull &&

P

.pointsToLiteral()) {

1070

S.FFDiag(

Loc

, diag::note_constexpr_literal_comparison);

1087 for

(

const auto

&MP : {LHS, RHS}) {

1090

S.FFDiag(

Loc

, diag::note_constexpr_mem_pointer_weak_comparison)

1091

<< MP.getMemberFunction();

1099 if

(LHS.

isZero

() && RHS.isZero()) {

1103 if

(LHS.

isZero

() || RHS.isZero()) {

1109 for

(

const auto

&MP : {LHS, RHS}) {

1113

S.CCEDiag(

Loc

, diag::note_constexpr_compare_virtual_mem_ptr) << MD;

1121

template <PrimType Name, class T = typename PrimConv<Name>::T>

1128

template <PrimType Name, class T = typename PrimConv<Name>::T>

1130 const T

&RHS = S.Stk.pop<

T

>();

1131 const T

&LHS = S.Stk.pop<

T

>();

1138

S.FFDiag(

Loc

, diag::note_constexpr_pointer_comparison_unspecified)

1145 const auto

*CmpValueInfo =

1147

assert(CmpValueInfo);

1148

assert(CmpValueInfo->hasValidIntValue());

1152

template <PrimType Name, class T = typename PrimConv<Name>::T>

1159

template <PrimType Name, class T = typename PrimConv<Name>::T>

1166

template <PrimType Name, class T = typename PrimConv<Name>::T>

1174

template <PrimType Name, class T = typename PrimConv<Name>::T>

1181

template <PrimType Name, class T = typename PrimConv<Name>::T>

1193

template <PrimType Name, class T = typename PrimConv<Name>::T>

1195 const T

RHS = S.Stk.pop<

T

>();

1196 const T

LHS = S.Stk.pop<

T

>();

1197 const T Value

= S.Stk.pop<

T

>();

1199

S.Stk.push<

bool

>(LHS <=

Value

&&

Value

<= RHS);

1207

template <PrimType Name, class T = typename PrimConv<Name>::T>

1209

S.Stk.push<

T

>(S.Stk.peek<

T

>());

1213

template <PrimType Name, class T = typename PrimConv<Name>::T>

1220template

<PrimType TopName, PrimType BottomName>

1225 const auto

&Top = S.Stk.pop<TopT>();

1226 const auto

&Bottom = S.Stk.pop<BottomT>();

1228

S.Stk.push<TopT>(Top);

1229

S.Stk.push<BottomT>(Bottom);

1238

template <PrimType Name, class T = typename PrimConv<Name>::T>

1240

S.Stk.push<

T

>(Arg);

1248

template <PrimType Name, class T = typename PrimConv<Name>::T>

1250 const Pointer

&Ptr = S.Current->getLocalPointer(I);

1253

S.Stk.push<

T

>(Ptr.

deref

<

T

>());

1260

template <PrimType Name, class T = typename PrimConv<Name>::T>

1262

S.Current->setLocal<

T

>(I, S.Stk.pop<

T

>());

1266

template <PrimType Name, class T = typename PrimConv<Name>::T>

1268 if

(S.checkingPotentialConstantExpression()) {

1271

S.Stk.push<

T

>(S.Current->getParam<

T

>(I));

1275

template <PrimType Name, class T = typename PrimConv<Name>::T>

1277

S.Current->setParam<

T

>(I, S.Stk.pop<

T

>());

1283

template <PrimType Name, class T = typename PrimConv<Name>::T>

1293

S.Stk.push<

T

>(Field.deref<

T

>());

1297

template <PrimType Name, class T = typename PrimConv<Name>::T>

1299 const T

&

Value

= S.Stk.pop<

T

>();

1305 const Pointer

&Field = Obj.atField(I);

1309

Field.deref<

T

>() =

Value

;

1315

template <PrimType Name, class T = typename PrimConv<Name>::T>

1325

S.Stk.push<

T

>(Field.deref<

T

>());

1329

template <PrimType Name, class T = typename PrimConv<Name>::T>

1331 if

(S.checkingPotentialConstantExpression())

1339

S.Stk.push<

T

>(Field.deref<

T

>());

1343

template <PrimType Name, class T = typename PrimConv<Name>::T>

1345 if

(S.checkingPotentialConstantExpression())

1347 const T

&

Value

= S.Stk.pop<

T

>();

1354

Field.deref<

T

>() =

Value

;

1358

template <PrimType Name, class T = typename PrimConv<Name>::T>

1360 const Pointer

&Ptr = S.P.getPtrGlobal(I);

1371

S.Stk.push<

T

>(Ptr.

deref

<

T

>());

1376

template <PrimType Name, class T = typename PrimConv<Name>::T>

1378 const Pointer

&Ptr = S.P.getPtrGlobal(I);

1381

S.Stk.push<

T

>(Ptr.

deref

<

T

>());

1385

template <PrimType Name, class T = typename PrimConv<Name>::T>

1391

template <PrimType Name, class T = typename PrimConv<Name>::T>

1393 const Pointer

&

P

= S.P.getGlobal(I);

1394 P

.deref<

T

>() = S.Stk.pop<

T

>();

1402

template <PrimType Name, class T = typename PrimConv<Name>::T>

1405 const Pointer

&Ptr = S.P.getGlobal(I);

1407 const T Value

= S.Stk.peek<

T

>();

1414

S.SeenGlobalTemporaries.push_back(

1417

Ptr.

deref

<

T

>() = S.Stk.pop<

T

>();

1431

S.SeenGlobalTemporaries.push_back(

1432

std::make_pair(

P

.getDeclDesc()->asExpr(), Temp));

1434 if

(std::optional<APValue> APV =

1443

template <PrimType Name, class T = typename PrimConv<Name>::T>

1445 if

(S.checkingPotentialConstantExpression())

1451

Field.deref<

T

>() = S.Stk.pop<

T

>();

1459

template <PrimType Name, class T = typename PrimConv<Name>::T>

1461

uint32_t FieldOffset) {

1462

assert(F->isBitField());

1463 if

(S.checkingPotentialConstantExpression())

1468 const Pointer

&Field =

This

.atField(FieldOffset);

1469 const auto

&

Value

= S.Stk.pop<

T

>();

1470

Field.deref<

T

>() =

Value

.truncate(F->Decl->getBitWidthValue());

1478

template <PrimType Name, class T = typename PrimConv<Name>::T>

1480 const T

&

Value

= S.Stk.pop<

T

>();

1482

Field.deref<

T

>() =

Value

;

1488

template <PrimType Name, class T = typename PrimConv<Name>::T>

1490

assert(F->isBitField());

1491 const T

&

Value

= S.Stk.pop<

T

>();

1492 const Pointer

&Field = S.Stk.peek<

Pointer

>().atField(F->Offset);

1493

Field.deref<

T

>() =

Value

.truncate(F->Decl->getBitWidthValue());

1504

S.Stk.push<

Pointer

>(S.Current->getLocalPointer(I));

1509 if

(S.checkingPotentialConstantExpression()) {

1512

S.Stk.push<

Pointer

>(S.Current->getParamPointer(I));

1517

S.Stk.push<

Pointer

>(S.P.getPtrGlobal(I));

1523bool GetPtrField

(InterpState &S, CodePtr OpPC, uint32_t Off);

1527 if

(S.checkingPotentialConstantExpression())

1545

S.Stk.push<

Pointer

>(std::move(Field));

1550 if

(S.checkingPotentialConstantExpression())

1558

S.Stk.push<

Pointer

>(std::move(Field));

1621 if

(S.checkingPotentialConstantExpression())

1656 while

(

Base

.isBaseClass())

1659 const

Record::Base *VirtBase =

Base

.getRecord()->getVirtualBase(

Decl

);

1660

S.Stk.push<

Pointer

>(

Base

.atField(VirtBase->Offset));

1676 if

(S.checkingPotentialConstantExpression())

1688

template <PrimType Name, class T = typename PrimConv<Name>::T>

1695

S.Stk.push<

T

>(Ptr.

deref

<

T

>());

1699

template <PrimType Name, class T = typename PrimConv<Name>::T>

1706

S.Stk.push<

T

>(Ptr.

deref

<

T

>());

1710

template <PrimType Name, class T = typename PrimConv<Name>::T>

1712 const T

&

Value

= S.Stk.pop<

T

>();

1716 if

(Ptr.canBeInitialized()) {

1720

Ptr.deref<

T

>() =

Value

;

1724

template <PrimType Name, class T = typename PrimConv<Name>::T>

1726 const T

&

Value

= S.Stk.pop<

T

>();

1730 if

(Ptr.canBeInitialized()) {

1734

Ptr.deref<

T

>() =

Value

;

1738

template <PrimType Name, class T = typename PrimConv<Name>::T>

1740 const T

&

Value

= S.Stk.pop<

T

>();

1744 if

(Ptr.canBeInitialized())

1746 if

(

const auto

*FD = Ptr.getField())

1747

Ptr.deref<

T

>() =

Value

.truncate(FD->getBitWidthValue());

1749

Ptr.deref<

T

>() =

Value

;

1753

template <PrimType Name, class T = typename PrimConv<Name>::T>

1755 const T

&

Value

= S.Stk.pop<

T

>();

1759 if

(Ptr.canBeInitialized())

1761 if

(

const auto

*FD = Ptr.getField())

1762

Ptr.deref<

T

>() =

Value

.truncate(FD->getBitWidthValue());

1764

Ptr.deref<

T

>() =

Value

;

1768

template <PrimType Name, class T = typename PrimConv<Name>::T>

1770 const T

&

Value

= S.Stk.pop<

T

>();

1778 new

(&Ptr.deref<

T

>())

T

(

Value

);

1782

template <PrimType Name, class T = typename PrimConv<Name>::T>

1784 const T

&

Value

= S.Stk.pop<

T

>();

1790 new

(&Ptr.deref<

T

>())

T

(

Value

);

1797

template <PrimType Name, class T = typename PrimConv<Name>::T>

1799 const T

&

Value

= S.Stk.pop<

T

>();

1802 if

(Ptr.isUnknownSizeArray())

1807 if

(Idx == 0 && !Ptr.getFieldDesc()->isArray()) {

1809 new

(&Ptr.deref<

T

>())

T

(

Value

);

1822

template <PrimType Name, class T = typename PrimConv<Name>::T>

1824 const T

&

Value

= S.Stk.pop<

T

>();

1826 if

(Ptr.isUnknownSizeArray())

1831 if

(Idx == 0 && !Ptr.getFieldDesc()->isArray()) {

1833 new

(&Ptr.deref<

T

>())

T

(

Value

);

1852 return DoMemcpy

(S, OpPC, Src, Dest);

1866 if

(std::optional<Pointer> Ptr = MP.toPointer(S.Ctx)) {

1877template

<

class

T, ArithOp Op>

1879 const Pointer

&Ptr,

bool

IsPointerArith =

false

) {

1881 if

(Offset.isZero()) {

1900

uint64_t O =

static_cast<

uint64_t

>

(Offset) * Ptr.

elemSize

();

1907

uint64_t O =

static_cast<

uint64_t

>

(Offset);

1915

S.CCEDiag(S.Current->getSource(OpPC), diag::note_constexpr_array_index)

1923

uint64_t MaxIndex =

static_cast<

uint64_t

>

(Ptr.

getNumElems

());

1932 auto

DiagInvalidOffset = [&]() ->

void

{

1933 const unsigned Bits

= Offset.bitWidth();

1934 APSInt

APOffset(Offset.toAPSInt().extend(

Bits

+ 2),

false

);

1938

(Op ==

ArithOp::Add

) ? (APIndex + APOffset) : (APIndex - APOffset);

1939

S.CCEDiag(S.Current->getSource(OpPC), diag::note_constexpr_array_index)

1940

<< NewIndex <<

static_cast<int>

(!Ptr.

inArray

()) << MaxIndex;

1945

uint64_t IOffset =

static_cast<

uint64_t

>

(Offset);

1946

uint64_t MaxOffset = MaxIndex - Index;

1950 if

(Offset.isNegative() && (Offset.isMin() || -IOffset > Index))

1951

DiagInvalidOffset();

1954 if

(Offset.isPositive() && IOffset > MaxOffset)

1955

DiagInvalidOffset();

1958 if

(Offset.isPositive() && Index < IOffset)

1959

DiagInvalidOffset();

1962 if

(Offset.isNegative() && (Offset.isMin() || -IOffset > MaxOffset))

1963

DiagInvalidOffset();

1971

int64_t WideIndex =

static_cast<

int64_t

>

(Index);

1972

int64_t WideOffset =

static_cast<

int64_t

>

(Offset);

1975 Result

= WideIndex + WideOffset;

1977 Result

= WideIndex - WideOffset;

1992

template <PrimType Name, class T = typename PrimConv<Name>::T>

1994 const T

&Offset = S.Stk.pop<

T

>();

1996 if

(Ptr.isBlockPointer())

1998 return

OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr,

2002

template <PrimType Name, class T = typename PrimConv<Name>::T>

2004 const T

&Offset = S.Stk.pop<

T

>();

2006 return

OffsetHelper<T, ArithOp::Sub>(S, OpPC, Offset, Ptr,

2010template

<ArithOp Op>

2026

OneT One = OneT::from(1);

2027 if

(!OffsetHelper<OneT, Op>(S, OpPC, One,

P

,

true

))

2041 return

IncDecPtrHelper<ArithOp::Add>(S, OpPC, Ptr);

2050 return

IncDecPtrHelper<ArithOp::Sub>(S, OpPC, Ptr);

2056

template <PrimType Name, class T = typename PrimConv<Name>::T>

2061 for

(

const Pointer

&

P

: {LHS, RHS}) {

2062 if

(

P

.isZeroSizeArray()) {

2064 while

(

auto

*AT = dyn_cast<ArrayType>(PtrT))

2065

PtrT = AT->getElementType();

2069

S.FFDiag(S.Current->getSource(OpPC),

2070

diag::note_constexpr_pointer_subtraction_zero_size)

2078

S.Stk.push<

T

>(T::from(LHS.

getIndex

()));

2087 if

(LHS.

isZero

() && RHS.isZero()) {

2096 T

B = RHS.isBlockPointer()

2097

? (RHS.isElementPastEnd() ? T::from(RHS.getNumElems())

2098

: T::from(RHS.getIndex()))

2099

: T::from(RHS.getIntegerRepresentation());

2101 return

AddSubMulHelper<T, T::sub, std::minus>(S, OpPC, A.bitWidth(), A, B);

2109

S.Current->destroy(I);

2114

S.Current->initScope(I);

2125

S.Stk.push<

U

>(U::from(S.Stk.pop<

T

>()));

2132

llvm::RoundingMode RM) {

2141

FixedPointSemantics::getFromOpaqueInt(FPS);

2142 const auto

&Source = S.Stk.pop<

FixedPoint

>();

2156

template <PrimType Name, class T = typename PrimConv<Name>::T>

2163

template <PrimType Name, class T = typename PrimConv<Name>::T>

2170

template <PrimType Name, class T = typename PrimConv<Name>::T>

2172 const

llvm::fltSemantics *Sem, uint32_t FPOI) {

2173 const T

&From = S.Stk.pop<

T

>();

2174 APSInt

FromAP = From.toAPSInt();

2185

template <PrimType Name, class T = typename PrimConv<Name>::T>

2189 if constexpr

(std::is_same_v<T, Boolean>) {

2198 if

((Status & APFloat::opStatus::opInvalidOp)) {

2199 const Expr

*

E

= S.Current->getExpr(OpPC);

2202

S.CCEDiag(

E

, diag::note_constexpr_overflow) << F.

getAPFloat

() <<

Type

;

2203 if

(S.noteUndefinedBehavior()) {

2217

uint32_t BitWidth, uint32_t FPOI) {

2224 if

((Status & APFloat::opStatus::opInvalidOp) && F.

isFinite

())

2233

uint32_t BitWidth, uint32_t FPOI) {

2240 if

((Status & APFloat::opStatus::opInvalidOp) && F.

isFinite

())

2249 const

Pointer &Ptr,

unsigned

BitWidth);

2253

template <PrimType Name, class T = typename PrimConv<Name>::T>

2264

template <PrimType Name, class T = typename PrimConv<Name>::T>

2267 const T

&

Int

= S.Stk.pop<

T

>();

2298 const

llvm::fltSemantics *Sem) {

2299 const auto

&Fixed = S.Stk.pop<

FixedPoint

>();

2301

S.Stk.push<

Floating

>(Fixed.toFloat(Sem));

2305

template <PrimType Name, class T = typename PrimConv<Name>::T>

2307 const auto

&Fixed = S.Stk.pop<

FixedPoint

>();

2310 APSInt Int

= Fixed.toInt(T::bitWidth(), T::isSigned(), &Overflow);

2315

S.Stk.push<

T

>(

Int

);

2320 const auto

&Ptr = S.Stk.peek<

Pointer

>();

2322 if

(SrcIsVoidPtr && S.

getLangOpts

().CPlusPlus) {

2323 bool

HasValidResult = !Ptr.

isZero

();

2325 if

(HasValidResult) {

2328 const SourceInfo

&

E

= S.Current->getSource(OpPC);

2329

S.CCEDiag(

E

, diag::note_constexpr_invalid_cast)

2330

<< 3 <<

"'void *'"

<< S.Current->getRange(OpPC);

2333 const SourceInfo

&

E

= S.Current->getSource(OpPC);

2334

S.CCEDiag(

E

, diag::note_constexpr_invalid_cast)

2335

<< 2 << S.

getLangOpts

().CPlusPlus << S.Current->getRange(OpPC);

2345

template <PrimType Name, class T = typename PrimConv<Name>::T>

2347

S.Stk.push<

T

>(T::zero());

2361

template <PrimType Name, class T = typename PrimConv<Name>::T>

2366

S.Stk.push<

T

>(

Value

, Desc);

2370

template <PrimType Name, class T = typename PrimConv<Name>::T>

2372 const auto

&

P

= S.Stk.pop<

T

>();

2385 if

(S.checkingPotentialConstantExpression()) {

2394 if

(!

This

.isDummy()) {

2395

assert(isa<CXXMethodDecl>(S.Current->getFunction()->getDecl()));

2396

assert(

This

.getRecord());

2398 This

.getRecord()->getDecl() ==

2399

cast<CXXMethodDecl>(S.Current->getFunction()->getDecl())->getParent());

2407

assert(S.Current->getFunction()->hasRVO());

2408 if

(S.checkingPotentialConstantExpression())

2410

S.Stk.push<

Pointer

>(S.Current->getRVOPtr());

2418template

<

class

LT,

class

RT, ShiftDir Dir>

2420 const unsigned Bits

= LHS.bitWidth();

2424

RT::bitAnd(RHS, RT::from(LHS.bitWidth() - 1, RHS.bitWidth()),

2425

RHS.bitWidth(), &RHS);

2427 if

(RHS.isNegative()) {

2431

S.CCEDiag(

Loc

, diag::note_constexpr_negative_shift) << RHS.toAPSInt();

2432 if

(!S.noteUndefinedBehavior())

2440 if

(!CheckShift<Dir>(S, OpPC, LHS, RHS,

Bits

))

2449 typename

LT::AsUnsigned R;

2450 unsigned

MaxShiftAmount = LHS.bitWidth() - 1;

2452 if

(

Compare

(RHS, RT::from(MaxShiftAmount, RHS.bitWidth())) ==

2454 if

(LHS.isNegative())

2455

R = LT::AsUnsigned::zero(LHS.bitWidth());

2457

RHS = RT::from(LHS.countLeadingZeros(), RHS.bitWidth());

2458

LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),

2459

LT::AsUnsigned::from(RHS,

Bits

),

Bits

, &R);

2461

}

else if

(LHS.isNegative()) {

2463

R = LT::AsUnsigned::zero(LHS.bitWidth());

2466 typename

LT::AsUnsigned LHSU = LT::AsUnsigned::from(-LHS);

2467

LT::AsUnsigned::shiftLeft(LHSU, LT::AsUnsigned::from(RHS,

Bits

),

Bits

,

2473

LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),

2474

LT::AsUnsigned::from(RHS,

Bits

),

Bits

, &R);

2478 if

(

Compare

(RHS, RT::from(MaxShiftAmount, RHS.bitWidth())) ==

2480

R = LT::AsUnsigned::from(-1);

2484

LT::shiftRight(LHS, LT::from(RHS,

Bits

),

Bits

, &A);

2485

R = LT::AsUnsigned::from(A);

2489

S.Stk.push<

LT

>(LT::from(R));

2493template

<PrimType NameL, PrimType NameR>

2497 auto

RHS = S.Stk.pop<RT>();

2498 auto

LHS = S.Stk.pop<

LT

>();

2500 return

DoShift<LT, RT, ShiftDir::Right>(S, OpPC, LHS, RHS);

2503template

<PrimType NameL, PrimType NameR>

2507 auto

RHS = S.Stk.pop<RT>();

2508 auto

LHS = S.Stk.pop<

LT

>();

2510 return

DoShift<LT, RT, ShiftDir::Left>(S, OpPC, LHS, RHS);

2516

llvm::FixedPointSemantics LHSSema = LHS.

getSemantics

();

2518 unsigned

ShiftBitWidth =

2519

LHSSema.getWidth() - (

unsigned

)LHSSema.hasUnsignedPadding() - 1;

2524 if

(RHS.isNegative()) {

2525

S.CCEDiag(S.Current->getLocation(OpPC), diag::note_constexpr_negative_shift)

2527

}

else if

(

static_cast<unsigned>

(RHS.toAPSInt().getLimitedValue(

2528

ShiftBitWidth)) != RHS.toAPSInt()) {

2529 const Expr

*

E

= S.Current->getExpr(OpPC);

2530

S.CCEDiag(

E

, diag::note_constexpr_large_shift)

2531

<< RHS.toAPSInt() <<

E

->

getType

() << ShiftBitWidth;

2555

S.FFDiag(EndLoc, diag::note_constexpr_no_return);

2583

template <PrimType Name, class T = typename PrimConv<Name>::T>

2585 const T

&Offset = S.Stk.pop<

T

>();

2588 if

(!Ptr.isZero() && !Offset.isZero()) {

2593 if

(!OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr))

2599

template <PrimType Name, class T = typename PrimConv<Name>::T>

2601 const T

&Offset = S.Stk.pop<

T

>();

2604 if

(!Ptr.isZero() && !Offset.isZero()) {

2609 if

(!OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr))

2615

template <PrimType Name, class T = typename PrimConv<Name>::T>

2627

template <PrimType Name, class T = typename PrimConv<Name>::T>

2639

template <PrimType Name, class T = typename PrimConv<Name>::T>

2641

uint32_t DestIndex, uint32_t Size) {

2642 const auto

&SrcPtr = S.Stk.pop<

Pointer

>();

2643 const auto

&DestPtr = S.Stk.peek<

Pointer

>();

2645 for

(uint32_t I = 0; I != Size; ++I) {

2676 const SourceInfo

&

E

= S.Current->getSource(OpPC);

2677

S.FFDiag(

E

, diag::note_constexpr_unsupported_unsized_array);

2688

template <PrimType Name, class T = typename PrimConv<Name>::T>

2690 const T

&IntVal = S.Stk.pop<

T

>();

2693

S.CCEDiag(S.Current->getSource(OpPC), diag::note_constexpr_invalid_cast)

2696

S.Stk.push<

Pointer

>(

static_cast<

uint64_t

>

(IntVal), Desc);

2708

S.Stk.push<

Pointer

>(MP.getBase());

2715 const auto

*FD = cast<FunctionDecl>(MP.getDecl());

2716 const auto

*

Func

= S.getContext().getOrCreateFunction(FD);

2726

S.FFDiag(

Loc

, diag::note_invalid_subexpr_in_const_expr)

2727

<< S.Current->getRange(OpPC);

2733

S.FFDiag(

Loc

, diag::note_constexpr_stmt_expr_unsupported)

2734

<< S.Current->getRange(OpPC);

2741 return

S.noteSideEffect();

2751

S.CCEDiag(

Loc

, diag::note_constexpr_invalid_cast)

2752

<<

static_cast<unsigned>

(Kind) << S.Current->getRange(OpPC);

2764 const auto

*VD = cast<VarDecl>(DR->

getDecl

());

2765

S.FFDiag(

Loc

, diag::note_constexpr_var_init_non_constant, 1) << VD;

2766

S.Note(VD->getLocation(), diag::note_declared_at);

2774 if

(S.inConstantContext()) {

2775 const SourceRange

&ArgRange = S.Current->getRange(OpPC);

2776 const Expr

*

E

= S.Current->getExpr(OpPC);

2777

S.CCEDiag(

E

, diag::note_constexpr_non_const_vectorelements) << ArgRange;

2783 const auto

Val = S.Stk.pop<

Boolean

>();

2790

S.CCEDiag(

Loc

, diag::note_constexpr_assumption_failed);

2794

template <PrimType Name, class T = typename PrimConv<Name>::T>

2797 for

(

size_t

I = 0; I !=

E

->getNumExpressions(); ++I)

2798

ArrayIndices.emplace_back(S.Stk.pop<int64_t>());

2804

S.Stk.push<

T

>(T::from(

Result

));

2809

template <PrimType Name, class T = typename PrimConv<Name>::T>

2811 const T

&Arg = S.Stk.peek<

T

>();

2816

S.CCEDiag(

Loc

, diag::note_non_null_attribute_failed);

2824

template <PrimType Name, class T = typename PrimConv<Name>::T>

2828 const APSInt

Val = S.Stk.peek<

T

>().toAPSInt();

2830 if

(S.inConstantContext())

2836template

<PrimType TIn, PrimType TOut>

2842 const

FromT &OldPtr = S.Stk.pop<FromT>();

2844 if constexpr

(std::is_same_v<FromT, FunctionPointer> &&

2845

std::is_same_v<ToT, Pointer>) {

2846

S.Stk.push<

Pointer

>(OldPtr.getFunction(), OldPtr.getOffset());

2848

}

else if constexpr

(std::is_same_v<FromT, Pointer> &&

2849

std::is_same_v<ToT, FunctionPointer>) {

2850 if

(OldPtr.isFunctionPointer()) {

2851

S.Stk.push<

FunctionPointer

>(OldPtr.asFunctionPointer().getFunction(),

2852

OldPtr.getByteOffset());

2857

S.Stk.push<ToT>(ToT(OldPtr.getIntegerRepresentation(),

nullptr

));

2869 if

(VD == S.EvaluatingDecl)

2873

S.CCEDiag(VD->

getLocation

(), diag::note_constexpr_static_local)

2887 Block

*B = Allocator.allocate(Desc, S.Ctx.getEvalID(),

2896

template <PrimType Name, class SizeT = typename PrimConv<Name>::T>

2902

SizeT NumElements = S.Stk.pop<SizeT>();

2908

S.Stk.push<

Pointer

>(0,

nullptr

);

2914

Allocator.allocate(Source,

T

,

static_cast<size_t>

(NumElements),

2922

template <PrimType Name, class SizeT = typename PrimConv<Name>::T>

2928

SizeT NumElements = S.Stk.pop<SizeT>();

2935

S.Stk.push<

Pointer

>(0, ElementDesc);

2941

Allocator.allocate(ElementDesc,

static_cast<size_t>

(NumElements),

2950bool Free

(InterpState &S, CodePtr OpPC,

bool

DeleteIsArrayForm,

2951 bool

IsGlobalDelete);

2959 return

S.maybeDiagnoseDanglingAllocations();

2965

std::optional<uint64_t> ArraySize = std::nullopt);

2967

template <PrimType Name, class T = typename PrimConv<Name>::T>

2969 const auto

&Size = S.Stk.pop<

T

>();

2974

template <PrimType Name, class T = typename PrimConv<Name>::T>

2976

uint32_t ResultBitWidth,

2977 const

llvm::fltSemantics *Sem) {

2983 if constexpr

(std::is_same_v<T, Pointer>) {

2989 size_t

BuffSize = ResultBitWidth / 8;

2991 bool

HasIndeterminateBits =

false

;

2993 Bits

FullBitWidth(ResultBitWidth);

2994 Bits

BitWidth = FullBitWidth;

2996 if constexpr

(std::is_same_v<T, Floating>) {

2998

BitWidth =

Bits

(llvm::APFloatBase::getSizeInBits(*Sem));

3001 if

(!

DoBitCast

(S, OpPC, FromPtr, Buff.data(), BitWidth, FullBitWidth,

3002

HasIndeterminateBits))

3005 if

(!

CheckBitCast

(S, OpPC, HasIndeterminateBits, TargetIsUCharOrByte))

3008 if constexpr

(std::is_same_v<T, Floating>) {

3010

S.Stk.push<

Floating

>(T::bitcastFromMemory(Buff.data(), *Sem));

3013

S.Stk.push<

T

>(T::bitcastFromMemory(Buff.data(), ResultBitWidth));

3033bool GetTypeid

(InterpState &S, CodePtr OpPC,

const Type

*TypePtr,

3034 const Type

*TypeInfoType);

3036bool DiagTypeid

(InterpState &S, CodePtr OpPC);

3043 if constexpr

(std::is_pointer<T>::value) {

3044

uint32_t ID = OpPC.

read

<uint32_t>();

3045 return reinterpret_cast<T>

(S.P.getNativePointer(ID));

3047 return

OpPC.

read

<

T

>();

3058inline

IntegralAP<false> ReadArg<IntegralAP<false>>(InterpState &S,

3061

OpPC +=

align

(I.bytesToSerialize());

3066inline

IntegralAP<true> ReadArg<IntegralAP<true>>(InterpState &S,

3069

OpPC +=

align

(I.bytesToSerialize());

Defines the clang::ASTContext interface.

ASTImporterLookupTable & LT

void HandleComplexComplexDiv(APFloat A, APFloat B, APFloat C, APFloat D, APFloat &ResR, APFloat &ResI)

void HandleComplexComplexMul(APFloat A, APFloat B, APFloat C, APFloat D, APFloat &ResR, APFloat &ResI)

static std::string toString(const clang::SanitizerSet &Sanitizers)

Produce a string containing comma-separated names of sanitizers in Sanitizers set.

APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...

QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, const Expr *SizeExpr, ArraySizeModifier ASM, unsigned IndexTypeQuals) const

Return the unique reference to the type for a constant array of the specified element type.

Represents a static or instance method of a struct/union/class.

CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).

const ValueInfo * getValueInfo(ComparisonCategoryResult ValueKind) const

ComparisonCategoryResult makeWeakResult(ComparisonCategoryResult Res) const

Converts the specified result kind into the correct result kind for this category.

static unsigned getMaxSizeBits(const ASTContext &Context)

Determine the maximum number of active bits that an array's size can require, which limits the maximu...

A reference to a declared variable, function, enum, etc.

Decl - This represents one declaration (or definition), e.g.

SourceLocation getLocation() const

bool isFixed() const

Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...

This represents one expression.

SourceLocation getExprLoc() const LLVM_READONLY

getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...

static FPOptions getFromOpaqueInt(storage_type Value)

RoundingMode getRoundingMode() const

Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...

APValue * getOrCreateValue(bool MayCreate) const

Get the storage for the constant value of a materialized temporary of static storage duration.

Expr * getTemporaryExpr()

Retrieve the expression to which the temporary materialization conversion was applied.

OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...

A (possibly-)qualified type.

Represents a struct/union/class.

ASTContext & getASTContext() const

const LangOptions & getLangOpts() const

Encodes a location in the source.

A trivial tuple used to represent a source range.

SourceRange getSourceRange() const LLVM_READONLY

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...

The base class of the type hierarchy.

Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...

Represents a variable declaration or definition.

bool isStaticLocal() const

Returns true if a variable with function scope is a static local variable.

ThreadStorageClassSpecifier getTSCSpec() const

bool isLocalVarDecl() const

Returns true for local variable declarations other than parameters.

bool isUsableInConstantExpressions(const ASTContext &C) const

Determine whether this variable's value can be used in a constant expression, according to the releva...

A memory block, either on the stack or in the heap.

Wrapper around boolean types.

static Boolean from(T Value)

Pointer into the code segment.

std::enable_if_t<!std::is_pointer< T >::value, T > read()

Reads data and advances the pointer.

Manages dynamic memory allocations done during bytecode interpretation.

Wrapper around fixed point types.

llvm::FixedPointSemantics getSemantics() const

static bool shiftRight(const FixedPoint A, const FixedPoint B, unsigned OpBits, FixedPoint *R)

static FixedPoint deserialize(const std::byte *Buff)

static bool shiftLeft(const FixedPoint A, const FixedPoint B, unsigned OpBits, FixedPoint *R)

static FixedPoint from(const APSInt &I, llvm::FixedPointSemantics Sem, bool *Overflow)

size_t bytesToSerialize() const

static APFloat::opStatus div(const Floating &A, const Floating &B, llvm::RoundingMode RM, Floating *R)

static Floating deserialize(const std::byte *Buff)

static APFloat::opStatus sub(const Floating &A, const Floating &B, llvm::RoundingMode RM, Floating *R)

const APFloat & getAPFloat() const

static APFloat::opStatus increment(const Floating &A, llvm::RoundingMode RM, Floating *R)

static APFloat::opStatus fromIntegral(APSInt Val, const llvm::fltSemantics &Sem, llvm::RoundingMode RM, Floating &Result)

Floating toSemantics(const llvm::fltSemantics *Sem, llvm::RoundingMode RM) const

size_t bytesToSerialize() const

static APFloat::opStatus add(const Floating &A, const Floating &B, llvm::RoundingMode RM, Floating *R)

static APFloat::opStatus mul(const Floating &A, const Floating &B, llvm::RoundingMode RM, Floating *R)

static APFloat::opStatus decrement(const Floating &A, llvm::RoundingMode RM, Floating *R)

APFloat::opStatus convertToInteger(APSInt &Result) const

const Function * getFunction() const

ComparisonCategoryResult compare(const FunctionPointer &RHS) const

std::string toDiagnosticString(const ASTContext &Ctx) const

static IntegralAP< Signed > deserialize(const std::byte *Buff)

static IntegralAP zero(int32_t BitWidth)

static IntegralAP from(T Value, unsigned NumBits=0)

Wrapper around numeric types.

Frame storing local variables.

static void free(InterpFrame *F)

ComparisonCategoryResult compare(const MemberPointer &RHS) const

A pointer to a memory block, live or dead.

static bool hasSameBase(const Pointer &A, const Pointer &B)

Checks if two pointers are comparable.

Pointer narrow() const

Restricts the scope of an array element pointer.

void deactivate() const

Deactivates an entire strurcutre.

bool isInitialized() const

Checks if an object was initialized.

Pointer atIndex(uint64_t Idx) const

Offsets a pointer inside an array.

bool isDummy() const

Checks if the pointer points to a dummy value.

Pointer atFieldSub(unsigned Off) const

Subtract the given offset from the current Base and Offset of the pointer.

bool isExtern() const

Checks if the storage is extern.

int64_t getIndex() const

Returns the index into an array.

Pointer atField(unsigned Off) const

Creates a pointer to a field.

T & deref() const

Dereferences the pointer, if it's live.

unsigned getNumElems() const

Returns the number of elements.

bool isUnknownSizeArray() const

Checks if the structure is an array of unknown size.

void activate() const

Activats a field.

bool isIntegralPointer() const

bool isArrayRoot() const

Whether this array refers to an array, but not to the first element.

bool inArray() const

Checks if the innermost field is an array.

uint64_t getByteOffset() const

Returns the byte offset from the start.

std::string toDiagnosticString(const ASTContext &Ctx) const

Converts the pointer to a string usable in diagnostics.

bool isZero() const

Checks if the pointer is null.

ComparisonCategoryResult compare(const Pointer &Other) const

Compare two pointers.

const IntPointer & asIntPointer() const

bool isRoot() const

Pointer points directly to a block.

const Descriptor * getDeclDesc() const

Accessor for information about the declaration site.

unsigned getOffset() const

Returns the offset into an array.

bool isOnePastEnd() const

Checks if the index is one past end.

uint64_t getIntegerRepresentation() const

Pointer expand() const

Expands a pointer to the containing array, undoing narrowing.

bool isElementPastEnd() const

Checks if the pointer is an out-of-bounds element pointer.

bool isBlockPointer() const

const FunctionPointer & asFunctionPointer() const

bool isFunctionPointer() const

const Descriptor * getFieldDesc() const

Accessors for information about the innermost field.

size_t elemSize() const

Returns the element size of the innermost field.

bool canBeInitialized() const

If this pointer has an InlineDescriptor we can use to initialize.

const BlockPointer & asBlockPointer() const

void initialize() const

Initializes a field.

Describes the statement/declaration an opcode was generated from.

static bool ShiftFixedPoint(InterpState &S, CodePtr OpPC, bool Left)

bool GetPtrFieldPop(InterpState &S, CodePtr OpPC, uint32_t Off)

bool InitPop(InterpState &S, CodePtr OpPC)

bool Shr(InterpState &S, CodePtr OpPC)

bool InitGlobalTemp(InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp)

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes ...

bool IncPop(InterpState &S, CodePtr OpPC)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by ...

bool ArrayElemPop(InterpState &S, CodePtr OpPC, uint32_t Index)

bool GetPtrBasePop(InterpState &S, CodePtr OpPC, uint32_t Off)

bool CastPointerIntegralAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

bool ArrayElem(InterpState &S, CodePtr OpPC, uint32_t Index)

bool GT(InterpState &S, CodePtr OpPC)

bool CastPointerIntegralAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if a value can be initialized.

static bool CastFloatingIntegralAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI)

bool GetMemberPtrBase(InterpState &S, CodePtr OpPC)

bool DecPop(InterpState &S, CodePtr OpPC)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by ...

bool GetThisField(InterpState &S, CodePtr OpPC, uint32_t I)

bool NarrowPtr(InterpState &S, CodePtr OpPC)

bool GetMemberPtrBasePop(InterpState &S, CodePtr OpPC, int32_t Off)

bool InitThisField(InterpState &S, CodePtr OpPC, uint32_t I)

Floating ReadArg< Floating >(InterpState &S, CodePtr &OpPC)

bool Incf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool SideEffect(InterpState &S, CodePtr OpPC)

static bool ZeroIntAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

bool GetParam(InterpState &S, CodePtr OpPC, uint32_t I)

bool GetTypeidPtr(InterpState &S, CodePtr OpPC, const Type *TypeInfoType)

bool Mulf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool InitElemPop(InterpState &S, CodePtr OpPC, uint32_t Idx)

The same as InitElem, but pops the pointer as well.

bool StoreBitField(InterpState &S, CodePtr OpPC)

bool CheckDowncast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Offset)

Checks if the dowcast using the given offset is possible with the given pointer.

bool CheckNewDeleteForms(InterpState &S, CodePtr OpPC, DynamicAllocator::Form AllocForm, DynamicAllocator::Form DeleteForm, const Descriptor *D, const Expr *NewExpr)

Diagnose mismatched new[]/delete or new/delete[] pairs.

bool BitCast(InterpState &S, CodePtr OpPC)

bool LoadPop(InterpState &S, CodePtr OpPC)

bool Null(InterpState &S, CodePtr OpPC, uint64_t Value, const Descriptor *Desc)

static llvm::RoundingMode getRoundingMode(FPOptions FPO)

static bool IncPtr(InterpState &S, CodePtr OpPC)

bool CheckDeclRef(InterpState &S, CodePtr OpPC, const DeclRefExpr *DR)

We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropr...

bool GetTypeid(InterpState &S, CodePtr OpPC, const Type *TypePtr, const Type *TypeInfoType)

Typeid support.

bool Dup(InterpState &S, CodePtr OpPC)

bool CheckCallDepth(InterpState &S, CodePtr OpPC)

Checks if calling the currently active function would exceed the allowed call depth.

bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This)

Checks the 'this' pointer.

bool SetField(InterpState &S, CodePtr OpPC, uint32_t I)

bool CheckNonNullArg(InterpState &S, CodePtr OpPC)

bool InterpretOffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, llvm::ArrayRef< int64_t > ArrayIndices, int64_t &Result)

Interpret an offsetof operation.

bool SetThreeWayComparisonField(InterpState &S, CodePtr OpPC, const Pointer &Ptr, const APSInt &IntValue)

Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type.

static bool IncDecPtrHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

bool GetPtrLocal(InterpState &S, CodePtr OpPC, uint32_t I)

bool Addf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool CheckDivRem(InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS)

Checks if Div/Rem operation on LHS and RHS is valid.

bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc)

Checks if the Descriptor is of a constexpr or const global variable.

bool CheckDecl(InterpState &S, CodePtr OpPC, const VarDecl *VD)

bool CheckPointerToIntegralCast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, unsigned BitWidth)

bool AddSubMulHelper(InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS)

bool GetPtrField(InterpState &S, CodePtr OpPC, uint32_t Off)

1) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack

bool Div(InterpState &S, CodePtr OpPC)

1) Pops the RHS from the stack.

bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if a pointer points to a mutable field.

bool GetFnPtr(InterpState &S, CodePtr OpPC, const Function *Func)

bool GetGlobalUnchecked(InterpState &S, CodePtr OpPC, uint32_t I)

Same as GetGlobal, but without the checks.

bool GetPtrActiveThisField(InterpState &S, CodePtr OpPC, uint32_t Off)

bool SubPtr(InterpState &S, CodePtr OpPC)

1) Pops a Pointer from the stack.

bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)

Checks if Ptr is a one-past-the-end pointer.

bool GetPtrGlobal(InterpState &S, CodePtr OpPC, uint32_t I)

bool handleFixedPointOverflow(InterpState &S, CodePtr OpPC, const FixedPoint &FP)

bool Mulc(InterpState &S, CodePtr OpPC)

bool RetVoid(InterpState &S, CodePtr &PC)

bool ArrayElemPtr(InterpState &S, CodePtr OpPC)

bool NE(InterpState &S, CodePtr OpPC)

bool NoRet(InterpState &S, CodePtr OpPC)

bool GetIntPtr(InterpState &S, CodePtr OpPC, const Descriptor *Desc)

bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)

Checks if a value can be loaded from a block.

static bool ZeroIntAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

bool BitCastPrim(InterpState &S, CodePtr OpPC, bool TargetIsUCharOrByte, uint32_t ResultBitWidth, const llvm::fltSemantics *Sem)

bool Shl(InterpState &S, CodePtr OpPC)

bool RVOPtr(InterpState &S, CodePtr OpPC)

llvm::FixedPointSemantics FixedPointSemantics

bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)

bool CastPointerIntegral(InterpState &S, CodePtr OpPC)

constexpr bool isPtrType(PrimType T)

bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr, bool IsPointerArith=false)

bool DecfPop(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool SubOffset(InterpState &S, CodePtr OpPC)

constexpr size_t align(size_t Size)

Aligns a size to the pointer alignment.

bool BitXor(InterpState &S, CodePtr OpPC)

1) Pops the RHS from the stack.

bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)

Checks if a pointer is in range.

bool CastAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

bool ExpandPtr(InterpState &S, CodePtr OpPC)

bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)

Checks if a method is pure virtual.

bool Store(InterpState &S, CodePtr OpPC)

bool Divc(InterpState &S, CodePtr OpPC)

bool DoBitCastPtr(InterpState &S, CodePtr OpPC, const Pointer &FromPtr, Pointer &ToPtr)

bool GetField(InterpState &S, CodePtr OpPC, uint32_t I)

1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack

bool ArrayElemPtrPop(InterpState &S, CodePtr OpPC)

bool This(InterpState &S, CodePtr OpPC)

bool InitScope(InterpState &S, CodePtr OpPC, uint32_t I)

bool CheckDynamicMemoryAllocation(InterpState &S, CodePtr OpPC)

Checks if dynamic memory allocation is available in the current language mode.

bool InitField(InterpState &S, CodePtr OpPC, uint32_t I)

1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of ...

bool CmpHelperEQ(InterpState &S, CodePtr OpPC, CompareFn Fn)

llvm::function_ref< bool(ComparisonCategoryResult)> CompareFn

T ReadArg(InterpState &S, CodePtr &OpPC)

bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)

Checks if a pointer is live and accessible.

bool CastFloatingIntegral(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool ArrayDecay(InterpState &S, CodePtr OpPC)

Just takes a pointer and checks if it's an incomplete array type.

bool DiagTypeid(InterpState &S, CodePtr OpPC)

bool CheckFinalLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

This is not used by any of the opcodes directly.

bool InitGlobalTempComp(InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp)

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized ...

bool IncDecHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

bool CheckBitCast(InterpState &S, CodePtr OpPC, bool HasIndeterminateBits, bool TargetIsUCharOrByte)

bool GetLocal(InterpState &S, CodePtr OpPC, uint32_t I)

bool OffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E)

bool BitAnd(InterpState &S, CodePtr OpPC)

1) Pops the RHS from the stack.

bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, unsigned Bits)

Checks if the shift operation is legal.

static bool handleOverflow(InterpState &S, CodePtr OpPC, const T &SrcValue)

FixedPoint ReadArg< FixedPoint >(InterpState &S, CodePtr &OpPC)

static bool CastFloatingFixedPoint(InterpState &S, CodePtr OpPC, uint32_t FPS)

void diagnoseEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED, const APSInt &Value)

bool LE(InterpState &S, CodePtr OpPC)

PrimType

Enumeration of the primitive types of the VM.

bool CheckNewTypeMismatchArray(InterpState &S, CodePtr OpPC, const Expr *E)

bool Zero(InterpState &S, CodePtr OpPC)

bool InitThisBitField(InterpState &S, CodePtr OpPC, const Record::Field *F, uint32_t FieldOffset)

bool Unsupported(InterpState &S, CodePtr OpPC)

bool InvalidDeclRef(InterpState &S, CodePtr OpPC, const DeclRefExpr *DR, bool InitializerFailed)

bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if a value can be stored in a block.

bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)

Checks if a pointer is null.

bool CheckDeleteSource(InterpState &S, CodePtr OpPC, const Expr *Source, const Pointer &Ptr)

Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.

bool CheckFloatResult(InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status, FPOptions FPO)

Checks if the result of a floating-point operation is valid in the current context.

bool CastFP(InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM)

1) Pops a Floating from the stack.

ComparisonCategoryResult Compare(const T &X, const T &Y)

Helper to compare two comparable types.

bool SetThisField(InterpState &S, CodePtr OpPC, uint32_t I)

bool StoreBitFieldPop(InterpState &S, CodePtr OpPC)

bool CallVar(InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)

static bool DecPtr(InterpState &S, CodePtr OpPC)

static bool CheckAllocations(InterpState &S, CodePtr OpPC)

bool Alloc(InterpState &S, CodePtr OpPC, const Descriptor *Desc)

bool InvalidShuffleVectorIndex(InterpState &S, CodePtr OpPC, uint32_t Index)

bool ToMemberPtr(InterpState &S, CodePtr OpPC)

static bool CastIntegralFixedPoint(InterpState &S, CodePtr OpPC, uint32_t FPS)

bool Rem(InterpState &S, CodePtr OpPC)

1) Pops the RHS from the stack.

bool VirtBaseHelper(InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)

bool CheckNewTypeMismatch(InterpState &S, CodePtr OpPC, const Expr *E, std::optional< uint64_t > ArraySize)

Check if the initializer and storage types of a placement-new expression match.

bool GetMemberPtr(InterpState &S, CodePtr OpPC, const ValueDecl *D)

bool Dump(InterpState &S, CodePtr OpPC)

bool SizelessVectorElementSize(InterpState &S, CodePtr OpPC)

static bool PtrPtrCast(InterpState &S, CodePtr OpPC, bool SrcIsVoidPtr)

bool CheckLiteralType(InterpState &S, CodePtr OpPC, const Type *T)

bool IsNonNull(InterpState &S, CodePtr OpPC)

bool GetPtrThisField(InterpState &S, CodePtr OpPC, uint32_t Off)

bool GetPtrActiveField(InterpState &S, CodePtr OpPC, uint32_t Off)

bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if the array is offsetable.

bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Check if a global variable is initialized.

bool GetPtrDerivedPop(InterpState &S, CodePtr OpPC, uint32_t Off)

bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize)

Checks if all the arguments annotated as 'nonnull' are in fact not null.

bool GetPtrBase(InterpState &S, CodePtr OpPC, uint32_t Off)

bool SetParam(InterpState &S, CodePtr OpPC, uint32_t I)

bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)

Checks if a pointer is a dummy pointer.

bool GetMemberPtrDecl(InterpState &S, CodePtr OpPC)

bool CmpHelper< FunctionPointer >(InterpState &S, CodePtr OpPC, CompareFn Fn)

Function pointers cannot be compared in an ordered way.

bool Comp(InterpState &S, CodePtr OpPC)

1) Pops the value from the stack.

static bool CastFixedPointFloating(InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem)

bool Divf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool DecayPtr(InterpState &S, CodePtr OpPC)

OldPtr -> Integer -> NewPtr.

bool GetPtrVirtBasePop(InterpState &S, CodePtr OpPC, const RecordDecl *D)

bool StorePop(InterpState &S, CodePtr OpPC)

void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC, const Function *Func)

bool SetLocal(InterpState &S, CodePtr OpPC, uint32_t I)

1) Pops the value from the stack.

bool FinishInit(InterpState &S, CodePtr OpPC)

static bool CastFloatingIntegralAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI)

bool Mul(InterpState &S, CodePtr OpPC)

bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS)

bool InitElem(InterpState &S, CodePtr OpPC, uint32_t Idx)

1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the ...

bool Destroy(InterpState &S, CodePtr OpPC, uint32_t I)

bool Pop(InterpState &S, CodePtr OpPC)

size_t primSize(PrimType Type)

Returns the size of a primitive type in bytes.

bool InitBitField(InterpState &S, CodePtr OpPC, const Record::Field *F)

bool CallBI(InterpState &S, CodePtr OpPC, const Function *Func, const CallExpr *CE, uint32_t BuiltinID)

bool Free(InterpState &S, CodePtr OpPC, bool DeleteIsArrayForm, bool IsGlobalDelete)

bool InvalidNewDeleteExpr(InterpState &S, CodePtr OpPC, const Expr *E)

bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call, uint32_t BuiltinID)

Interpret a builtin function.

bool FinishInitPop(InterpState &S, CodePtr OpPC)

bool InRange(InterpState &S, CodePtr OpPC)

bool CmpHelperEQ< FunctionPointer >(InterpState &S, CodePtr OpPC, CompareFn Fn)

bool Neg(InterpState &S, CodePtr OpPC)

bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if the variable has externally defined storage.

bool BitOr(InterpState &S, CodePtr OpPC)

1) Pops the RHS from the stack.

bool Inv(InterpState &S, CodePtr OpPC)

bool Load(InterpState &S, CodePtr OpPC)

bool SetGlobal(InterpState &S, CodePtr OpPC, uint32_t I)

bool Cast(InterpState &S, CodePtr OpPC)

bool EQ(InterpState &S, CodePtr OpPC)

bool IncfPop(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool GetFieldPop(InterpState &S, CodePtr OpPC, uint32_t I)

1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack

bool CmpHelperEQ< MemberPointer >(InterpState &S, CodePtr OpPC, CompareFn Fn)

bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F)

Checks if a method can be called.

bool AddOffset(InterpState &S, CodePtr OpPC)

bool Const(InterpState &S, CodePtr OpPC, const T &Arg)

bool DoMemcpy(InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest)

Copy the contents of Src into Dest.

bool Memcpy(InterpState &S, CodePtr OpPC)

bool GE(InterpState &S, CodePtr OpPC)

bool DoBitCast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, std::byte *Buff, Bits BitWidth, Bits FullBitWidth, bool &HasIndeterminateBits)

bool CheckArraySize(InterpState &S, CodePtr OpPC, SizeT *NumElements, unsigned ElemSize, bool IsNoThrow)

bool CallPtr(InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE)

bool CmpHelperEQ< Pointer >(InterpState &S, CodePtr OpPC, CompareFn Fn)

static bool CastFixedPointIntegral(InterpState &S, CodePtr OpPC)

constexpr bool isIntegralType(PrimType T)

bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)

bool CastIntegralFloating(InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, uint32_t FPOI)

bool CmpHelper(InterpState &S, CodePtr OpPC, CompareFn Fn)

bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if a pointer points to const storage.

bool CastFixedPoint(InterpState &S, CodePtr OpPC, uint32_t FPS)

bool GetPtrParam(InterpState &S, CodePtr OpPC, uint32_t I)

bool AllocCN(InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow)

bool GetGlobal(InterpState &S, CodePtr OpPC, uint32_t I)

bool Interpret(InterpState &S)

Interpreter entry point.

bool Subf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool GetPtrThisVirtBase(InterpState &S, CodePtr OpPC, const RecordDecl *D)

bool InitGlobal(InterpState &S, CodePtr OpPC, uint32_t I)

bool InvalidCast(InterpState &S, CodePtr OpPC, CastKind Kind, bool Fatal)

Same here, but only for casts.

bool CastMemberPtrPtr(InterpState &S, CodePtr OpPC)

bool Ret(InterpState &S, CodePtr &PC)

bool Flip(InterpState &S, CodePtr OpPC)

[Value1, Value2] -> [Value2, Value1]

bool CMP3(InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo)

bool CastAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth)

Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the resu...

bool CmpHelper< Pointer >(InterpState &S, CodePtr OpPC, CompareFn Fn)

bool Decf(InterpState &S, CodePtr OpPC, uint32_t FPOI)

bool Assume(InterpState &S, CodePtr OpPC)

bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr)

Checks if a method can be invoked on an object.

bool GetPtrThisBase(InterpState &S, CodePtr OpPC, uint32_t Off)

bool IncDecFloatHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t FPOI)

static bool IsConstantContext(InterpState &S, CodePtr OpPC)

bool AllocN(InterpState &S, CodePtr OpPC, PrimType T, const Expr *Source, bool IsNoThrow)

bool CheckEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED)

The JSON file list parser is used to communicate input to InstallAPI.

ComparisonCategoryResult

An enumeration representing the possible results of a three-way comparison.

CheckSubobjectKind

The order of this enum is important for diagnostics.

@ Result

The result type of a method or function.

AccessKinds

Kinds of access we can perform on an object, for diagnostics.

const FunctionProtoType * T

unsigned Base

Start of the current subfield.

Block * Pointee

The block the pointer is pointing to.

Describes a memory block created by an allocation site.

unsigned getSize() const

Returns the size of the object without metadata.

static constexpr unsigned MaxArrayElemBytes

Maximum number of bytes to be used for array elements.

PrimType getPrimType() const

const Expr * asExpr() const

Inline descriptor embedded in structures and arrays.

IntPointer baseCast(const ASTContext &ASTCtx, unsigned BaseOffset) const

Mapping from primitive types to their representation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4