Coverage Report

Created: 2024-01-17 10:31

/src/llvm-project/clang/lib/AST/Interp/Interp.h
Line
Count
Source (jump to first uncovered line)
1
//===--- Interp.h - Interpreter for the constexpr VM ------------*- 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
// Definition of the interpreter state and entry point.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_AST_INTERP_INTERP_H
14
#define LLVM_CLANG_AST_INTERP_INTERP_H
15
16
#include "Boolean.h"
17
#include "Floating.h"
18
#include "Function.h"
19
#include "FunctionPointer.h"
20
#include "InterpFrame.h"
21
#include "InterpStack.h"
22
#include "InterpState.h"
23
#include "Opcode.h"
24
#include "PrimType.h"
25
#include "Program.h"
26
#include "State.h"
27
#include "clang/AST/ASTContext.h"
28
#include "clang/AST/ASTDiagnostic.h"
29
#include "clang/AST/CXXInheritance.h"
30
#include "clang/AST/Expr.h"
31
#include "llvm/ADT/APFloat.h"
32
#include "llvm/ADT/APSInt.h"
33
#include "llvm/Support/Endian.h"
34
#include <limits>
35
#include <type_traits>
36
37
namespace clang {
38
namespace interp {
39
40
using APSInt = llvm::APSInt;
41
42
/// Convert a value to an APValue.
43
0
template <typename T> bool ReturnValue(const T &V, APValue &R) {
44
0
  R = V.toAPValue();
45
0
  return true;
46
0
}
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<8u, true> >(clang::interp::Integral<8u, true> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<8u, false> >(clang::interp::Integral<8u, false> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<16u, true> >(clang::interp::Integral<16u, true> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<16u, false> >(clang::interp::Integral<16u, false> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<32u, true> >(clang::interp::Integral<32u, true> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<32u, false> >(clang::interp::Integral<32u, false> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<64u, true> >(clang::interp::Integral<64u, true> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Integral<64u, false> >(clang::interp::Integral<64u, false> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::IntegralAP<false> >(clang::interp::IntegralAP<false> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::IntegralAP<true> >(clang::interp::IntegralAP<true> const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Floating>(clang::interp::Floating const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Boolean>(clang::interp::Boolean const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Pointer>(clang::interp::Pointer const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::FunctionPointer>(clang::interp::FunctionPointer const&, clang::APValue&)
47
48
/// Checks if the variable has externally defined storage.
49
bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
50
51
/// Checks if the array is offsetable.
52
bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
53
54
/// Checks if a pointer is live and accessible.
55
bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
56
               AccessKinds AK);
57
58
/// Checks if a pointer is a dummy pointer.
59
bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
60
61
/// Checks if a pointer is null.
62
bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
63
               CheckSubobjectKind CSK);
64
65
/// Checks if a pointer is in range.
66
bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
67
                AccessKinds AK);
68
69
/// Checks if a field from which a pointer is going to be derived is valid.
70
bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
71
                CheckSubobjectKind CSK);
72
73
/// Checks if Ptr is a one-past-the-end pointer.
74
bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
75
                    CheckSubobjectKind CSK);
76
77
/// Checks if a pointer points to const storage.
78
bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
79
80
/// Checks if the Descriptor is of a constexpr or const global variable.
81
bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc);
82
83
/// Checks if a pointer points to a mutable field.
84
bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
85
86
/// Checks if a value can be loaded from a block.
87
bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
88
89
bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
90
                      AccessKinds AK);
91
92
/// Checks if a value can be stored in a block.
93
bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
94
95
/// Checks if a method can be invoked on an object.
96
bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
97
98
/// Checks if a value can be initialized.
99
bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
100
101
/// Checks if a method can be called.
102
bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F);
103
104
/// Checks if calling the currently active function would exceed
105
/// the allowed call depth.
106
bool CheckCallDepth(InterpState &S, CodePtr OpPC);
107
108
/// Checks the 'this' pointer.
109
bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This);
110
111
/// Checks if a method is pure virtual.
112
bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD);
113
114
/// Checks that all fields are initialized after a constructor call.
115
bool CheckCtorCall(InterpState &S, CodePtr OpPC, const Pointer &This);
116
117
/// Checks if reinterpret casts are legal in the current context.
118
bool CheckPotentialReinterpretCast(InterpState &S, CodePtr OpPC,
119
                                   const Pointer &Ptr);
120
121
/// Sets the given integral value to the pointer, which is of
122
/// a std::{weak,partial,strong}_ordering type.
123
bool SetThreeWayComparisonField(InterpState &S, CodePtr OpPC,
124
                                const Pointer &Ptr, const APSInt &IntValue);
125
126
/// Checks if the shift operation is legal.
127
template <typename LT, typename RT>
128
bool CheckShift(InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS,
129
0
                unsigned Bits) {
130
0
  if (RHS.isNegative()) {
131
0
    const SourceInfo &Loc = S.Current->getSource(OpPC);
132
0
    S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
133
0
    return false;
134
0
  }
135
136
  // C++11 [expr.shift]p1: Shift width must be less than the bit width of
137
  // the shifted type.
138
0
  if (Bits > 1 && RHS >= RT::from(Bits, RHS.bitWidth())) {
139
0
    const Expr *E = S.Current->getExpr(OpPC);
140
0
    const APSInt Val = RHS.toAPSInt();
141
0
    QualType Ty = E->getType();
142
0
    S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
143
0
    return false;
144
0
  }
145
146
0
  if (LHS.isSigned() && !S.getLangOpts().CPlusPlus20) {
147
0
    const Expr *E = S.Current->getExpr(OpPC);
148
    // C++11 [expr.shift]p2: A signed left shift must have a non-negative
149
    // operand, and must not overflow the corresponding unsigned type.
150
0
    if (LHS.isNegative())
151
0
      S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS.toAPSInt();
152
0
    else if (LHS.toUnsigned().countLeadingZeros() < static_cast<unsigned>(RHS))
153
0
      S.CCEDiag(E, diag::note_constexpr_lshift_discards);
154
0
  }
155
156
  // C++2a [expr.shift]p2: [P0907R4]:
157
  //    E1 << E2 is the unique value congruent to
158
  //    E1 x 2^E2 module 2^N.
159
0
  return true;
160
0
}
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, true>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<8u, false>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, true>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<16u, false>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, true>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<32u, false>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, true>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::Integral<64u, false>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<false>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<8u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<8u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<16u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<16u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<32u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<32u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<64u, true> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Integral<64u, false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<false> const&, unsigned int)
Unexecuted instantiation: bool clang::interp::CheckShift<clang::interp::IntegralAP<true>, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<true> const&, unsigned int)
161
162
/// Checks if Div/Rem operation on LHS and RHS is valid.
163
template <typename T>
164
0
bool CheckDivRem(InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS) {
165
0
  if (RHS.isZero()) {
166
0
    const auto *Op = cast<BinaryOperator>(S.Current->getExpr(OpPC));
167
0
    S.FFDiag(Op, diag::note_expr_divide_by_zero)
168
0
        << Op->getRHS()->getSourceRange();
169
0
    return false;
170
0
  }
171
172
0
  if (LHS.isSigned() && LHS.isMin() && RHS.isNegative() && RHS.isMinusOne()) {
173
0
    APSInt LHSInt = LHS.toAPSInt();
174
0
    SmallString<32> Trunc;
175
0
    (-LHSInt.extend(LHSInt.getBitWidth() + 1)).toString(Trunc, 10);
176
0
    const SourceInfo &Loc = S.Current->getSource(OpPC);
177
0
    const Expr *E = S.Current->getExpr(OpPC);
178
0
    S.CCEDiag(Loc, diag::note_constexpr_overflow) << Trunc << E->getType();
179
0
    return false;
180
0
  }
181
0
  return true;
182
0
}
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Floating const&, clang::interp::Floating const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, false> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, true> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, false> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, true> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, false> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, true> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, false> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<false> const&)
Unexecuted instantiation: bool clang::interp::CheckDivRem<clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<true> const&)
183
184
/// Checks if the result of a floating-point operation is valid
185
/// in the current context.
186
bool CheckFloatResult(InterpState &S, CodePtr OpPC, const Floating &Result,
187
                      APFloat::opStatus Status);
188
189
/// Checks why the given DeclRefExpr is invalid.
190
bool CheckDeclRef(InterpState &S, CodePtr OpPC, const DeclRefExpr *DR);
191
192
/// Interpreter entry point.
193
bool Interpret(InterpState &S, APValue &Result);
194
195
/// Interpret a builtin function.
196
bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const Function *F,
197
                      const CallExpr *Call);
198
199
/// Interpret an offsetof operation.
200
bool InterpretOffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E,
201
                       llvm::ArrayRef<int64_t> ArrayIndices, int64_t &Result);
202
203
enum class ArithOp { Add, Sub };
204
205
//===----------------------------------------------------------------------===//
206
// Returning values
207
//===----------------------------------------------------------------------===//
208
209
void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC);
210
211
template <PrimType Name, class T = typename PrimConv<Name>::T>
212
0
bool Ret(InterpState &S, CodePtr &PC, APValue &Result) {
213
0
  const T &Ret = S.Stk.pop<T>();
214
215
  // Make sure returned pointers are live. We might be trying to return a
216
  // pointer or reference to a local variable.
217
  // Just return false, since a diagnostic has already been emitted in Sema.
218
0
  if constexpr (std::is_same_v<T, Pointer>) {
219
    // FIXME: We could be calling isLive() here, but the emitted diagnostics
220
    // seem a little weird, at least if the returned expression is of
221
    // pointer type.
222
    // Null pointers are considered live here.
223
0
    if (!Ret.isZero() && !Ret.isLive())
224
0
      return false;
225
0
  }
226
227
0
  assert(S.Current);
228
0
  assert(S.Current->getFrameOffset() == S.Stk.size() && "Invalid frame");
229
0
  if (!S.checkingPotentialConstantExpression() || S.Current->Caller)
230
0
    cleanupAfterFunctionCall(S, PC);
231
232
0
  if (InterpFrame *Caller = S.Current->Caller) {
233
0
    PC = S.Current->getRetPC();
234
0
    delete S.Current;
235
0
    S.Current = Caller;
236
0
    S.Stk.push<T>(Ret);
237
0
  } else {
238
0
    delete S.Current;
239
0
    S.Current = nullptr;
240
0
    if (!ReturnValue<T>(Ret, Result))
241
0
      return false;
242
0
  }
243
0
  return true;
244
0
}
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::Ret<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr&, clang::APValue&)
245
246
0
inline bool RetVoid(InterpState &S, CodePtr &PC, APValue &Result) {
247
0
  assert(S.Current->getFrameOffset() == S.Stk.size() && "Invalid frame");
248
249
0
  if (!S.checkingPotentialConstantExpression() || S.Current->Caller)
250
0
    cleanupAfterFunctionCall(S, PC);
251
252
0
  if (InterpFrame *Caller = S.Current->Caller) {
253
0
    PC = S.Current->getRetPC();
254
0
    delete S.Current;
255
0
    S.Current = Caller;
256
0
  } else {
257
0
    delete S.Current;
258
0
    S.Current = nullptr;
259
0
  }
260
0
  return true;
261
0
}
262
263
//===----------------------------------------------------------------------===//
264
// Add, Sub, Mul
265
//===----------------------------------------------------------------------===//
266
267
template <typename T, bool (*OpFW)(T, T, unsigned, T *),
268
          template <typename U> class OpAP>
269
bool AddSubMulHelper(InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS,
270
0
                     const T &RHS) {
271
  // Fast path - add the numbers with fixed width.
272
0
  T Result;
273
0
  if (!OpFW(LHS, RHS, Bits, &Result)) {
274
0
    S.Stk.push<T>(Result);
275
0
    return true;
276
0
  }
277
278
  // If for some reason evaluation continues, use the truncated results.
279
0
  S.Stk.push<T>(Result);
280
281
  // Slow path - compute the result using another bit of precision.
282
0
  APSInt Value = OpAP<APSInt>()(LHS.toAPSInt(Bits), RHS.toAPSInt(Bits));
283
284
  // Report undefined behaviour, stopping if required.
285
0
  const Expr *E = S.Current->getExpr(OpPC);
286
0
  QualType Type = E->getType();
287
0
  if (S.checkingForUndefinedBehavior()) {
288
0
    SmallString<32> Trunc;
289
0
    Value.trunc(Result.bitWidth()).toString(Trunc, 10);
290
0
    auto Loc = E->getExprLoc();
291
0
    S.report(Loc, diag::warn_integer_constant_overflow)
292
0
        << Trunc << Type << E->getSourceRange();
293
0
    return true;
294
0
  } else {
295
0
    S.CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;
296
0
    if (!S.noteUndefinedBehavior()) {
297
0
      S.Stk.pop<T>();
298
0
      return false;
299
0
    }
300
0
    return true;
301
0
  }
302
0
}
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, true>, &clang::interp::Integral<8u, true>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, false>, &clang::interp::Integral<8u, false>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, true>, &clang::interp::Integral<16u, true>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, false>, &clang::interp::Integral<16u, false>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, true>, &clang::interp::Integral<32u, true>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, false>, &clang::interp::Integral<32u, false>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, true>, &clang::interp::Integral<64u, true>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, false>, &clang::interp::Integral<64u, false>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<false>, &clang::interp::IntegralAP<false>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<true>, &clang::interp::IntegralAP<true>::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Boolean, &clang::interp::Boolean::add, std::__1::plus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Boolean const&, clang::interp::Boolean const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, true>, &clang::interp::Integral<8u, true>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, false>, &clang::interp::Integral<8u, false>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, true>, &clang::interp::Integral<16u, true>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, false>, &clang::interp::Integral<16u, false>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, true>, &clang::interp::Integral<32u, true>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, false>, &clang::interp::Integral<32u, false>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, true>, &clang::interp::Integral<64u, true>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, false>, &clang::interp::Integral<64u, false>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<false>, &clang::interp::IntegralAP<false>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<true>, &clang::interp::IntegralAP<true>::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Boolean, &clang::interp::Boolean::mul, std::__1::multiplies>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Boolean const&, clang::interp::Boolean const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, true>, &clang::interp::Integral<8u, true>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, true> const&, clang::interp::Integral<8u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, false>, &clang::interp::Integral<8u, false>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<8u, false> const&, clang::interp::Integral<8u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, true>, &clang::interp::Integral<16u, true>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, true> const&, clang::interp::Integral<16u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<16u, false>, &clang::interp::Integral<16u, false>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<16u, false> const&, clang::interp::Integral<16u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, true>, &clang::interp::Integral<32u, true>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, true> const&, clang::interp::Integral<32u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<32u, false>, &clang::interp::Integral<32u, false>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<32u, false> const&, clang::interp::Integral<32u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, true>, &clang::interp::Integral<64u, true>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, true> const&, clang::interp::Integral<64u, true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<64u, false>, &clang::interp::Integral<64u, false>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Integral<64u, false> const&, clang::interp::Integral<64u, false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<false>, &clang::interp::IntegralAP<false>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<false> const&, clang::interp::IntegralAP<false> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::IntegralAP<true>, &clang::interp::IntegralAP<true>::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::IntegralAP<true> const&, clang::interp::IntegralAP<true> const&)
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Boolean, &clang::interp::Boolean::sub, std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Boolean const&, clang::interp::Boolean const&)
303
304
template <PrimType Name, class T = typename PrimConv<Name>::T>
305
0
bool Add(InterpState &S, CodePtr OpPC) {
306
0
  const T &RHS = S.Stk.pop<T>();
307
0
  const T &LHS = S.Stk.pop<T>();
308
0
  const unsigned Bits = RHS.bitWidth() + 1;
309
0
  return AddSubMulHelper<T, T::add, std::plus>(S, OpPC, Bits, LHS, RHS);
310
0
}
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Add<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
311
312
0
inline bool Addf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
313
0
  const Floating &RHS = S.Stk.pop<Floating>();
314
0
  const Floating &LHS = S.Stk.pop<Floating>();
315
316
0
  Floating Result;
317
0
  auto Status = Floating::add(LHS, RHS, RM, &Result);
318
0
  S.Stk.push<Floating>(Result);
319
0
  return CheckFloatResult(S, OpPC, Result, Status);
320
0
}
321
322
template <PrimType Name, class T = typename PrimConv<Name>::T>
323
0
bool Sub(InterpState &S, CodePtr OpPC) {
324
0
  const T &RHS = S.Stk.pop<T>();
325
0
  const T &LHS = S.Stk.pop<T>();
326
0
  const unsigned Bits = RHS.bitWidth() + 1;
327
0
  return AddSubMulHelper<T, T::sub, std::minus>(S, OpPC, Bits, LHS, RHS);
328
0
}
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Sub<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
329
330
0
inline bool Subf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
331
0
  const Floating &RHS = S.Stk.pop<Floating>();
332
0
  const Floating &LHS = S.Stk.pop<Floating>();
333
334
0
  Floating Result;
335
0
  auto Status = Floating::sub(LHS, RHS, RM, &Result);
336
0
  S.Stk.push<Floating>(Result);
337
0
  return CheckFloatResult(S, OpPC, Result, Status);
338
0
}
339
340
template <PrimType Name, class T = typename PrimConv<Name>::T>
341
0
bool Mul(InterpState &S, CodePtr OpPC) {
342
0
  const T &RHS = S.Stk.pop<T>();
343
0
  const T &LHS = S.Stk.pop<T>();
344
0
  const unsigned Bits = RHS.bitWidth() * 2;
345
0
  return AddSubMulHelper<T, T::mul, std::multiplies>(S, OpPC, Bits, LHS, RHS);
346
0
}
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Mul<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
347
348
0
inline bool Mulf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
349
0
  const Floating &RHS = S.Stk.pop<Floating>();
350
0
  const Floating &LHS = S.Stk.pop<Floating>();
351
352
0
  Floating Result;
353
0
  auto Status = Floating::mul(LHS, RHS, RM, &Result);
354
0
  S.Stk.push<Floating>(Result);
355
0
  return CheckFloatResult(S, OpPC, Result, Status);
356
0
}
357
/// 1) Pops the RHS from the stack.
358
/// 2) Pops the LHS from the stack.
359
/// 3) Pushes 'LHS & RHS' on the stack
360
template <PrimType Name, class T = typename PrimConv<Name>::T>
361
0
bool BitAnd(InterpState &S, CodePtr OpPC) {
362
0
  const T &RHS = S.Stk.pop<T>();
363
0
  const T &LHS = S.Stk.pop<T>();
364
365
0
  unsigned Bits = RHS.bitWidth();
366
0
  T Result;
367
0
  if (!T::bitAnd(LHS, RHS, Bits, &Result)) {
368
0
    S.Stk.push<T>(Result);
369
0
    return true;
370
0
  }
371
0
  return false;
372
0
}
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitAnd<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
373
374
/// 1) Pops the RHS from the stack.
375
/// 2) Pops the LHS from the stack.
376
/// 3) Pushes 'LHS | RHS' on the stack
377
template <PrimType Name, class T = typename PrimConv<Name>::T>
378
0
bool BitOr(InterpState &S, CodePtr OpPC) {
379
0
  const T &RHS = S.Stk.pop<T>();
380
0
  const T &LHS = S.Stk.pop<T>();
381
382
0
  unsigned Bits = RHS.bitWidth();
383
0
  T Result;
384
0
  if (!T::bitOr(LHS, RHS, Bits, &Result)) {
385
0
    S.Stk.push<T>(Result);
386
0
    return true;
387
0
  }
388
0
  return false;
389
0
}
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitOr<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
390
391
/// 1) Pops the RHS from the stack.
392
/// 2) Pops the LHS from the stack.
393
/// 3) Pushes 'LHS ^ RHS' on the stack
394
template <PrimType Name, class T = typename PrimConv<Name>::T>
395
0
bool BitXor(InterpState &S, CodePtr OpPC) {
396
0
  const T &RHS = S.Stk.pop<T>();
397
0
  const T &LHS = S.Stk.pop<T>();
398
399
0
  unsigned Bits = RHS.bitWidth();
400
0
  T Result;
401
0
  if (!T::bitXor(LHS, RHS, Bits, &Result)) {
402
0
    S.Stk.push<T>(Result);
403
0
    return true;
404
0
  }
405
0
  return false;
406
0
}
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::BitXor<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
407
408
/// 1) Pops the RHS from the stack.
409
/// 2) Pops the LHS from the stack.
410
/// 3) Pushes 'LHS % RHS' on the stack (the remainder of dividing LHS by RHS).
411
template <PrimType Name, class T = typename PrimConv<Name>::T>
412
0
bool Rem(InterpState &S, CodePtr OpPC) {
413
0
  const T &RHS = S.Stk.pop<T>();
414
0
  const T &LHS = S.Stk.pop<T>();
415
416
0
  if (!CheckDivRem(S, OpPC, LHS, RHS))
417
0
    return false;
418
419
0
  const unsigned Bits = RHS.bitWidth() * 2;
420
0
  T Result;
421
0
  if (!T::rem(LHS, RHS, Bits, &Result)) {
422
0
    S.Stk.push<T>(Result);
423
0
    return true;
424
0
  }
425
0
  return false;
426
0
}
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Rem<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
427
428
/// 1) Pops the RHS from the stack.
429
/// 2) Pops the LHS from the stack.
430
/// 3) Pushes 'LHS / RHS' on the stack
431
template <PrimType Name, class T = typename PrimConv<Name>::T>
432
0
bool Div(InterpState &S, CodePtr OpPC) {
433
0
  const T &RHS = S.Stk.pop<T>();
434
0
  const T &LHS = S.Stk.pop<T>();
435
436
0
  if (!CheckDivRem(S, OpPC, LHS, RHS))
437
0
    return false;
438
439
0
  const unsigned Bits = RHS.bitWidth() * 2;
440
0
  T Result;
441
0
  if (!T::div(LHS, RHS, Bits, &Result)) {
442
0
    S.Stk.push<T>(Result);
443
0
    return true;
444
0
  }
445
0
  return false;
446
0
}
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Div<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
447
448
0
inline bool Divf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
449
0
  const Floating &RHS = S.Stk.pop<Floating>();
450
0
  const Floating &LHS = S.Stk.pop<Floating>();
451
452
0
  if (!CheckDivRem(S, OpPC, LHS, RHS))
453
0
    return false;
454
455
0
  Floating Result;
456
0
  auto Status = Floating::div(LHS, RHS, RM, &Result);
457
0
  S.Stk.push<Floating>(Result);
458
0
  return CheckFloatResult(S, OpPC, Result, Status);
459
0
}
460
461
//===----------------------------------------------------------------------===//
462
// Inv
463
//===----------------------------------------------------------------------===//
464
465
template <PrimType Name, class T = typename PrimConv<Name>::T>
466
0
bool Inv(InterpState &S, CodePtr OpPC) {
467
0
  using BoolT = PrimConv<PT_Bool>::T;
468
0
  const T &Val = S.Stk.pop<T>();
469
0
  const unsigned Bits = Val.bitWidth();
470
0
  Boolean R;
471
0
  Boolean::inv(BoolT::from(Val, Bits), &R);
472
473
0
  S.Stk.push<BoolT>(R);
474
0
  return true;
475
0
}
476
477
//===----------------------------------------------------------------------===//
478
// Neg
479
//===----------------------------------------------------------------------===//
480
481
template <PrimType Name, class T = typename PrimConv<Name>::T>
482
0
bool Neg(InterpState &S, CodePtr OpPC) {
483
0
  const T &Value = S.Stk.pop<T>();
484
0
  T Result;
485
486
0
  if (!T::neg(Value, &Result)) {
487
0
    S.Stk.push<T>(Result);
488
0
    return true;
489
0
  }
490
491
0
  assert(isIntegralType(Name) &&
492
0
         "don't expect other types to fail at constexpr negation");
493
0
  S.Stk.push<T>(Result);
494
495
0
  APSInt NegatedValue = -Value.toAPSInt(Value.bitWidth() + 1);
496
0
  const Expr *E = S.Current->getExpr(OpPC);
497
0
  QualType Type = E->getType();
498
499
0
  if (S.checkingForUndefinedBehavior()) {
500
0
    SmallString<32> Trunc;
501
0
    NegatedValue.trunc(Result.bitWidth()).toString(Trunc, 10);
502
0
    auto Loc = E->getExprLoc();
503
0
    S.report(Loc, diag::warn_integer_constant_overflow)
504
0
        << Trunc << Type << E->getSourceRange();
505
0
    return true;
506
0
  }
507
508
0
  S.CCEDiag(E, diag::note_constexpr_overflow) << NegatedValue << Type;
509
0
  return S.noteUndefinedBehavior();
510
0
}
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Neg<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
511
512
enum class PushVal : bool {
513
  No,
514
  Yes,
515
};
516
enum class IncDecOp {
517
  Inc,
518
  Dec,
519
};
520
521
template <typename T, IncDecOp Op, PushVal DoPush>
522
0
bool IncDecHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
523
0
  const T &Value = Ptr.deref<T>();
524
0
  T Result;
525
526
0
  if constexpr (DoPush == PushVal::Yes)
527
0
    S.Stk.push<T>(Value);
528
529
0
  if constexpr (Op == IncDecOp::Inc) {
530
0
    if (!T::increment(Value, &Result)) {
531
0
      Ptr.deref<T>() = Result;
532
0
      return true;
533
0
    }
534
0
  } else {
535
0
    if (!T::decrement(Value, &Result)) {
536
0
      Ptr.deref<T>() = Result;
537
0
      return true;
538
0
    }
539
0
  }
540
541
  // Something went wrong with the previous operation. Compute the
542
  // result with another bit of precision.
543
0
  unsigned Bits = Value.bitWidth() + 1;
544
0
  APSInt APResult;
545
0
  if constexpr (Op == IncDecOp::Inc)
546
0
    APResult = ++Value.toAPSInt(Bits);
547
0
  else
548
0
    APResult = --Value.toAPSInt(Bits);
549
550
  // Report undefined behaviour, stopping if required.
551
0
  const Expr *E = S.Current->getExpr(OpPC);
552
0
  QualType Type = E->getType();
553
0
  if (S.checkingForUndefinedBehavior()) {
554
0
    SmallString<32> Trunc;
555
0
    APResult.trunc(Result.bitWidth()).toString(Trunc, 10);
556
0
    auto Loc = E->getExprLoc();
557
0
    S.report(Loc, diag::warn_integer_constant_overflow)
558
0
        << Trunc << Type << E->getSourceRange();
559
0
    return true;
560
0
  }
561
562
0
  S.CCEDiag(E, diag::note_constexpr_overflow) << APResult << Type;
563
0
  return S.noteUndefinedBehavior();
564
0
}
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<false>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<true>, (clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<8u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<16u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<32u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::Integral<64u, false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<false>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::IncDecHelper<clang::interp::IntegralAP<true>, (clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
565
566
/// 1) Pops a pointer from the stack
567
/// 2) Load the value from the pointer
568
/// 3) Writes the value increased by one back to the pointer
569
/// 4) Pushes the original (pre-inc) value on the stack.
570
template <PrimType Name, class T = typename PrimConv<Name>::T>
571
0
bool Inc(InterpState &S, CodePtr OpPC) {
572
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
573
574
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Increment))
575
0
    return false;
576
577
0
  return IncDecHelper<T, IncDecOp::Inc, PushVal::Yes>(S, OpPC, Ptr);
578
0
}
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Inc<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
579
580
/// 1) Pops a pointer from the stack
581
/// 2) Load the value from the pointer
582
/// 3) Writes the value increased by one back to the pointer
583
template <PrimType Name, class T = typename PrimConv<Name>::T>
584
0
bool IncPop(InterpState &S, CodePtr OpPC) {
585
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
586
587
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Increment))
588
0
    return false;
589
590
0
  return IncDecHelper<T, IncDecOp::Inc, PushVal::No>(S, OpPC, Ptr);
591
0
}
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::IncPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
592
593
/// 1) Pops a pointer from the stack
594
/// 2) Load the value from the pointer
595
/// 3) Writes the value decreased by one back to the pointer
596
/// 4) Pushes the original (pre-dec) value on the stack.
597
template <PrimType Name, class T = typename PrimConv<Name>::T>
598
0
bool Dec(InterpState &S, CodePtr OpPC) {
599
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
600
601
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Decrement))
602
0
    return false;
603
604
0
  return IncDecHelper<T, IncDecOp::Dec, PushVal::Yes>(S, OpPC, Ptr);
605
0
}
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dec<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
606
607
/// 1) Pops a pointer from the stack
608
/// 2) Load the value from the pointer
609
/// 3) Writes the value decreased by one back to the pointer
610
template <PrimType Name, class T = typename PrimConv<Name>::T>
611
0
bool DecPop(InterpState &S, CodePtr OpPC) {
612
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
613
614
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Decrement))
615
0
    return false;
616
617
0
  return IncDecHelper<T, IncDecOp::Dec, PushVal::No>(S, OpPC, Ptr);
618
0
}
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::DecPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
619
620
template <IncDecOp Op, PushVal DoPush>
621
bool IncDecFloatHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
622
0
                       llvm::RoundingMode RM) {
623
0
  Floating Value = Ptr.deref<Floating>();
624
0
  Floating Result;
625
626
0
  if constexpr (DoPush == PushVal::Yes)
627
0
    S.Stk.push<Floating>(Value);
628
629
0
  llvm::APFloat::opStatus Status;
630
0
  if constexpr (Op == IncDecOp::Inc)
631
0
    Status = Floating::increment(Value, RM, &Result);
632
0
  else
633
0
    Status = Floating::decrement(Value, RM, &Result);
634
635
0
  Ptr.deref<Floating>() = Result;
636
637
0
  return CheckFloatResult(S, OpPC, Result, Status);
638
0
}
Unexecuted instantiation: bool clang::interp::IncDecFloatHelper<(clang::interp::IncDecOp)0, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::IncDecFloatHelper<(clang::interp::IncDecOp)0, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::IncDecFloatHelper<(clang::interp::IncDecOp)1, (clang::interp::PushVal)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::IncDecFloatHelper<(clang::interp::IncDecOp)1, (clang::interp::PushVal)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&, llvm::RoundingMode)
639
640
0
inline bool Incf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
641
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
642
643
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Increment))
644
0
    return false;
645
646
0
  return IncDecFloatHelper<IncDecOp::Inc, PushVal::Yes>(S, OpPC, Ptr, RM);
647
0
}
648
649
0
inline bool IncfPop(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
650
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
651
652
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Increment))
653
0
    return false;
654
655
0
  return IncDecFloatHelper<IncDecOp::Inc, PushVal::No>(S, OpPC, Ptr, RM);
656
0
}
657
658
0
inline bool Decf(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
659
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
660
661
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Decrement))
662
0
    return false;
663
664
0
  return IncDecFloatHelper<IncDecOp::Dec, PushVal::Yes>(S, OpPC, Ptr, RM);
665
0
}
666
667
0
inline bool DecfPop(InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) {
668
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
669
670
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Decrement))
671
0
    return false;
672
673
0
  return IncDecFloatHelper<IncDecOp::Dec, PushVal::No>(S, OpPC, Ptr, RM);
674
0
}
675
676
/// 1) Pops the value from the stack.
677
/// 2) Pushes the bitwise complemented value on the stack (~V).
678
template <PrimType Name, class T = typename PrimConv<Name>::T>
679
0
bool Comp(InterpState &S, CodePtr OpPC) {
680
0
  const T &Val = S.Stk.pop<T>();
681
0
  T Result;
682
0
  if (!T::comp(Val, &Result)) {
683
0
    S.Stk.push<T>(Result);
684
0
    return true;
685
0
  }
686
687
0
  return false;
688
0
}
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Comp<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
689
690
//===----------------------------------------------------------------------===//
691
// EQ, NE, GT, GE, LT, LE
692
//===----------------------------------------------------------------------===//
693
694
using CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)>;
695
696
template <typename T>
697
0
bool CmpHelper(InterpState &S, CodePtr OpPC, CompareFn Fn) {
698
0
  using BoolT = PrimConv<PT_Bool>::T;
699
0
  const T &RHS = S.Stk.pop<T>();
700
0
  const T &LHS = S.Stk.pop<T>();
701
0
  S.Stk.push<BoolT>(BoolT::from(Fn(LHS.compare(RHS))));
702
0
  return true;
703
0
}
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelper<clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
704
705
template <typename T>
706
0
bool CmpHelperEQ(InterpState &S, CodePtr OpPC, CompareFn Fn) {
707
0
  return CmpHelper<T>(S, OpPC, Fn);
708
0
}
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
Unexecuted instantiation: bool clang::interp::CmpHelperEQ<clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
709
710
/// Function pointers cannot be compared in an ordered way.
711
template <>
712
inline bool CmpHelper<FunctionPointer>(InterpState &S, CodePtr OpPC,
713
0
                                       CompareFn Fn) {
714
0
  const auto &RHS = S.Stk.pop<FunctionPointer>();
715
0
  const auto &LHS = S.Stk.pop<FunctionPointer>();
716
717
0
  const SourceInfo &Loc = S.Current->getSource(OpPC);
718
0
  S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
719
0
      << LHS.toDiagnosticString(S.getCtx())
720
0
      << RHS.toDiagnosticString(S.getCtx());
721
0
  return false;
722
0
}
723
724
template <>
725
inline bool CmpHelperEQ<FunctionPointer>(InterpState &S, CodePtr OpPC,
726
0
                                         CompareFn Fn) {
727
0
  const auto &RHS = S.Stk.pop<FunctionPointer>();
728
0
  const auto &LHS = S.Stk.pop<FunctionPointer>();
729
0
  S.Stk.push<Boolean>(Boolean::from(Fn(LHS.compare(RHS))));
730
0
  return true;
731
0
}
732
733
template <>
734
0
inline bool CmpHelper<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
735
0
  using BoolT = PrimConv<PT_Bool>::T;
736
0
  const Pointer &RHS = S.Stk.pop<Pointer>();
737
0
  const Pointer &LHS = S.Stk.pop<Pointer>();
738
739
0
  if (!Pointer::hasSameBase(LHS, RHS)) {
740
0
    const SourceInfo &Loc = S.Current->getSource(OpPC);
741
0
    S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
742
0
        << LHS.toDiagnosticString(S.getCtx())
743
0
        << RHS.toDiagnosticString(S.getCtx());
744
0
    return false;
745
0
  } else {
746
0
    unsigned VL = LHS.getByteOffset();
747
0
    unsigned VR = RHS.getByteOffset();
748
0
    S.Stk.push<BoolT>(BoolT::from(Fn(Compare(VL, VR))));
749
0
    return true;
750
0
  }
751
0
}
752
753
template <>
754
0
inline bool CmpHelperEQ<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
755
0
  using BoolT = PrimConv<PT_Bool>::T;
756
0
  const Pointer &RHS = S.Stk.pop<Pointer>();
757
0
  const Pointer &LHS = S.Stk.pop<Pointer>();
758
759
0
  if (LHS.isZero() && RHS.isZero()) {
760
0
    S.Stk.push<BoolT>(BoolT::from(Fn(ComparisonCategoryResult::Equal)));
761
0
    return true;
762
0
  }
763
764
0
  if (!Pointer::hasSameBase(LHS, RHS)) {
765
0
    S.Stk.push<BoolT>(BoolT::from(Fn(ComparisonCategoryResult::Unordered)));
766
0
    return true;
767
0
  } else {
768
0
    unsigned VL = LHS.getByteOffset();
769
0
    unsigned VR = RHS.getByteOffset();
770
771
    // In our Pointer class, a pointer to an array and a pointer to the first
772
    // element in the same array are NOT equal. They have the same Base value,
773
    // but a different Offset. This is a pretty rare case, so we fix this here
774
    // by comparing pointers to the first elements.
775
0
    if (LHS.isArrayRoot())
776
0
      VL = LHS.atIndex(0).getByteOffset();
777
0
    if (RHS.isArrayRoot())
778
0
      VR = RHS.atIndex(0).getByteOffset();
779
780
0
    S.Stk.push<BoolT>(BoolT::from(Fn(Compare(VL, VR))));
781
0
    return true;
782
0
  }
783
0
}
784
785
template <PrimType Name, class T = typename PrimConv<Name>::T>
786
0
bool EQ(InterpState &S, CodePtr OpPC) {
787
0
  return CmpHelperEQ<T>(S, OpPC, [](ComparisonCategoryResult R) {
788
0
    return R == ComparisonCategoryResult::Equal;
789
0
  });
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::EQ<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
790
0
}
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
791
792
template <PrimType Name, class T = typename PrimConv<Name>::T>
793
0
bool CMP3(InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo) {
794
0
  const T &RHS = S.Stk.pop<T>();
795
0
  const T &LHS = S.Stk.pop<T>();
796
0
  const Pointer &P = S.Stk.peek<Pointer>();
797
798
0
  ComparisonCategoryResult CmpResult = LHS.compare(RHS);
799
0
  if (CmpResult == ComparisonCategoryResult::Unordered) {
800
    // This should only happen with pointers.
801
0
    const SourceInfo &Loc = S.Current->getSource(OpPC);
802
0
    S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
803
0
        << LHS.toDiagnosticString(S.getCtx())
804
0
        << RHS.toDiagnosticString(S.getCtx());
805
0
    return false;
806
0
  }
807
808
0
  assert(CmpInfo);
809
0
  const auto *CmpValueInfo = CmpInfo->getValueInfo(CmpResult);
810
0
  assert(CmpValueInfo);
811
0
  assert(CmpValueInfo->hasValidIntValue());
812
0
  APSInt IntValue = CmpValueInfo->getIntValue();
813
0
  return SetThreeWayComparisonField(S, OpPC, P, IntValue);
814
0
}
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
Unexecuted instantiation: bool clang::interp::CMP3<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, clang::ComparisonCategoryInfo const*)
815
816
template <PrimType Name, class T = typename PrimConv<Name>::T>
817
0
bool NE(InterpState &S, CodePtr OpPC) {
818
0
  return CmpHelperEQ<T>(S, OpPC, [](ComparisonCategoryResult R) {
819
0
    return R != ComparisonCategoryResult::Equal;
820
0
  });
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::NE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
821
0
}
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
822
823
template <PrimType Name, class T = typename PrimConv<Name>::T>
824
0
bool LT(InterpState &S, CodePtr OpPC) {
825
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
826
0
    return R == ComparisonCategoryResult::Less;
827
0
  });
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LT<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
828
0
}
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
829
830
template <PrimType Name, class T = typename PrimConv<Name>::T>
831
0
bool LE(InterpState &S, CodePtr OpPC) {
832
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
833
0
    return R == ComparisonCategoryResult::Less ||
834
0
           R == ComparisonCategoryResult::Equal;
835
0
  });
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::LE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
836
0
}
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
837
838
template <PrimType Name, class T = typename PrimConv<Name>::T>
839
0
bool GT(InterpState &S, CodePtr OpPC) {
840
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
841
0
    return R == ComparisonCategoryResult::Greater;
842
0
  });
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GT<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
843
0
}
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
844
845
template <PrimType Name, class T = typename PrimConv<Name>::T>
846
0
bool GE(InterpState &S, CodePtr OpPC) {
847
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
848
0
    return R == ComparisonCategoryResult::Greater ||
849
0
           R == ComparisonCategoryResult::Equal;
850
0
  });
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: clang::interp::GE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)::{lambda(clang::ComparisonCategoryResult)#1}::operator()(clang::ComparisonCategoryResult) const
851
0
}
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
852
853
//===----------------------------------------------------------------------===//
854
// InRange
855
//===----------------------------------------------------------------------===//
856
857
template <PrimType Name, class T = typename PrimConv<Name>::T>
858
bool InRange(InterpState &S, CodePtr OpPC) {
859
  const T RHS = S.Stk.pop<T>();
860
  const T LHS = S.Stk.pop<T>();
861
  const T Value = S.Stk.pop<T>();
862
863
  S.Stk.push<bool>(LHS <= Value && Value <= RHS);
864
  return true;
865
}
866
867
//===----------------------------------------------------------------------===//
868
// Dup, Pop, Test
869
//===----------------------------------------------------------------------===//
870
871
template <PrimType Name, class T = typename PrimConv<Name>::T>
872
0
bool Dup(InterpState &S, CodePtr OpPC) {
873
0
  S.Stk.push<T>(S.Stk.peek<T>());
874
0
  return true;
875
0
}
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
876
877
template <PrimType Name, class T = typename PrimConv<Name>::T>
878
0
bool Pop(InterpState &S, CodePtr OpPC) {
879
0
  S.Stk.pop<T>();
880
0
  return true;
881
0
}
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
882
883
//===----------------------------------------------------------------------===//
884
// Const
885
//===----------------------------------------------------------------------===//
886
887
template <PrimType Name, class T = typename PrimConv<Name>::T>
888
0
bool Const(InterpState &S, CodePtr OpPC, const T &Arg) {
889
0
  S.Stk.push<T>(Arg);
890
0
  return true;
891
0
}
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)10, bool>(clang::interp::InterpState&, clang::interp::CodePtr, bool const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Floating const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)0, signed char>(clang::interp::InterpState&, clang::interp::CodePtr, signed char const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)2, short>(clang::interp::InterpState&, clang::interp::CodePtr, short const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)4, int>(clang::interp::InterpState&, clang::interp::CodePtr, int const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)6, long>(clang::interp::InterpState&, clang::interp::CodePtr, long const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)1, unsigned char>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned char const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)3, unsigned short>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned short const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)5, unsigned int>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)7, unsigned long>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned long const&)
892
893
//===----------------------------------------------------------------------===//
894
// Get/Set Local/Param/Global/This
895
//===----------------------------------------------------------------------===//
896
897
template <PrimType Name, class T = typename PrimConv<Name>::T>
898
0
bool GetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
899
0
  const Pointer &Ptr = S.Current->getLocalPointer(I);
900
0
  if (!CheckLoad(S, OpPC, Ptr))
901
0
    return false;
902
0
  S.Stk.push<T>(Ptr.deref<T>());
903
0
  return true;
904
0
}
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
905
906
/// 1) Pops the value from the stack.
907
/// 2) Writes the value to the local variable with the
908
///    given offset.
909
template <PrimType Name, class T = typename PrimConv<Name>::T>
910
0
bool SetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
911
0
  S.Current->setLocal<T>(I, S.Stk.pop<T>());
912
0
  return true;
913
0
}
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
914
915
template <PrimType Name, class T = typename PrimConv<Name>::T>
916
0
bool GetParam(InterpState &S, CodePtr OpPC, uint32_t I) {
917
0
  if (S.checkingPotentialConstantExpression()) {
918
0
    return false;
919
0
  }
920
0
  S.Stk.push<T>(S.Current->getParam<T>(I));
921
0
  return true;
922
0
}
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
923
924
template <PrimType Name, class T = typename PrimConv<Name>::T>
925
0
bool SetParam(InterpState &S, CodePtr OpPC, uint32_t I) {
926
0
  S.Current->setParam<T>(I, S.Stk.pop<T>());
927
0
  return true;
928
0
}
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
929
930
/// 1) Peeks a pointer on the stack
931
/// 2) Pushes the value of the pointer's field on the stack
932
template <PrimType Name, class T = typename PrimConv<Name>::T>
933
0
bool GetField(InterpState &S, CodePtr OpPC, uint32_t I) {
934
0
  const Pointer &Obj = S.Stk.peek<Pointer>();
935
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
936
0
      return false;
937
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
938
0
    return false;
939
0
  const Pointer &Field = Obj.atField(I);
940
0
  if (!CheckLoad(S, OpPC, Field))
941
0
    return false;
942
0
  S.Stk.push<T>(Field.deref<T>());
943
0
  return true;
944
0
}
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
945
946
template <PrimType Name, class T = typename PrimConv<Name>::T>
947
0
bool SetField(InterpState &S, CodePtr OpPC, uint32_t I) {
948
0
  const T &Value = S.Stk.pop<T>();
949
0
  const Pointer &Obj = S.Stk.peek<Pointer>();
950
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
951
0
    return false;
952
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
953
0
    return false;
954
0
  const Pointer &Field = Obj.atField(I);
955
0
  if (!CheckStore(S, OpPC, Field))
956
0
    return false;
957
0
  Field.initialize();
958
0
  Field.deref<T>() = Value;
959
0
  return true;
960
0
}
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
961
962
/// 1) Pops a pointer from the stack
963
/// 2) Pushes the value of the pointer's field on the stack
964
template <PrimType Name, class T = typename PrimConv<Name>::T>
965
0
bool GetFieldPop(InterpState &S, CodePtr OpPC, uint32_t I) {
966
0
  const Pointer &Obj = S.Stk.pop<Pointer>();
967
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
968
0
    return false;
969
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
970
0
    return false;
971
0
  const Pointer &Field = Obj.atField(I);
972
0
  if (!CheckLoad(S, OpPC, Field))
973
0
    return false;
974
0
  S.Stk.push<T>(Field.deref<T>());
975
0
  return true;
976
0
}
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
977
978
template <PrimType Name, class T = typename PrimConv<Name>::T>
979
0
bool GetThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
980
0
  if (S.checkingPotentialConstantExpression())
981
0
    return false;
982
0
  const Pointer &This = S.Current->getThis();
983
0
  if (!CheckThis(S, OpPC, This))
984
0
    return false;
985
0
  const Pointer &Field = This.atField(I);
986
0
  if (!CheckLoad(S, OpPC, Field))
987
0
    return false;
988
0
  S.Stk.push<T>(Field.deref<T>());
989
0
  return true;
990
0
}
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
991
992
template <PrimType Name, class T = typename PrimConv<Name>::T>
993
0
bool SetThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
994
0
  if (S.checkingPotentialConstantExpression())
995
0
    return false;
996
0
  const T &Value = S.Stk.pop<T>();
997
0
  const Pointer &This = S.Current->getThis();
998
0
  if (!CheckThis(S, OpPC, This))
999
0
    return false;
1000
0
  const Pointer &Field = This.atField(I);
1001
0
  if (!CheckStore(S, OpPC, Field))
1002
0
    return false;
1003
0
  Field.deref<T>() = Value;
1004
0
  return true;
1005
0
}
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1006
1007
template <PrimType Name, class T = typename PrimConv<Name>::T>
1008
0
bool GetGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
1009
0
  const Block *B = S.P.getGlobal(I);
1010
1011
0
  if (!CheckConstant(S, OpPC, B->getDescriptor()))
1012
0
    return false;
1013
0
  if (B->isExtern())
1014
0
    return false;
1015
0
  S.Stk.push<T>(B->deref<T>());
1016
0
  return true;
1017
0
}
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1018
1019
/// Same as GetGlobal, but without the checks.
1020
template <PrimType Name, class T = typename PrimConv<Name>::T>
1021
0
bool GetGlobalUnchecked(InterpState &S, CodePtr OpPC, uint32_t I) {
1022
0
  auto *B = S.P.getGlobal(I);
1023
0
  S.Stk.push<T>(B->deref<T>());
1024
0
  return true;
1025
0
}
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobalUnchecked<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1026
1027
template <PrimType Name, class T = typename PrimConv<Name>::T>
1028
0
bool SetGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
1029
  // TODO: emit warning.
1030
0
  return false;
1031
0
}
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1032
1033
template <PrimType Name, class T = typename PrimConv<Name>::T>
1034
0
bool InitGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
1035
0
  S.P.getGlobal(I)->deref<T>() = S.Stk.pop<T>();
1036
0
  return true;
1037
0
}
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1038
1039
/// 1) Converts the value on top of the stack to an APValue
1040
/// 2) Sets that APValue on \Temp
1041
/// 3) Initialized global with index \I with that
1042
template <PrimType Name, class T = typename PrimConv<Name>::T>
1043
bool InitGlobalTemp(InterpState &S, CodePtr OpPC, uint32_t I,
1044
0
                    const LifetimeExtendedTemporaryDecl *Temp) {
1045
0
  assert(Temp);
1046
0
  const T Value = S.Stk.peek<T>();
1047
0
  APValue APV = Value.toAPValue();
1048
0
  APValue *Cached = Temp->getOrCreateValue(true);
1049
0
  *Cached = APV;
1050
1051
0
  S.P.getGlobal(I)->deref<T>() = S.Stk.pop<T>();
1052
0
  return true;
1053
0
}
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
Unexecuted instantiation: bool clang::interp::InitGlobalTemp<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::LifetimeExtendedTemporaryDecl const*)
1054
1055
/// 1) Converts the value on top of the stack to an APValue
1056
/// 2) Sets that APValue on \Temp
1057
/// 3) Initialized global with index \I with that
1058
inline bool InitGlobalTempComp(InterpState &S, CodePtr OpPC,
1059
0
                               const LifetimeExtendedTemporaryDecl *Temp) {
1060
0
  assert(Temp);
1061
0
  const Pointer &P = S.Stk.peek<Pointer>();
1062
0
  APValue *Cached = Temp->getOrCreateValue(true);
1063
1064
0
  *Cached = P.toRValue(S.getCtx());
1065
0
  return true;
1066
0
}
1067
1068
template <PrimType Name, class T = typename PrimConv<Name>::T>
1069
0
bool InitThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
1070
0
  if (S.checkingPotentialConstantExpression())
1071
0
    return false;
1072
0
  const Pointer &This = S.Current->getThis();
1073
0
  if (!CheckThis(S, OpPC, This))
1074
0
    return false;
1075
0
  const Pointer &Field = This.atField(I);
1076
0
  Field.deref<T>() = S.Stk.pop<T>();
1077
0
  Field.initialize();
1078
0
  return true;
1079
0
}
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1080
1081
template <PrimType Name, class T = typename PrimConv<Name>::T>
1082
0
bool InitThisBitField(InterpState &S, CodePtr OpPC, const Record::Field *F) {
1083
0
  assert(F->isBitField());
1084
0
  if (S.checkingPotentialConstantExpression())
1085
0
    return false;
1086
0
  const Pointer &This = S.Current->getThis();
1087
0
  if (!CheckThis(S, OpPC, This))
1088
0
    return false;
1089
0
  const Pointer &Field = This.atField(F->Offset);
1090
0
  const auto &Value = S.Stk.pop<T>();
1091
0
  Field.deref<T>() = Value.truncate(F->Decl->getBitWidthValue(S.getCtx()));
1092
0
  Field.initialize();
1093
0
  return true;
1094
0
}
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitThisBitField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
1095
1096
template <PrimType Name, class T = typename PrimConv<Name>::T>
1097
0
bool InitThisFieldActive(InterpState &S, CodePtr OpPC, uint32_t I) {
1098
0
  if (S.checkingPotentialConstantExpression())
1099
0
    return false;
1100
0
  const Pointer &This = S.Current->getThis();
1101
0
  if (!CheckThis(S, OpPC, This))
1102
0
    return false;
1103
0
  const Pointer &Field = This.atField(I);
1104
0
  Field.deref<T>() = S.Stk.pop<T>();
1105
0
  Field.activate();
1106
0
  Field.initialize();
1107
0
  return true;
1108
0
}
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1109
1110
/// 1) Pops the value from the stack
1111
/// 2) Peeks a pointer from the stack
1112
/// 3) Pushes the value to field I of the pointer on the stack
1113
template <PrimType Name, class T = typename PrimConv<Name>::T>
1114
0
bool InitField(InterpState &S, CodePtr OpPC, uint32_t I) {
1115
0
  const T &Value = S.Stk.pop<T>();
1116
0
  const Pointer &Field = S.Stk.peek<Pointer>().atField(I);
1117
0
  Field.deref<T>() = Value;
1118
0
  Field.activate();
1119
0
  Field.initialize();
1120
0
  return true;
1121
0
}
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1122
1123
template <PrimType Name, class T = typename PrimConv<Name>::T>
1124
0
bool InitBitField(InterpState &S, CodePtr OpPC, const Record::Field *F) {
1125
0
  assert(F->isBitField());
1126
0
  const T &Value = S.Stk.pop<T>();
1127
0
  const Pointer &Field = S.Stk.peek<Pointer>().atField(F->Offset);
1128
0
  Field.deref<T>() = Value.truncate(F->Decl->getBitWidthValue(S.getCtx()));
1129
0
  Field.activate();
1130
0
  Field.initialize();
1131
0
  return true;
1132
0
}
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
Unexecuted instantiation: bool clang::interp::InitBitField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
1133
1134
template <PrimType Name, class T = typename PrimConv<Name>::T>
1135
0
bool InitFieldActive(InterpState &S, CodePtr OpPC, uint32_t I) {
1136
0
  const T &Value = S.Stk.pop<T>();
1137
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1138
0
  const Pointer &Field = Ptr.atField(I);
1139
0
  Field.deref<T>() = Value;
1140
0
  Field.activate();
1141
0
  Field.initialize();
1142
0
  return true;
1143
0
}
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1144
1145
//===----------------------------------------------------------------------===//
1146
// GetPtr Local/Param/Global/Field/This
1147
//===----------------------------------------------------------------------===//
1148
1149
0
inline bool GetPtrLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
1150
0
  S.Stk.push<Pointer>(S.Current->getLocalPointer(I));
1151
0
  return true;
1152
0
}
1153
1154
0
inline bool GetPtrParam(InterpState &S, CodePtr OpPC, uint32_t I) {
1155
0
  if (S.checkingPotentialConstantExpression()) {
1156
0
    return false;
1157
0
  }
1158
0
  S.Stk.push<Pointer>(S.Current->getParamPointer(I));
1159
0
  return true;
1160
0
}
1161
1162
0
inline bool GetPtrGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
1163
0
  S.Stk.push<Pointer>(S.P.getPtrGlobal(I));
1164
0
  return true;
1165
0
}
1166
1167
/// 1) Pops a Pointer from the stack
1168
/// 2) Pushes Pointer.atField(Off) on the stack
1169
0
inline bool GetPtrField(InterpState &S, CodePtr OpPC, uint32_t Off) {
1170
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1171
0
  if (S.inConstantContext() && !CheckNull(S, OpPC, Ptr, CSK_Field))
1172
0
    return false;
1173
0
  if (!CheckExtern(S, OpPC, Ptr))
1174
0
    return false;
1175
0
  if (!CheckRange(S, OpPC, Ptr, CSK_Field))
1176
0
    return false;
1177
0
  if (!CheckSubobject(S, OpPC, Ptr, CSK_Field))
1178
0
    return false;
1179
1180
0
  S.Stk.push<Pointer>(Ptr.atField(Off));
1181
0
  return true;
1182
0
}
1183
1184
0
inline bool GetPtrThisField(InterpState &S, CodePtr OpPC, uint32_t Off) {
1185
0
  if (S.checkingPotentialConstantExpression())
1186
0
    return false;
1187
0
  const Pointer &This = S.Current->getThis();
1188
0
  if (!CheckThis(S, OpPC, This))
1189
0
    return false;
1190
0
  S.Stk.push<Pointer>(This.atField(Off));
1191
0
  return true;
1192
0
}
1193
1194
0
inline bool GetPtrActiveField(InterpState &S, CodePtr OpPC, uint32_t Off) {
1195
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1196
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Field))
1197
0
    return false;
1198
0
  if (!CheckRange(S, OpPC, Ptr, CSK_Field))
1199
0
    return false;
1200
0
  Pointer Field = Ptr.atField(Off);
1201
0
  Ptr.deactivate();
1202
0
  Field.activate();
1203
0
  S.Stk.push<Pointer>(std::move(Field));
1204
0
  return true;
1205
0
}
1206
1207
0
inline bool GetPtrActiveThisField(InterpState &S, CodePtr OpPC, uint32_t Off) {
1208
0
 if (S.checkingPotentialConstantExpression())
1209
0
    return false;
1210
0
  const Pointer &This = S.Current->getThis();
1211
0
  if (!CheckThis(S, OpPC, This))
1212
0
    return false;
1213
0
  Pointer Field = This.atField(Off);
1214
0
  This.deactivate();
1215
0
  Field.activate();
1216
0
  S.Stk.push<Pointer>(std::move(Field));
1217
0
  return true;
1218
0
}
1219
1220
0
inline bool GetPtrDerivedPop(InterpState &S, CodePtr OpPC, uint32_t Off) {
1221
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1222
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Derived))
1223
0
    return false;
1224
0
  if (!CheckSubobject(S, OpPC, Ptr, CSK_Derived))
1225
0
    return false;
1226
0
  S.Stk.push<Pointer>(Ptr.atFieldSub(Off));
1227
0
  return true;
1228
0
}
1229
1230
0
inline bool GetPtrBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
1231
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
1232
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Base))
1233
0
    return false;
1234
0
  if (!CheckSubobject(S, OpPC, Ptr, CSK_Base))
1235
0
    return false;
1236
0
  S.Stk.push<Pointer>(Ptr.atField(Off));
1237
0
  return true;
1238
0
}
1239
1240
0
inline bool GetPtrBasePop(InterpState &S, CodePtr OpPC, uint32_t Off) {
1241
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1242
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Base))
1243
0
    return false;
1244
0
  if (!CheckSubobject(S, OpPC, Ptr, CSK_Base))
1245
0
    return false;
1246
0
  S.Stk.push<Pointer>(Ptr.atField(Off));
1247
0
  return true;
1248
0
}
1249
1250
0
inline bool GetPtrThisBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
1251
0
  if (S.checkingPotentialConstantExpression())
1252
0
    return false;
1253
0
  const Pointer &This = S.Current->getThis();
1254
0
  if (!CheckThis(S, OpPC, This))
1255
0
    return false;
1256
0
  S.Stk.push<Pointer>(This.atField(Off));
1257
0
  return true;
1258
0
}
1259
1260
0
inline bool InitPtrPop(InterpState &S, CodePtr OpPC) {
1261
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1262
0
  Ptr.initialize();
1263
0
  return true;
1264
0
}
1265
1266
inline bool VirtBaseHelper(InterpState &S, CodePtr OpPC, const RecordDecl *Decl,
1267
0
                           const Pointer &Ptr) {
1268
0
  Pointer Base = Ptr;
1269
0
  while (Base.isBaseClass())
1270
0
    Base = Base.getBase();
1271
1272
0
  auto *Field = Base.getRecord()->getVirtualBase(Decl);
1273
0
  S.Stk.push<Pointer>(Base.atField(Field->Offset));
1274
0
  return true;
1275
0
}
1276
1277
0
inline bool GetPtrVirtBase(InterpState &S, CodePtr OpPC, const RecordDecl *D) {
1278
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1279
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Base))
1280
0
    return false;
1281
0
  return VirtBaseHelper(S, OpPC, D, Ptr);
1282
0
}
1283
1284
inline bool GetPtrThisVirtBase(InterpState &S, CodePtr OpPC,
1285
0
                               const RecordDecl *D) {
1286
0
  if (S.checkingPotentialConstantExpression())
1287
0
    return false;
1288
0
  const Pointer &This = S.Current->getThis();
1289
0
  if (!CheckThis(S, OpPC, This))
1290
0
    return false;
1291
0
  return VirtBaseHelper(S, OpPC, D, S.Current->getThis());
1292
0
}
1293
1294
//===----------------------------------------------------------------------===//
1295
// Load, Store, Init
1296
//===----------------------------------------------------------------------===//
1297
1298
template <PrimType Name, class T = typename PrimConv<Name>::T>
1299
0
bool Load(InterpState &S, CodePtr OpPC) {
1300
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
1301
0
  if (!CheckLoad(S, OpPC, Ptr))
1302
0
    return false;
1303
0
  S.Stk.push<T>(Ptr.deref<T>());
1304
0
  return true;
1305
0
}
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
1306
1307
template <PrimType Name, class T = typename PrimConv<Name>::T>
1308
0
bool LoadPop(InterpState &S, CodePtr OpPC) {
1309
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1310
0
  if (!CheckLoad(S, OpPC, Ptr))
1311
0
    return false;
1312
0
  S.Stk.push<T>(Ptr.deref<T>());
1313
0
  return true;
1314
0
}
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
1315
1316
template <PrimType Name, class T = typename PrimConv<Name>::T>
1317
0
bool Store(InterpState &S, CodePtr OpPC) {
1318
0
  const T &Value = S.Stk.pop<T>();
1319
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
1320
0
  if (!CheckStore(S, OpPC, Ptr))
1321
0
    return false;
1322
0
  if (!Ptr.isRoot())
1323
0
    Ptr.initialize();
1324
0
  Ptr.deref<T>() = Value;
1325
0
  return true;
1326
0
}
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
1327
1328
template <PrimType Name, class T = typename PrimConv<Name>::T>
1329
0
bool StorePop(InterpState &S, CodePtr OpPC) {
1330
0
  const T &Value = S.Stk.pop<T>();
1331
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1332
0
  if (!CheckStore(S, OpPC, Ptr))
1333
0
    return false;
1334
0
  if (!Ptr.isRoot())
1335
0
    Ptr.initialize();
1336
0
  Ptr.deref<T>() = Value;
1337
0
  return true;
1338
0
}
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
1339
1340
template <PrimType Name, class T = typename PrimConv<Name>::T>
1341
0
bool StoreBitField(InterpState &S, CodePtr OpPC) {
1342
0
  const T &Value = S.Stk.pop<T>();
1343
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
1344
0
  if (!CheckStore(S, OpPC, Ptr))
1345
0
    return false;
1346
0
  if (!Ptr.isRoot())
1347
0
    Ptr.initialize();
1348
0
  if (const auto *FD = Ptr.getField())
1349
0
    Ptr.deref<T>() = Value.truncate(FD->getBitWidthValue(S.getCtx()));
1350
0
  else
1351
0
    Ptr.deref<T>() = Value;
1352
0
  return true;
1353
0
}
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitField<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1354
1355
template <PrimType Name, class T = typename PrimConv<Name>::T>
1356
0
bool StoreBitFieldPop(InterpState &S, CodePtr OpPC) {
1357
0
  const T &Value = S.Stk.pop<T>();
1358
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1359
0
  if (!CheckStore(S, OpPC, Ptr))
1360
0
    return false;
1361
0
  if (!Ptr.isRoot())
1362
0
    Ptr.initialize();
1363
0
  if (const auto *FD = Ptr.getField())
1364
0
    Ptr.deref<T>() = Value.truncate(FD->getBitWidthValue(S.getCtx()));
1365
0
  else
1366
0
    Ptr.deref<T>() = Value;
1367
0
  return true;
1368
0
}
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StoreBitFieldPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1369
1370
template <PrimType Name, class T = typename PrimConv<Name>::T>
1371
0
bool InitPop(InterpState &S, CodePtr OpPC) {
1372
0
  const T &Value = S.Stk.pop<T>();
1373
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1374
0
  if (!CheckInit(S, OpPC, Ptr))
1375
0
    return false;
1376
0
  Ptr.initialize();
1377
0
  new (&Ptr.deref<T>()) T(Value);
1378
0
  return true;
1379
0
}
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr)
1380
1381
/// 1) Pops the value from the stack
1382
/// 2) Peeks a pointer and gets its index \Idx
1383
/// 3) Sets the value on the pointer, leaving the pointer on the stack.
1384
template <PrimType Name, class T = typename PrimConv<Name>::T>
1385
0
bool InitElem(InterpState &S, CodePtr OpPC, uint32_t Idx) {
1386
0
  const T &Value = S.Stk.pop<T>();
1387
0
  const Pointer &Ptr = S.Stk.peek<Pointer>().atIndex(Idx);
1388
0
  if (!CheckInit(S, OpPC, Ptr))
1389
0
    return false;
1390
0
  Ptr.initialize();
1391
0
  new (&Ptr.deref<T>()) T(Value);
1392
0
  return true;
1393
0
}
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1394
1395
/// The same as InitElem, but pops the pointer as well.
1396
template <PrimType Name, class T = typename PrimConv<Name>::T>
1397
0
bool InitElemPop(InterpState &S, CodePtr OpPC, uint32_t Idx) {
1398
0
  const T &Value = S.Stk.pop<T>();
1399
0
  const Pointer &Ptr = S.Stk.pop<Pointer>().atIndex(Idx);
1400
0
  if (!CheckInit(S, OpPC, Ptr))
1401
0
    return false;
1402
0
  Ptr.initialize();
1403
0
  new (&Ptr.deref<T>()) T(Value);
1404
0
  return true;
1405
0
}
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)11, clang::interp::Floating>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1406
1407
//===----------------------------------------------------------------------===//
1408
// AddOffset, SubOffset
1409
//===----------------------------------------------------------------------===//
1410
1411
template <class T, ArithOp Op>
1412
bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset,
1413
0
                  const Pointer &Ptr) {
1414
0
  if (!CheckRange(S, OpPC, Ptr, CSK_ArrayToPointer))
1415
0
    return false;
1416
1417
  // A zero offset does not change the pointer.
1418
0
  if (Offset.isZero()) {
1419
0
    S.Stk.push<Pointer>(Ptr);
1420
0
    return true;
1421
0
  }
1422
1423
0
  if (!CheckNull(S, OpPC, Ptr, CSK_ArrayIndex))
1424
0
    return false;
1425
1426
  // Arrays of unknown bounds cannot have pointers into them.
1427
0
  if (!CheckArray(S, OpPC, Ptr))
1428
0
    return false;
1429
1430
  // Get a version of the index comparable to the type.
1431
0
  T Index = T::from(Ptr.getIndex(), Offset.bitWidth());
1432
  // Compute the largest index into the array.
1433
0
  T MaxIndex = T::from(Ptr.getNumElems(), Offset.bitWidth());
1434
1435
0
  bool Invalid = false;
1436
  // Helper to report an invalid offset, computed as APSInt.
1437
0
  auto DiagInvalidOffset = [&]() -> void {
1438
0
    const unsigned Bits = Offset.bitWidth();
1439
0
    APSInt APOffset(Offset.toAPSInt().extend(Bits + 2), false);
1440
0
    APSInt APIndex(Index.toAPSInt().extend(Bits + 2), false);
1441
0
    APSInt NewIndex =
1442
0
        (Op == ArithOp::Add) ? (APIndex + APOffset) : (APIndex - APOffset);
1443
0
    S.CCEDiag(S.Current->getSource(OpPC), diag::note_constexpr_array_index)
1444
0
        << NewIndex
1445
0
        << /*array*/ static_cast<int>(!Ptr.inArray())
1446
0
        << static_cast<unsigned>(MaxIndex);
1447
0
    Invalid = true;
1448
0
  };
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::IntegralAP<false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::IntegralAP<true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Boolean, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Boolean const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::IntegralAP<false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::IntegralAP<true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
Unexecuted instantiation: clang::interp::OffsetHelper<clang::interp::Boolean, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Boolean const&, clang::interp::Pointer const&)::{lambda()#1}::operator()() const
1449
1450
0
  T MaxOffset = T::from(MaxIndex - Index, Offset.bitWidth());
1451
0
  if constexpr (Op == ArithOp::Add) {
1452
    // If the new offset would be negative, bail out.
1453
0
    if (Offset.isNegative() && (Offset.isMin() || -Offset > Index))
1454
0
      DiagInvalidOffset();
1455
1456
    // If the new offset would be out of bounds, bail out.
1457
0
    if (Offset.isPositive() && Offset > MaxOffset)
1458
0
      DiagInvalidOffset();
1459
0
  } else {
1460
    // If the new offset would be negative, bail out.
1461
0
    if (Offset.isPositive() && Index < Offset)
1462
0
      DiagInvalidOffset();
1463
1464
    // If the new offset would be out of bounds, bail out.
1465
0
    if (Offset.isNegative() && (Offset.isMin() || -Offset > MaxOffset))
1466
0
      DiagInvalidOffset();
1467
0
  }
1468
1469
0
  if (Invalid && !Ptr.isDummy() && S.getLangOpts().CPlusPlus)
1470
0
    return false;
1471
1472
  // Offset is valid - compute it on unsigned.
1473
0
  int64_t WideIndex = static_cast<int64_t>(Index);
1474
0
  int64_t WideOffset = static_cast<int64_t>(Offset);
1475
0
  int64_t Result;
1476
0
  if constexpr (Op == ArithOp::Add)
1477
0
    Result = WideIndex + WideOffset;
1478
0
  else
1479
0
    Result = WideIndex - WideOffset;
1480
1481
0
  S.Stk.push<Pointer>(Ptr.atIndex(static_cast<unsigned>(Result)));
1482
0
  return true;
1483
0
}
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::IntegralAP<false>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::IntegralAP<true>, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, (clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Boolean const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<8u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<16u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<32u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Integral<64u, false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::IntegralAP<false>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<false> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::IntegralAP<true>, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::IntegralAP<true> const&, clang::interp::Pointer const&)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, (clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Boolean const&, clang::interp::Pointer const&)
1484
1485
template <PrimType Name, class T = typename PrimConv<Name>::T>
1486
0
bool AddOffset(InterpState &S, CodePtr OpPC) {
1487
0
  const T &Offset = S.Stk.pop<T>();
1488
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1489
0
  return OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr);
1490
0
}
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::AddOffset<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1491
1492
template <PrimType Name, class T = typename PrimConv<Name>::T>
1493
0
bool SubOffset(InterpState &S, CodePtr OpPC) {
1494
0
  const T &Offset = S.Stk.pop<T>();
1495
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1496
0
  return OffsetHelper<T, ArithOp::Sub>(S, OpPC, Offset, Ptr);
1497
0
}
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubOffset<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1498
1499
template <ArithOp Op>
1500
static inline bool IncDecPtrHelper(InterpState &S, CodePtr OpPC,
1501
0
                                   const Pointer &Ptr) {
1502
0
  using OneT = Integral<8, false>;
1503
1504
0
  const Pointer &P = Ptr.deref<Pointer>();
1505
0
  if (!CheckNull(S, OpPC, P, CSK_ArrayIndex))
1506
0
    return false;
1507
1508
  // Get the current value on the stack.
1509
0
  S.Stk.push<Pointer>(P);
1510
1511
  // Now the current Ptr again and a constant 1.
1512
0
  OneT One = OneT::from(1);
1513
0
  if (!OffsetHelper<OneT, Op>(S, OpPC, One, P))
1514
0
    return false;
1515
1516
  // Store the new value.
1517
0
  Ptr.deref<Pointer>() = S.Stk.pop<Pointer>();
1518
0
  return true;
1519
0
}
Unexecuted instantiation: Context.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: Context.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: EvalEmitter.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: EvalEmitter.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: InterpBuiltin.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: InterpBuiltin.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: Interp.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)1>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
Unexecuted instantiation: Interp.cpp:bool clang::interp::IncDecPtrHelper<(clang::interp::ArithOp)0>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Pointer const&)
1520
1521
0
static inline bool IncPtr(InterpState &S, CodePtr OpPC) {
1522
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1523
1524
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Increment))
1525
0
    return false;
1526
1527
0
  return IncDecPtrHelper<ArithOp::Add>(S, OpPC, Ptr);
1528
0
}
Unexecuted instantiation: Context.cpp:clang::interp::IncPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::IncPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::IncPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: Interp.cpp:clang::interp::IncPtr(clang::interp::InterpState&, clang::interp::CodePtr)
1529
1530
0
static inline bool DecPtr(InterpState &S, CodePtr OpPC) {
1531
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1532
1533
0
  if (!CheckInitialized(S, OpPC, Ptr, AK_Decrement))
1534
0
    return false;
1535
1536
0
  return IncDecPtrHelper<ArithOp::Sub>(S, OpPC, Ptr);
1537
0
}
Unexecuted instantiation: Context.cpp:clang::interp::DecPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::DecPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::DecPtr(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: Interp.cpp:clang::interp::DecPtr(clang::interp::InterpState&, clang::interp::CodePtr)
1538
1539
/// 1) Pops a Pointer from the stack.
1540
/// 2) Pops another Pointer from the stack.
1541
/// 3) Pushes the different of the indices of the two pointers on the stack.
1542
template <PrimType Name, class T = typename PrimConv<Name>::T>
1543
0
inline bool SubPtr(InterpState &S, CodePtr OpPC) {
1544
0
  const Pointer &LHS = S.Stk.pop<Pointer>();
1545
0
  const Pointer &RHS = S.Stk.pop<Pointer>();
1546
1547
0
  if (!Pointer::hasSameBase(LHS, RHS) && S.getLangOpts().CPlusPlus) {
1548
    // TODO: Diagnose.
1549
0
    return false;
1550
0
  }
1551
1552
0
  T A = T::from(LHS.getIndex());
1553
0
  T B = T::from(RHS.getIndex());
1554
0
  return AddSubMulHelper<T, T::sub, std::minus>(S, OpPC, A.bitWidth(), A, B);
1555
0
}
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::SubPtr<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
1556
1557
//===----------------------------------------------------------------------===//
1558
// Destroy
1559
//===----------------------------------------------------------------------===//
1560
1561
0
inline bool Destroy(InterpState &S, CodePtr OpPC, uint32_t I) {
1562
0
  S.Current->destroy(I);
1563
0
  return true;
1564
0
}
1565
1566
//===----------------------------------------------------------------------===//
1567
// Cast, CastFP
1568
//===----------------------------------------------------------------------===//
1569
1570
0
template <PrimType TIn, PrimType TOut> bool Cast(InterpState &S, CodePtr OpPC) {
1571
0
  using T = typename PrimConv<TIn>::T;
1572
0
  using U = typename PrimConv<TOut>::T;
1573
0
  S.Stk.push<U>(U::from(S.Stk.pop<T>()));
1574
0
  return true;
1575
0
}
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)1, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)0, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)3, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)2, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)5, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)4, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)7, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)6, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)10, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)8, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Cast<(clang::interp::PrimType)9, (clang::interp::PrimType)10>(clang::interp::InterpState&, clang::interp::CodePtr)
1576
1577
/// 1) Pops a Floating from the stack.
1578
/// 2) Pushes a new floating on the stack that uses the given semantics.
1579
inline bool CastFP(InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem,
1580
0
            llvm::RoundingMode RM) {
1581
0
  Floating F = S.Stk.pop<Floating>();
1582
0
  Floating Result = F.toSemantics(Sem, RM);
1583
0
  S.Stk.push<Floating>(Result);
1584
0
  return true;
1585
0
}
1586
1587
/// Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need
1588
/// to know what bitwidth the result should be.
1589
template <PrimType Name, class T = typename PrimConv<Name>::T>
1590
0
bool CastAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth) {
1591
0
  S.Stk.push<IntegralAP<false>>(
1592
0
      IntegralAP<false>::from(S.Stk.pop<T>(), BitWidth));
1593
0
  return true;
1594
0
}
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAP<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1595
1596
template <PrimType Name, class T = typename PrimConv<Name>::T>
1597
0
bool CastAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth) {
1598
0
  S.Stk.push<IntegralAP<true>>(
1599
0
      IntegralAP<true>::from(S.Stk.pop<T>(), BitWidth));
1600
0
  return true;
1601
0
}
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::CastAPS<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1602
1603
template <PrimType Name, class T = typename PrimConv<Name>::T>
1604
bool CastIntegralFloating(InterpState &S, CodePtr OpPC,
1605
                          const llvm::fltSemantics *Sem,
1606
0
                          llvm::RoundingMode RM) {
1607
0
  const T &From = S.Stk.pop<T>();
1608
0
  APSInt FromAP = From.toAPSInt();
1609
0
  Floating Result;
1610
1611
0
  auto Status = Floating::fromIntegral(FromAP, *Sem, RM, Result);
1612
0
  S.Stk.push<Floating>(Result);
1613
1614
0
  return CheckFloatResult(S, OpPC, Result, Status);
1615
0
}
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
Unexecuted instantiation: bool clang::interp::CastIntegralFloating<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::fltSemantics const*, llvm::RoundingMode)
1616
1617
template <PrimType Name, class T = typename PrimConv<Name>::T>
1618
0
bool CastFloatingIntegral(InterpState &S, CodePtr OpPC) {
1619
0
  const Floating &F = S.Stk.pop<Floating>();
1620
1621
0
  if constexpr (std::is_same_v<T, Boolean>) {
1622
0
    S.Stk.push<T>(T(F.isNonZero()));
1623
0
    return true;
1624
0
  } else {
1625
0
    APSInt Result(std::max(8u, T::bitWidth()),
1626
0
                  /*IsUnsigned=*/!T::isSigned());
1627
0
    auto Status = F.convertToInteger(Result);
1628
1629
    // Float-to-Integral overflow check.
1630
0
    if ((Status & APFloat::opStatus::opInvalidOp) && F.isFinite()) {
1631
0
      const Expr *E = S.Current->getExpr(OpPC);
1632
0
      QualType Type = E->getType();
1633
1634
0
      S.CCEDiag(E, diag::note_constexpr_overflow) << F.getAPFloat() << Type;
1635
0
      if (S.noteUndefinedBehavior()) {
1636
0
        S.Stk.push<T>(T(Result));
1637
0
        return true;
1638
0
      }
1639
0
      return false;
1640
0
    }
1641
1642
0
    S.Stk.push<T>(T(Result));
1643
0
    return CheckFloatResult(S, OpPC, F, Status);
1644
0
  }
1645
0
}
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastFloatingIntegral<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1646
1647
static inline bool CastFloatingIntegralAP(InterpState &S, CodePtr OpPC,
1648
0
                                          uint32_t BitWidth) {
1649
0
  const Floating &F = S.Stk.pop<Floating>();
1650
1651
0
  APSInt Result(BitWidth, /*IsUnsigned=*/true);
1652
0
  auto Status = F.convertToInteger(Result);
1653
1654
  // Float-to-Integral overflow check.
1655
0
  if ((Status & APFloat::opStatus::opInvalidOp) && F.isFinite()) {
1656
0
    const Expr *E = S.Current->getExpr(OpPC);
1657
0
    QualType Type = E->getType();
1658
1659
0
    S.CCEDiag(E, diag::note_constexpr_overflow) << F.getAPFloat() << Type;
1660
0
    return S.noteUndefinedBehavior();
1661
0
  }
1662
1663
0
  S.Stk.push<IntegralAP<true>>(IntegralAP<true>(Result));
1664
0
  return CheckFloatResult(S, OpPC, F, Status);
1665
0
}
Unexecuted instantiation: Context.cpp:clang::interp::CastFloatingIntegralAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::CastFloatingIntegralAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::CastFloatingIntegralAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: Interp.cpp:clang::interp::CastFloatingIntegralAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1666
1667
static inline bool CastFloatingIntegralAPS(InterpState &S, CodePtr OpPC,
1668
0
                                           uint32_t BitWidth) {
1669
0
  const Floating &F = S.Stk.pop<Floating>();
1670
1671
0
  APSInt Result(BitWidth, /*IsUnsigned=*/false);
1672
0
  auto Status = F.convertToInteger(Result);
1673
1674
  // Float-to-Integral overflow check.
1675
0
  if ((Status & APFloat::opStatus::opInvalidOp) && F.isFinite()) {
1676
0
    const Expr *E = S.Current->getExpr(OpPC);
1677
0
    QualType Type = E->getType();
1678
1679
0
    S.CCEDiag(E, diag::note_constexpr_overflow) << F.getAPFloat() << Type;
1680
0
    return S.noteUndefinedBehavior();
1681
0
  }
1682
1683
0
  S.Stk.push<IntegralAP<true>>(IntegralAP<true>(Result));
1684
0
  return CheckFloatResult(S, OpPC, F, Status);
1685
0
}
Unexecuted instantiation: Context.cpp:clang::interp::CastFloatingIntegralAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::CastFloatingIntegralAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::CastFloatingIntegralAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: Interp.cpp:clang::interp::CastFloatingIntegralAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1686
1687
template <PrimType Name, class T = typename PrimConv<Name>::T>
1688
0
bool CastPointerIntegral(InterpState &S, CodePtr OpPC) {
1689
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1690
1691
0
  if (!CheckPotentialReinterpretCast(S, OpPC, Ptr))
1692
0
    return false;
1693
1694
0
  S.Stk.push<T>(T::from(Ptr.getIntegerRepresentation()));
1695
0
  return true;
1696
0
}
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::CastPointerIntegral<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1697
1698
//===----------------------------------------------------------------------===//
1699
// Zero, Nullptr
1700
//===----------------------------------------------------------------------===//
1701
1702
template <PrimType Name, class T = typename PrimConv<Name>::T>
1703
0
bool Zero(InterpState &S, CodePtr OpPC) {
1704
0
  S.Stk.push<T>(T::zero());
1705
0
  return true;
1706
0
}
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Zero<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1707
1708
0
static inline bool ZeroIntAP(InterpState &S, CodePtr OpPC, uint32_t BitWidth) {
1709
0
  S.Stk.push<IntegralAP<false>>(IntegralAP<false>::zero(BitWidth));
1710
0
  return true;
1711
0
}
Unexecuted instantiation: Context.cpp:clang::interp::ZeroIntAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::ZeroIntAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::ZeroIntAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: Interp.cpp:clang::interp::ZeroIntAP(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1712
1713
0
static inline bool ZeroIntAPS(InterpState &S, CodePtr OpPC, uint32_t BitWidth) {
1714
0
  S.Stk.push<IntegralAP<true>>(IntegralAP<true>::zero(BitWidth));
1715
0
  return true;
1716
0
}
Unexecuted instantiation: Context.cpp:clang::interp::ZeroIntAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: EvalEmitter.cpp:clang::interp::ZeroIntAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: InterpBuiltin.cpp:clang::interp::ZeroIntAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: Interp.cpp:clang::interp::ZeroIntAPS(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
1717
1718
template <PrimType Name, class T = typename PrimConv<Name>::T>
1719
0
inline bool Null(InterpState &S, CodePtr OpPC) {
1720
0
  S.Stk.push<T>();
1721
0
  return true;
1722
0
}
Unexecuted instantiation: bool clang::interp::Null<(clang::interp::PrimType)12, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Null<(clang::interp::PrimType)13, clang::interp::FunctionPointer>(clang::interp::InterpState&, clang::interp::CodePtr)
1723
1724
//===----------------------------------------------------------------------===//
1725
// This, ImplicitThis
1726
//===----------------------------------------------------------------------===//
1727
1728
0
inline bool This(InterpState &S, CodePtr OpPC) {
1729
  // Cannot read 'this' in this mode.
1730
0
  if (S.checkingPotentialConstantExpression()) {
1731
0
    return false;
1732
0
  }
1733
1734
0
  const Pointer &This = S.Current->getThis();
1735
0
  if (!CheckThis(S, OpPC, This))
1736
0
    return false;
1737
1738
0
  S.Stk.push<Pointer>(This);
1739
0
  return true;
1740
0
}
1741
1742
0
inline bool RVOPtr(InterpState &S, CodePtr OpPC) {
1743
0
  assert(S.Current->getFunction()->hasRVO());
1744
0
  if (S.checkingPotentialConstantExpression())
1745
0
    return false;
1746
0
  S.Stk.push<Pointer>(S.Current->getRVOPtr());
1747
0
  return true;
1748
0
}
1749
1750
//===----------------------------------------------------------------------===//
1751
// Shr, Shl
1752
//===----------------------------------------------------------------------===//
1753
1754
template <PrimType NameL, PrimType NameR>
1755
0
inline bool Shr(InterpState &S, CodePtr OpPC) {
1756
0
  using LT = typename PrimConv<NameL>::T;
1757
0
  using RT = typename PrimConv<NameR>::T;
1758
0
  const auto &RHS = S.Stk.pop<RT>();
1759
0
  const auto &LHS = S.Stk.pop<LT>();
1760
0
  const unsigned Bits = LHS.bitWidth();
1761
1762
0
  if (!CheckShift(S, OpPC, LHS, RHS, Bits))
1763
0
    return false;
1764
1765
0
  typename LT::AsUnsigned R;
1766
0
  LT::AsUnsigned::shiftRight(LT::AsUnsigned::from(LHS),
1767
0
                             LT::AsUnsigned::from(RHS), Bits, &R);
1768
0
  S.Stk.push<LT>(LT::from(R));
1769
1770
0
  return true;
1771
0
}
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)0, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)1, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)2, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)3, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)4, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)5, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)6, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)7, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)8, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shr<(clang::interp::PrimType)9, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
1772
1773
template <PrimType NameL, PrimType NameR>
1774
0
inline bool Shl(InterpState &S, CodePtr OpPC) {
1775
0
  using LT = typename PrimConv<NameL>::T;
1776
0
  using RT = typename PrimConv<NameR>::T;
1777
0
  const auto &RHS = S.Stk.pop<RT>();
1778
0
  const auto &LHS = S.Stk.pop<LT>();
1779
0
  const unsigned Bits = LHS.bitWidth();
1780
1781
0
  if (!CheckShift(S, OpPC, LHS, RHS, Bits))
1782
0
    return false;
1783
1784
0
  typename LT::AsUnsigned R;
1785
0
  LT::AsUnsigned::shiftLeft(LT::AsUnsigned::from(LHS),
1786
0
                            LT::AsUnsigned::from(RHS, Bits), Bits, &R);
1787
0
  S.Stk.push<LT>(LT::from(R));
1788
0
  return true;
1789
0
}
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)0, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)1, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)2, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)3, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)4, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)5, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)6, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)7, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)8, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)0>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)1>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)2>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)3>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)4>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)5>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)6>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)7>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)8>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Shl<(clang::interp::PrimType)9, (clang::interp::PrimType)9>(clang::interp::InterpState&, clang::interp::CodePtr)
1790
1791
//===----------------------------------------------------------------------===//
1792
// NoRet
1793
//===----------------------------------------------------------------------===//
1794
1795
0
inline bool NoRet(InterpState &S, CodePtr OpPC) {
1796
0
  SourceLocation EndLoc = S.Current->getCallee()->getEndLoc();
1797
0
  S.FFDiag(EndLoc, diag::note_constexpr_no_return);
1798
0
  return false;
1799
0
}
1800
1801
//===----------------------------------------------------------------------===//
1802
// NarrowPtr, ExpandPtr
1803
//===----------------------------------------------------------------------===//
1804
1805
0
inline bool NarrowPtr(InterpState &S, CodePtr OpPC) {
1806
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1807
0
  S.Stk.push<Pointer>(Ptr.narrow());
1808
0
  return true;
1809
0
}
1810
1811
0
inline bool ExpandPtr(InterpState &S, CodePtr OpPC) {
1812
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1813
0
  S.Stk.push<Pointer>(Ptr.expand());
1814
0
  return true;
1815
0
}
1816
1817
// 1) Pops an integral value from the stack
1818
// 2) Peeks a pointer
1819
// 3) Pushes a new pointer that's a narrowed array
1820
//   element of the peeked pointer with the value
1821
//   from 1) added as offset.
1822
//
1823
// This leaves the original pointer on the stack and pushes a new one
1824
// with the offset applied and narrowed.
1825
template <PrimType Name, class T = typename PrimConv<Name>::T>
1826
0
inline bool ArrayElemPtr(InterpState &S, CodePtr OpPC) {
1827
0
  const T &Offset = S.Stk.pop<T>();
1828
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
1829
1830
0
  if (!OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr))
1831
0
    return false;
1832
1833
0
  return NarrowPtr(S, OpPC);
1834
0
}
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtr<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1835
1836
/// Just takes a pointer and checks if its' an incomplete
1837
/// array type.
1838
0
inline bool ArrayDecay(InterpState &S, CodePtr OpPC) {
1839
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1840
1841
0
  if (!Ptr.isUnknownSizeArray()) {
1842
0
    S.Stk.push<Pointer>(Ptr.atIndex(0));
1843
0
    return true;
1844
0
  }
1845
1846
0
  const SourceInfo &E = S.Current->getSource(OpPC);
1847
0
  S.FFDiag(E, diag::note_constexpr_unsupported_unsized_array);
1848
1849
0
  return false;
1850
0
}
1851
1852
template <PrimType Name, class T = typename PrimConv<Name>::T>
1853
0
inline bool ArrayElemPtrPop(InterpState &S, CodePtr OpPC) {
1854
0
  const T &Offset = S.Stk.pop<T>();
1855
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
1856
1857
0
  if (!OffsetHelper<T, ArithOp::Add>(S, OpPC, Offset, Ptr))
1858
0
    return false;
1859
1860
0
  return NarrowPtr(S, OpPC);
1861
0
}
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::ArrayElemPtrPop<(clang::interp::PrimType)10, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
1862
1863
0
inline bool CheckGlobalCtor(InterpState &S, CodePtr OpPC) {
1864
0
  const Pointer &Obj = S.Stk.peek<Pointer>();
1865
0
  return CheckCtorCall(S, OpPC, Obj);
1866
0
}
1867
1868
0
inline bool Call(InterpState &S, CodePtr OpPC, const Function *Func) {
1869
0
  if (Func->hasThisPointer()) {
1870
0
    size_t ThisOffset =
1871
0
        Func->getArgSize() - (Func->hasRVO() ? primSize(PT_Ptr) : 0);
1872
1873
0
    const Pointer &ThisPtr = S.Stk.peek<Pointer>(ThisOffset);
1874
1875
    // If the current function is a lambda static invoker and
1876
    // the function we're about to call is a lambda call operator,
1877
    // skip the CheckInvoke, since the ThisPtr is a null pointer
1878
    // anyway.
1879
0
    if (!(S.Current->getFunction() &&
1880
0
          S.Current->getFunction()->isLambdaStaticInvoker() &&
1881
0
          Func->isLambdaCallOperator())) {
1882
0
      if (!CheckInvoke(S, OpPC, ThisPtr))
1883
0
        return false;
1884
0
    }
1885
1886
0
    if (S.checkingPotentialConstantExpression())
1887
0
      return false;
1888
0
  }
1889
1890
0
  if (!CheckCallable(S, OpPC, Func))
1891
0
    return false;
1892
1893
0
  if (!CheckCallDepth(S, OpPC))
1894
0
    return false;
1895
1896
0
  auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC);
1897
0
  InterpFrame *FrameBefore = S.Current;
1898
0
  S.Current = NewFrame.get();
1899
1900
0
  APValue CallResult;
1901
  // Note that we cannot assert(CallResult.hasValue()) here since
1902
  // Ret() above only sets the APValue if the curent frame doesn't
1903
  // have a caller set.
1904
0
  if (Interpret(S, CallResult)) {
1905
0
    NewFrame.release(); // Frame was delete'd already.
1906
0
    assert(S.Current == FrameBefore);
1907
0
    return true;
1908
0
  }
1909
1910
  // Interpreting the function failed somehow. Reset to
1911
  // previous state.
1912
0
  S.Current = FrameBefore;
1913
0
  return false;
1914
0
}
1915
1916
0
inline bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func) {
1917
0
  assert(Func->hasThisPointer());
1918
0
  assert(Func->isVirtual());
1919
0
  size_t ThisOffset =
1920
0
      Func->getArgSize() - (Func->hasRVO() ? primSize(PT_Ptr) : 0);
1921
0
  Pointer &ThisPtr = S.Stk.peek<Pointer>(ThisOffset);
1922
1923
0
  const CXXRecordDecl *DynamicDecl =
1924
0
      ThisPtr.getDeclDesc()->getType()->getAsCXXRecordDecl();
1925
0
  const auto *StaticDecl = cast<CXXRecordDecl>(Func->getParentDecl());
1926
0
  const auto *InitialFunction = cast<CXXMethodDecl>(Func->getDecl());
1927
0
  const CXXMethodDecl *Overrider = S.getContext().getOverridingFunction(
1928
0
      DynamicDecl, StaticDecl, InitialFunction);
1929
1930
0
  if (Overrider != InitialFunction) {
1931
    // DR1872: An instantiated virtual constexpr function can't be called in a
1932
    // constant expression (prior to C++20). We can still constant-fold such a
1933
    // call.
1934
0
    if (!S.getLangOpts().CPlusPlus20 && Overrider->isVirtual()) {
1935
0
      const Expr *E = S.Current->getExpr(OpPC);
1936
0
      S.CCEDiag(E, diag::note_constexpr_virtual_call) << E->getSourceRange();
1937
0
    }
1938
1939
0
    Func = S.getContext().getOrCreateFunction(Overrider);
1940
1941
0
    const CXXRecordDecl *ThisFieldDecl =
1942
0
        ThisPtr.getFieldDesc()->getType()->getAsCXXRecordDecl();
1943
0
    if (Func->getParentDecl()->isDerivedFrom(ThisFieldDecl)) {
1944
      // If the function we call is further DOWN the hierarchy than the
1945
      // FieldDesc of our pointer, just get the DeclDesc instead, which
1946
      // is the furthest we might go up in the hierarchy.
1947
0
      ThisPtr = ThisPtr.getDeclPtr();
1948
0
    }
1949
0
  }
1950
1951
0
  return Call(S, OpPC, Func);
1952
0
}
1953
1954
inline bool CallBI(InterpState &S, CodePtr &PC, const Function *Func,
1955
0
                   const CallExpr *CE) {
1956
0
  auto NewFrame = std::make_unique<InterpFrame>(S, Func, PC);
1957
1958
0
  InterpFrame *FrameBefore = S.Current;
1959
0
  S.Current = NewFrame.get();
1960
1961
0
  if (InterpretBuiltin(S, PC, Func, CE)) {
1962
0
    NewFrame.release();
1963
0
    return true;
1964
0
  }
1965
0
  S.Current = FrameBefore;
1966
0
  return false;
1967
0
}
1968
1969
0
inline bool CallPtr(InterpState &S, CodePtr OpPC) {
1970
0
  const FunctionPointer &FuncPtr = S.Stk.pop<FunctionPointer>();
1971
1972
0
  const Function *F = FuncPtr.getFunction();
1973
0
  if (!F || !F->isConstexpr())
1974
0
    return false;
1975
1976
0
  if (F->isVirtual())
1977
0
    return CallVirt(S, OpPC, F);
1978
1979
0
  return Call(S, OpPC, F);
1980
0
}
1981
1982
0
inline bool GetFnPtr(InterpState &S, CodePtr OpPC, const Function *Func) {
1983
0
  assert(Func);
1984
0
  S.Stk.push<FunctionPointer>(Func);
1985
0
  return true;
1986
0
}
1987
1988
/// Just emit a diagnostic. The expression that caused emission of this
1989
/// op is not valid in a constant context.
1990
0
inline bool Invalid(InterpState &S, CodePtr OpPC) {
1991
0
  const SourceLocation &Loc = S.Current->getLocation(OpPC);
1992
0
  S.FFDiag(Loc, diag::note_invalid_subexpr_in_const_expr)
1993
0
      << S.Current->getRange(OpPC);
1994
0
  return false;
1995
0
}
1996
1997
/// Same here, but only for casts.
1998
0
inline bool InvalidCast(InterpState &S, CodePtr OpPC, CastKind Kind) {
1999
0
  const SourceLocation &Loc = S.Current->getLocation(OpPC);
2000
0
  S.FFDiag(Loc, diag::note_constexpr_invalid_cast)
2001
0
      << static_cast<unsigned>(Kind) << S.Current->getRange(OpPC);
2002
0
  return false;
2003
0
}
2004
2005
inline bool InvalidDeclRef(InterpState &S, CodePtr OpPC,
2006
0
                           const DeclRefExpr *DR) {
2007
0
  assert(DR);
2008
0
  return CheckDeclRef(S, OpPC, DR);
2009
0
}
2010
2011
template <PrimType Name, class T = typename PrimConv<Name>::T>
2012
0
inline bool OffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E) {
2013
0
  llvm::SmallVector<int64_t> ArrayIndices;
2014
0
  for (size_t I = 0; I != E->getNumExpressions(); ++I)
2015
0
    ArrayIndices.emplace_back(S.Stk.pop<int64_t>());
2016
2017
0
  int64_t Result;
2018
0
  if (!InterpretOffsetOf(S, OpPC, E, ArrayIndices, Result))
2019
0
    return false;
2020
2021
0
  S.Stk.push<T>(T::from(Result));
2022
2023
0
  return true;
2024
0
}
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)8, clang::interp::IntegralAP<false> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
Unexecuted instantiation: bool clang::interp::OffsetOf<(clang::interp::PrimType)9, clang::interp::IntegralAP<true> >(clang::interp::InterpState&, clang::interp::CodePtr, clang::OffsetOfExpr const*)
2025
2026
//===----------------------------------------------------------------------===//
2027
// Read opcode arguments
2028
//===----------------------------------------------------------------------===//
2029
2030
0
template <typename T> inline T ReadArg(InterpState &S, CodePtr &OpPC) {
2031
0
  if constexpr (std::is_pointer<T>::value) {
2032
0
    uint32_t ID = OpPC.read<uint32_t>();
2033
0
    return reinterpret_cast<T>(S.P.getNativePointer(ID));
2034
0
  } else {
2035
0
    return OpPC.read<T>();
2036
0
  }
2037
0
}
Unexecuted instantiation: llvm::RoundingMode clang::interp::ReadArg<llvm::RoundingMode>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::ComparisonCategoryInfo const* clang::interp::ReadArg<clang::ComparisonCategoryInfo const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::interp::Function const* clang::interp::ReadArg<clang::interp::Function const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::CallExpr const* clang::interp::ReadArg<clang::CallExpr const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: unsigned int clang::interp::ReadArg<unsigned int>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: llvm::fltSemantics const* clang::interp::ReadArg<llvm::fltSemantics const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: bool clang::interp::ReadArg<bool>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: signed char clang::interp::ReadArg<signed char>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: short clang::interp::ReadArg<short>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: int clang::interp::ReadArg<int>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: long clang::interp::ReadArg<long>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: unsigned char clang::interp::ReadArg<unsigned char>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: unsigned short clang::interp::ReadArg<unsigned short>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: unsigned long clang::interp::ReadArg<unsigned long>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::RecordDecl const* clang::interp::ReadArg<clang::RecordDecl const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::interp::Record::Field const* clang::interp::ReadArg<clang::interp::Record::Field const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::LifetimeExtendedTemporaryDecl const* clang::interp::ReadArg<clang::LifetimeExtendedTemporaryDecl const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::interp::CastKind clang::interp::ReadArg<clang::interp::CastKind>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::DeclRefExpr const* clang::interp::ReadArg<clang::DeclRefExpr const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
Unexecuted instantiation: clang::OffsetOfExpr const* clang::interp::ReadArg<clang::OffsetOfExpr const*>(clang::interp::InterpState&, clang::interp::CodePtr&)
2038
2039
0
template <> inline Floating ReadArg<Floating>(InterpState &S, CodePtr &OpPC) {
2040
0
  Floating F = Floating::deserialize(*OpPC);
2041
0
  OpPC += align(F.bytesToSerialize());
2042
0
  return F;
2043
0
}
2044
2045
} // namespace interp
2046
} // namespace clang
2047
2048
#endif