Coverage Report

Created: 2021-08-24 07:12

/Users/buildslave/jenkins/workspace/coverage/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 "Function.h"
17
#include "InterpFrame.h"
18
#include "InterpStack.h"
19
#include "InterpState.h"
20
#include "Opcode.h"
21
#include "PrimType.h"
22
#include "Program.h"
23
#include "State.h"
24
#include "clang/AST/ASTContext.h"
25
#include "clang/AST/ASTDiagnostic.h"
26
#include "clang/AST/CXXInheritance.h"
27
#include "clang/AST/Expr.h"
28
#include "llvm/ADT/APFloat.h"
29
#include "llvm/ADT/APSInt.h"
30
#include "llvm/Support/Endian.h"
31
#include <limits>
32
#include <type_traits>
33
#include <vector>
34
35
namespace clang {
36
namespace interp {
37
38
using APInt = llvm::APInt;
39
using APSInt = llvm::APSInt;
40
41
/// Convers a value to an APValue.
42
0
template <typename T> bool ReturnValue(const T &V, APValue &R) {
43
0
  R = V.toAPValue();
44
0
  return true;
45
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::Boolean>(clang::interp::Boolean const&, clang::APValue&)
Unexecuted instantiation: bool clang::interp::ReturnValue<clang::interp::Pointer>(clang::interp::Pointer const&, clang::APValue&)
46
47
/// Checks if the variable has externally defined storage.
48
bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
49
50
/// Checks if the array is offsetable.
51
bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
52
53
/// Checks if a pointer is live and accesible.
54
bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
55
               AccessKinds AK);
56
/// Checks if a pointer is null.
57
bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
58
               CheckSubobjectKind CSK);
59
60
/// Checks if a pointer is in range.
61
bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
62
                AccessKinds AK);
63
64
/// Checks if a field from which a pointer is going to be derived is valid.
65
bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
66
                CheckSubobjectKind CSK);
67
68
/// Checks if a pointer points to const storage.
69
bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
70
71
/// Checks if a pointer points to a mutable field.
72
bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
73
74
/// Checks if a value can be loaded from a block.
75
bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
76
77
/// Checks if a value can be stored in a block.
78
bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
79
80
/// Checks if a method can be invoked on an object.
81
bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
82
83
/// Checks if a value can be initialized.
84
bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
85
86
/// Checks if a method can be called.
87
bool CheckCallable(InterpState &S, CodePtr OpPC, Function *F);
88
89
/// Checks the 'this' pointer.
90
bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This);
91
92
/// Checks if a method is pure virtual.
93
bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD);
94
95
template <typename T> inline bool IsTrue(const T &V) { return !V.isZero(); }
96
97
//===----------------------------------------------------------------------===//
98
// Add, Sub, Mul
99
//===----------------------------------------------------------------------===//
100
101
template <typename T, bool (*OpFW)(T, T, unsigned, T *),
102
          template <typename U> class OpAP>
103
bool AddSubMulHelper(InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS,
104
0
                     const T &RHS) {
105
  // Fast path - add the numbers with fixed width.
106
0
  T Result;
107
0
  if (!OpFW(LHS, RHS, Bits, &Result)) {
108
0
    S.Stk.push<T>(Result);
109
0
    return true;
110
0
  }
111
112
  // If for some reason evaluation continues, use the truncated results.
113
0
  S.Stk.push<T>(Result);
114
115
  // Slow path - compute the result using another bit of precision.
116
0
  APSInt Value = OpAP<APSInt>()(LHS.toAPSInt(Bits), RHS.toAPSInt(Bits));
117
118
  // Report undefined behaviour, stopping if required.
119
0
  const Expr *E = S.Current->getExpr(OpPC);
120
0
  QualType Type = E->getType();
121
0
  if (S.checkingForUndefinedBehavior()) {
122
0
    SmallString<32> Trunc;
123
0
    Value.trunc(Result.bitWidth()).toString(Trunc, 10);
124
0
    auto Loc = E->getExprLoc();
125
0
    S.report(Loc, diag::warn_integer_constant_overflow) << Trunc << Type;
126
0
    return true;
127
0
  } else {
128
0
    S.CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;
129
0
    return S.noteUndefinedBehavior();
130
0
  }
131
0
}
Unexecuted instantiation: bool clang::interp::AddSubMulHelper<clang::interp::Integral<8u, true>, &(clang::interp::Integral<8u, true>::add(clang::interp::Integral<8u, true>, clang::interp::Integral<8u, true>, unsigned int, clang::interp::Integral<8u, true>*)), 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(clang::interp::Integral<8u, false>, clang::interp::Integral<8u, false>, unsigned int, clang::interp::Integral<8u, false>*)), 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(clang::interp::Integral<16u, true>, clang::interp::Integral<16u, true>, unsigned int, clang::interp::Integral<16u, true>*)), 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(clang::interp::Integral<16u, false>, clang::interp::Integral<16u, false>, unsigned int, clang::interp::Integral<16u, false>*)), 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(clang::interp::Integral<32u, true>, clang::interp::Integral<32u, true>, unsigned int, clang::interp::Integral<32u, true>*)), 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(clang::interp::Integral<32u, false>, clang::interp::Integral<32u, false>, unsigned int, clang::interp::Integral<32u, false>*)), 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(clang::interp::Integral<64u, true>, clang::interp::Integral<64u, true>, unsigned int, clang::interp::Integral<64u, true>*)), 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(clang::interp::Integral<64u, false>, clang::interp::Integral<64u, false>, unsigned int, clang::interp::Integral<64u, false>*)), 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::Boolean, &(clang::interp::Boolean::add(clang::interp::Boolean, clang::interp::Boolean, unsigned int, clang::interp::Boolean*)), 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(clang::interp::Integral<8u, true>, clang::interp::Integral<8u, true>, unsigned int, clang::interp::Integral<8u, true>*)), 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(clang::interp::Integral<8u, false>, clang::interp::Integral<8u, false>, unsigned int, clang::interp::Integral<8u, false>*)), 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(clang::interp::Integral<16u, true>, clang::interp::Integral<16u, true>, unsigned int, clang::interp::Integral<16u, true>*)), 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(clang::interp::Integral<16u, false>, clang::interp::Integral<16u, false>, unsigned int, clang::interp::Integral<16u, false>*)), 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(clang::interp::Integral<32u, true>, clang::interp::Integral<32u, true>, unsigned int, clang::interp::Integral<32u, true>*)), 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(clang::interp::Integral<32u, false>, clang::interp::Integral<32u, false>, unsigned int, clang::interp::Integral<32u, false>*)), 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(clang::interp::Integral<64u, true>, clang::interp::Integral<64u, true>, unsigned int, clang::interp::Integral<64u, true>*)), 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(clang::interp::Integral<64u, false>, clang::interp::Integral<64u, false>, unsigned int, clang::interp::Integral<64u, false>*)), 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::Boolean, &(clang::interp::Boolean::mul(clang::interp::Boolean, clang::interp::Boolean, unsigned int, clang::interp::Boolean*)), 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(clang::interp::Integral<8u, true>, clang::interp::Integral<8u, true>, unsigned int, clang::interp::Integral<8u, true>*)), 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(clang::interp::Integral<8u, false>, clang::interp::Integral<8u, false>, unsigned int, clang::interp::Integral<8u, false>*)), 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(clang::interp::Integral<16u, true>, clang::interp::Integral<16u, true>, unsigned int, clang::interp::Integral<16u, true>*)), 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(clang::interp::Integral<16u, false>, clang::interp::Integral<16u, false>, unsigned int, clang::interp::Integral<16u, false>*)), 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(clang::interp::Integral<32u, true>, clang::interp::Integral<32u, true>, unsigned int, clang::interp::Integral<32u, true>*)), 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(clang::interp::Integral<32u, false>, clang::interp::Integral<32u, false>, unsigned int, clang::interp::Integral<32u, false>*)), 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(clang::interp::Integral<64u, true>, clang::interp::Integral<64u, true>, unsigned int, clang::interp::Integral<64u, true>*)), 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(clang::interp::Integral<64u, false>, clang::interp::Integral<64u, false>, unsigned int, clang::interp::Integral<64u, false>*)), 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::Boolean, &(clang::interp::Boolean::sub(clang::interp::Boolean, clang::interp::Boolean, unsigned int, clang::interp::Boolean*)), std::__1::minus>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int, clang::interp::Boolean const&, clang::interp::Boolean const&)
132
133
template <PrimType Name, class T = typename PrimConv<Name>::T>
134
0
bool Add(InterpState &S, CodePtr OpPC) {
135
0
  const T &RHS = S.Stk.pop<T>();
136
0
  const T &LHS = S.Stk.pop<T>();
137
0
  const unsigned Bits = RHS.bitWidth() + 1;
138
0
  return AddSubMulHelper<T, T::add, std::plus>(S, OpPC, Bits, LHS, RHS);
139
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
140
141
template <PrimType Name, class T = typename PrimConv<Name>::T>
142
0
bool Sub(InterpState &S, CodePtr OpPC) {
143
0
  const T &RHS = S.Stk.pop<T>();
144
0
  const T &LHS = S.Stk.pop<T>();
145
0
  const unsigned Bits = RHS.bitWidth() + 1;
146
0
  return AddSubMulHelper<T, T::sub, std::minus>(S, OpPC, Bits, LHS, RHS);
147
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
148
149
template <PrimType Name, class T = typename PrimConv<Name>::T>
150
0
bool Mul(InterpState &S, CodePtr OpPC) {
151
0
  const T &RHS = S.Stk.pop<T>();
152
0
  const T &LHS = S.Stk.pop<T>();
153
0
  const unsigned Bits = RHS.bitWidth() * 2;
154
0
  return AddSubMulHelper<T, T::mul, std::multiplies>(S, OpPC, Bits, LHS, RHS);
155
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
156
157
//===----------------------------------------------------------------------===//
158
// EQ, NE, GT, GE, LT, LE
159
//===----------------------------------------------------------------------===//
160
161
using CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)>;
162
163
template <typename T>
164
0
bool CmpHelper(InterpState &S, CodePtr OpPC, CompareFn Fn) {
165
0
  using BoolT = PrimConv<PT_Bool>::T;
166
0
  const T &RHS = S.Stk.pop<T>();
167
0
  const T &LHS = S.Stk.pop<T>();
168
0
  S.Stk.push<BoolT>(BoolT::from(Fn(LHS.compare(RHS))));
169
0
  return true;
170
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
171
172
template <typename T>
173
0
bool CmpHelperEQ(InterpState &S, CodePtr OpPC, CompareFn Fn) {
174
0
  return CmpHelper<T>(S, OpPC, Fn);
175
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, llvm::function_ref<bool (clang::ComparisonCategoryResult)>)
176
177
template <>
178
0
inline bool CmpHelper<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
179
0
  using BoolT = PrimConv<PT_Bool>::T;
180
0
  const Pointer &RHS = S.Stk.pop<Pointer>();
181
0
  const Pointer &LHS = S.Stk.pop<Pointer>();
182
183
0
  if (!Pointer::hasSameBase(LHS, RHS)) {
184
0
    const SourceInfo &Loc = S.Current->getSource(OpPC);
185
0
    S.FFDiag(Loc, diag::note_invalid_subexpr_in_const_expr);
186
0
    return false;
187
0
  } else {
188
0
    unsigned VL = LHS.getByteOffset();
189
0
    unsigned VR = RHS.getByteOffset();
190
0
    S.Stk.push<BoolT>(BoolT::from(Fn(Compare(VL, VR))));
191
0
    return true;
192
0
  }
193
0
}
194
195
template <>
196
0
inline bool CmpHelperEQ<Pointer>(InterpState &S, CodePtr OpPC, CompareFn Fn) {
197
0
  using BoolT = PrimConv<PT_Bool>::T;
198
0
  const Pointer &RHS = S.Stk.pop<Pointer>();
199
0
  const Pointer &LHS = S.Stk.pop<Pointer>();
200
201
0
  if (LHS.isZero() && RHS.isZero()) {
202
0
    S.Stk.push<BoolT>(BoolT::from(Fn(ComparisonCategoryResult::Equal)));
203
0
    return true;
204
0
  }
205
206
0
  if (!Pointer::hasSameBase(LHS, RHS)) {
207
0
    S.Stk.push<BoolT>(BoolT::from(Fn(ComparisonCategoryResult::Unordered)));
208
0
    return true;
209
0
  } else {
210
0
    unsigned VL = LHS.getByteOffset();
211
0
    unsigned VR = RHS.getByteOffset();
212
0
    S.Stk.push<BoolT>(BoolT::from(Fn(Compare(VL, VR))));
213
0
    return true;
214
0
  }
215
0
}
216
217
template <PrimType Name, class T = typename PrimConv<Name>::T>
218
0
bool EQ(InterpState &S, CodePtr OpPC) {
219
0
  return CmpHelperEQ<T>(S, OpPC, [](ComparisonCategoryResult R) {
220
0
    return R == ComparisonCategoryResult::Equal;
221
0
  });
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
222
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::EQ<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
223
224
template <PrimType Name, class T = typename PrimConv<Name>::T>
225
0
bool NE(InterpState &S, CodePtr OpPC) {
226
0
  return CmpHelperEQ<T>(S, OpPC, [](ComparisonCategoryResult R) {
227
0
    return R != ComparisonCategoryResult::Equal;
228
0
  });
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
229
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::NE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
230
231
template <PrimType Name, class T = typename PrimConv<Name>::T>
232
0
bool LT(InterpState &S, CodePtr OpPC) {
233
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
234
0
    return R == ComparisonCategoryResult::Less;
235
0
  });
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
236
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LT<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
237
238
template <PrimType Name, class T = typename PrimConv<Name>::T>
239
0
bool LE(InterpState &S, CodePtr OpPC) {
240
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
241
0
    return R == ComparisonCategoryResult::Less ||
242
0
           R == ComparisonCategoryResult::Equal;
243
0
  });
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
244
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
245
246
template <PrimType Name, class T = typename PrimConv<Name>::T>
247
0
bool GT(InterpState &S, CodePtr OpPC) {
248
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
249
0
    return R == ComparisonCategoryResult::Greater;
250
0
  });
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
251
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GT<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
252
253
template <PrimType Name, class T = typename PrimConv<Name>::T>
254
0
bool GE(InterpState &S, CodePtr OpPC) {
255
0
  return CmpHelper<T>(S, OpPC, [](ComparisonCategoryResult R) {
256
0
    return R == ComparisonCategoryResult::Greater ||
257
0
           R == ComparisonCategoryResult::Equal;
258
0
  });
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)0, clang::interp::Integral<8u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)1, clang::interp::Integral<8u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)2, clang::interp::Integral<16u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)3, clang::interp::Integral<16u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)5, clang::interp::Integral<32u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)6, clang::interp::Integral<64u, true> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)7, clang::interp::Integral<64u, false> >(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'(clang::ComparisonCategoryResult)::operator()(clang::ComparisonCategoryResult) const
259
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::GE<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
260
261
//===----------------------------------------------------------------------===//
262
// InRange
263
//===----------------------------------------------------------------------===//
264
265
template <PrimType Name, class T = typename PrimConv<Name>::T>
266
bool InRange(InterpState &S, CodePtr OpPC) {
267
  const T RHS = S.Stk.pop<T>();
268
  const T LHS = S.Stk.pop<T>();
269
  const T Value = S.Stk.pop<T>();
270
271
  S.Stk.push<bool>(LHS <= Value && Value <= RHS);
272
  return true;
273
}
274
275
//===----------------------------------------------------------------------===//
276
// Dup, Pop, Test
277
//===----------------------------------------------------------------------===//
278
279
template <PrimType Name, class T = typename PrimConv<Name>::T>
280
0
bool Dup(InterpState &S, CodePtr OpPC) {
281
0
  S.Stk.push<T>(S.Stk.peek<T>());
282
0
  return true;
283
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Dup<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
284
285
template <PrimType Name, class T = typename PrimConv<Name>::T>
286
0
bool Pop(InterpState &S, CodePtr OpPC) {
287
0
  S.Stk.pop<T>();
288
0
  return true;
289
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Pop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
290
291
//===----------------------------------------------------------------------===//
292
// Const
293
//===----------------------------------------------------------------------===//
294
295
template <PrimType Name, class T = typename PrimConv<Name>::T>
296
0
bool Const(InterpState &S, CodePtr OpPC, const T &Arg) {
297
0
  S.Stk.push<T>(Arg);
298
0
  return true;
299
0
}
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)8, bool>(clang::interp::InterpState&, clang::interp::CodePtr, bool 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 long>(clang::interp::InterpState&, clang::interp::CodePtr, long long 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)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 long>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned long long const&)
Unexecuted instantiation: bool clang::interp::Const<(clang::interp::PrimType)1, unsigned char>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned char const&)
300
301
//===----------------------------------------------------------------------===//
302
// Get/Set Local/Param/Global/This
303
//===----------------------------------------------------------------------===//
304
305
template <PrimType Name, class T = typename PrimConv<Name>::T>
306
0
bool GetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
307
0
  S.Stk.push<T>(S.Current->getLocal<T>(I));
308
0
  return true;
309
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetLocal<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
310
311
template <PrimType Name, class T = typename PrimConv<Name>::T>
312
0
bool SetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
313
0
  S.Current->setLocal<T>(I, S.Stk.pop<T>());
314
0
  return true;
315
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetLocal<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
316
317
template <PrimType Name, class T = typename PrimConv<Name>::T>
318
1
bool GetParam(InterpState &S, CodePtr OpPC, uint32_t I) {
319
1
  if (S.checkingPotentialConstantExpression()) {
320
1
    return false;
321
1
  }
322
0
  S.Stk.push<T>(S.Current->getParam<T>(I));
323
0
  return true;
324
1
}
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)
bool clang::interp::GetParam<(clang::interp::PrimType)4, clang::interp::Integral<32u, true> >(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Line
Count
Source
318
1
bool GetParam(InterpState &S, CodePtr OpPC, uint32_t I) {
319
1
  if (S.checkingPotentialConstantExpression()) {
320
1
    return false;
321
1
  }
322
0
  S.Stk.push<T>(S.Current->getParam<T>(I));
323
0
  return true;
324
1
}
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetParam<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
325
326
template <PrimType Name, class T = typename PrimConv<Name>::T>
327
0
bool SetParam(InterpState &S, CodePtr OpPC, uint32_t I) {
328
0
  S.Current->setParam<T>(I, S.Stk.pop<T>());
329
0
  return true;
330
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetParam<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
331
332
template <PrimType Name, class T = typename PrimConv<Name>::T>
333
0
bool GetField(InterpState &S, CodePtr OpPC, uint32_t I) {
334
0
  const Pointer &Obj = S.Stk.peek<Pointer>();
335
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
336
0
      return false;
337
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
338
0
    return false;
339
0
  const Pointer &Field = Obj.atField(I);
340
0
  if (!CheckLoad(S, OpPC, Field))
341
0
    return false;
342
0
  S.Stk.push<T>(Field.deref<T>());
343
0
  return true;
344
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
345
346
template <PrimType Name, class T = typename PrimConv<Name>::T>
347
0
bool SetField(InterpState &S, CodePtr OpPC, uint32_t I) {
348
0
  const T &Value = S.Stk.pop<T>();
349
0
  const Pointer &Obj = S.Stk.peek<Pointer>();
350
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
351
0
    return false;
352
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
353
0
    return false;
354
0
  const Pointer &Field = Obj.atField(I);
355
0
  if (!CheckStore(S, OpPC, Field))
356
0
    return false;
357
0
  Field.deref<T>() = Value;
358
0
  return true;
359
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
360
361
template <PrimType Name, class T = typename PrimConv<Name>::T>
362
0
bool GetFieldPop(InterpState &S, CodePtr OpPC, uint32_t I) {
363
0
  const Pointer &Obj = S.Stk.pop<Pointer>();
364
0
  if (!CheckNull(S, OpPC, Obj, CSK_Field))
365
0
    return false;
366
0
  if (!CheckRange(S, OpPC, Obj, CSK_Field))
367
0
    return false;
368
0
  const Pointer &Field = Obj.atField(I);
369
0
  if (!CheckLoad(S, OpPC, Field))
370
0
    return false;
371
0
  S.Stk.push<T>(Field.deref<T>());
372
0
  return true;
373
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetFieldPop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
374
375
template <PrimType Name, class T = typename PrimConv<Name>::T>
376
0
bool GetThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
377
0
  if (S.checkingPotentialConstantExpression())
378
0
    return false;
379
0
  const Pointer &This = S.Current->getThis();
380
0
  if (!CheckThis(S, OpPC, This))
381
0
    return false;
382
0
  const Pointer &Field = This.atField(I);
383
0
  if (!CheckLoad(S, OpPC, Field))
384
0
    return false;
385
0
  S.Stk.push<T>(Field.deref<T>());
386
0
  return true;
387
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetThisField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
388
389
template <PrimType Name, class T = typename PrimConv<Name>::T>
390
0
bool SetThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
391
0
  if (S.checkingPotentialConstantExpression())
392
0
    return false;
393
0
  const T &Value = S.Stk.pop<T>();
394
0
  const Pointer &This = S.Current->getThis();
395
0
  if (!CheckThis(S, OpPC, This))
396
0
    return false;
397
0
  const Pointer &Field = This.atField(I);
398
0
  if (!CheckStore(S, OpPC, Field))
399
0
    return false;
400
0
  Field.deref<T>() = Value;
401
0
  return true;
402
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetThisField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
403
404
template <PrimType Name, class T = typename PrimConv<Name>::T>
405
0
bool GetGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
406
0
  auto *B = S.P.getGlobal(I);
407
0
  if (B->isExtern())
408
0
    return false;
409
0
  S.Stk.push<T>(B->deref<T>());
410
0
  return true;
411
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::GetGlobal<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
412
413
template <PrimType Name, class T = typename PrimConv<Name>::T>
414
0
bool SetGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
415
  // TODO: emit warning.
416
0
  return false;
417
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::SetGlobal<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
418
419
template <PrimType Name, class T = typename PrimConv<Name>::T>
420
0
bool InitGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
421
0
  S.P.getGlobal(I)->deref<T>() = S.Stk.pop<T>();
422
0
  return true;
423
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitGlobal<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
424
425
template <PrimType Name, class T = typename PrimConv<Name>::T>
426
0
bool InitThisField(InterpState &S, CodePtr OpPC, uint32_t I) {
427
0
  if (S.checkingPotentialConstantExpression())
428
0
    return false;
429
0
  const Pointer &This = S.Current->getThis();
430
0
  if (!CheckThis(S, OpPC, This))
431
0
    return false;
432
0
  const Pointer &Field = This.atField(I);
433
0
  Field.deref<T>() = S.Stk.pop<T>();
434
0
  Field.initialize();
435
0
  return true;
436
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
437
438
template <PrimType Name, class T = typename PrimConv<Name>::T>
439
0
bool InitThisBitField(InterpState &S, CodePtr OpPC, const Record::Field *F) {
440
0
  if (S.checkingPotentialConstantExpression())
441
0
    return false;
442
0
  const Pointer &This = S.Current->getThis();
443
0
  if (!CheckThis(S, OpPC, This))
444
0
    return false;
445
0
  const Pointer &Field = This.atField(F->Offset);
446
0
  const auto &Value = S.Stk.pop<T>();
447
0
  Field.deref<T>() = Value.truncate(F->Decl->getBitWidthValue(S.getCtx()));
448
0
  Field.initialize();
449
0
  return true;
450
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
451
452
template <PrimType Name, class T = typename PrimConv<Name>::T>
453
0
bool InitThisFieldActive(InterpState &S, CodePtr OpPC, uint32_t I) {
454
0
  if (S.checkingPotentialConstantExpression())
455
0
    return false;
456
0
  const Pointer &This = S.Current->getThis();
457
0
  if (!CheckThis(S, OpPC, This))
458
0
    return false;
459
0
  const Pointer &Field = This.atField(I);
460
0
  Field.deref<T>() = S.Stk.pop<T>();
461
0
  Field.activate();
462
0
  Field.initialize();
463
0
  return true;
464
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitThisFieldActive<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
465
466
template <PrimType Name, class T = typename PrimConv<Name>::T>
467
0
bool InitField(InterpState &S, CodePtr OpPC, uint32_t I) {
468
0
  const T &Value = S.Stk.pop<T>();
469
0
  const Pointer &Field = S.Stk.pop<Pointer>().atField(I);
470
0
  Field.deref<T>() = Value;
471
0
  Field.activate();
472
0
  Field.initialize();
473
0
  return true;
474
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitField<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
475
476
template <PrimType Name, class T = typename PrimConv<Name>::T>
477
0
bool InitBitField(InterpState &S, CodePtr OpPC, const Record::Field *F) {
478
0
  const T &Value = S.Stk.pop<T>();
479
0
  const Pointer &Field = S.Stk.pop<Pointer>().atField(F->Offset);
480
0
  Field.deref<T>() = Value.truncate(F->Decl->getBitWidthValue(S.getCtx()));
481
0
  Field.activate();
482
0
  Field.initialize();
483
0
  return true;
484
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, clang::interp::Record::Field const*)
485
486
template <PrimType Name, class T = typename PrimConv<Name>::T>
487
0
bool InitFieldActive(InterpState &S, CodePtr OpPC, uint32_t I) {
488
0
  const T &Value = S.Stk.pop<T>();
489
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
490
0
  const Pointer &Field = Ptr.atField(I);
491
0
  Field.deref<T>() = Value;
492
0
  Field.activate();
493
0
  Field.initialize();
494
0
  return true;
495
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitFieldActive<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
496
497
//===----------------------------------------------------------------------===//
498
// GetPtr Local/Param/Global/Field/This
499
//===----------------------------------------------------------------------===//
500
501
0
inline bool GetPtrLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
502
0
  S.Stk.push<Pointer>(S.Current->getLocalPointer(I));
503
0
  return true;
504
0
}
505
506
0
inline bool GetPtrParam(InterpState &S, CodePtr OpPC, uint32_t I) {
507
0
  if (S.checkingPotentialConstantExpression()) {
508
0
    return false;
509
0
  }
510
0
  S.Stk.push<Pointer>(S.Current->getParamPointer(I));
511
0
  return true;
512
0
}
513
514
0
inline bool GetPtrGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
515
0
  S.Stk.push<Pointer>(S.P.getPtrGlobal(I));
516
0
  return true;
517
0
}
518
519
0
inline bool GetPtrField(InterpState &S, CodePtr OpPC, uint32_t Off) {
520
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
521
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Field))
522
0
    return false;
523
0
  if (!CheckExtern(S, OpPC, Ptr))
524
0
    return false;
525
0
  if (!CheckRange(S, OpPC, Ptr, CSK_Field))
526
0
    return false;
527
0
  S.Stk.push<Pointer>(Ptr.atField(Off));
528
0
  return true;
529
0
}
530
531
0
inline bool GetPtrThisField(InterpState &S, CodePtr OpPC, uint32_t Off) {
532
0
  if (S.checkingPotentialConstantExpression())
533
0
    return false;
534
0
  const Pointer &This = S.Current->getThis();
535
0
  if (!CheckThis(S, OpPC, This))
536
0
    return false;
537
0
  S.Stk.push<Pointer>(This.atField(Off));
538
0
  return true;
539
0
}
540
541
0
inline bool GetPtrActiveField(InterpState &S, CodePtr OpPC, uint32_t Off) {
542
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
543
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Field))
544
0
    return false;
545
0
  if (!CheckRange(S, OpPC, Ptr, CSK_Field))
546
0
    return false;
547
0
  Pointer Field = Ptr.atField(Off);
548
0
  Ptr.deactivate();
549
0
  Field.activate();
550
0
  S.Stk.push<Pointer>(std::move(Field));
551
0
  return true;
552
0
}
553
554
0
inline bool GetPtrActiveThisField(InterpState &S, CodePtr OpPC, uint32_t Off) {
555
0
 if (S.checkingPotentialConstantExpression())
556
0
    return false;
557
0
  const Pointer &This = S.Current->getThis();
558
0
  if (!CheckThis(S, OpPC, This))
559
0
    return false;
560
0
  Pointer Field = This.atField(Off);
561
0
  This.deactivate();
562
0
  Field.activate();
563
0
  S.Stk.push<Pointer>(std::move(Field));
564
0
  return true;
565
0
}
566
567
0
inline bool GetPtrBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
568
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
569
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Base))
570
0
    return false;
571
0
  S.Stk.push<Pointer>(Ptr.atField(Off));
572
0
  return true;
573
0
}
574
575
0
inline bool GetPtrThisBase(InterpState &S, CodePtr OpPC, uint32_t Off) {
576
0
  if (S.checkingPotentialConstantExpression())
577
0
    return false;
578
0
  const Pointer &This = S.Current->getThis();
579
0
  if (!CheckThis(S, OpPC, This))
580
0
    return false;
581
0
  S.Stk.push<Pointer>(This.atField(Off));
582
0
  return true;
583
0
}
584
585
inline bool VirtBaseHelper(InterpState &S, CodePtr OpPC, const RecordDecl *Decl,
586
0
                           const Pointer &Ptr) {
587
0
  Pointer Base = Ptr;
588
0
  while (Base.isBaseClass())
589
0
    Base = Base.getBase();
590
591
0
  auto *Field = Base.getRecord()->getVirtualBase(Decl);
592
0
  S.Stk.push<Pointer>(Base.atField(Field->Offset));
593
0
  return true;
594
0
}
595
596
0
inline bool GetPtrVirtBase(InterpState &S, CodePtr OpPC, const RecordDecl *D) {
597
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
598
0
  if (!CheckNull(S, OpPC, Ptr, CSK_Base))
599
0
    return false;
600
0
  return VirtBaseHelper(S, OpPC, D, Ptr);
601
0
}
602
603
inline bool GetPtrThisVirtBase(InterpState &S, CodePtr OpPC,
604
0
                               const RecordDecl *D) {
605
0
  if (S.checkingPotentialConstantExpression())
606
0
    return false;
607
0
  const Pointer &This = S.Current->getThis();
608
0
  if (!CheckThis(S, OpPC, This))
609
0
    return false;
610
0
  return VirtBaseHelper(S, OpPC, D, S.Current->getThis());
611
0
}
612
613
//===----------------------------------------------------------------------===//
614
// Load, Store, Init
615
//===----------------------------------------------------------------------===//
616
617
template <PrimType Name, class T = typename PrimConv<Name>::T>
618
0
bool Load(InterpState &S, CodePtr OpPC) {
619
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
620
0
  if (!CheckLoad(S, OpPC, Ptr))
621
0
    return false;
622
0
  S.Stk.push<T>(Ptr.deref<T>());
623
0
  return true;
624
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Load<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
625
626
template <PrimType Name, class T = typename PrimConv<Name>::T>
627
0
bool LoadPop(InterpState &S, CodePtr OpPC) {
628
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
629
0
  if (!CheckLoad(S, OpPC, Ptr))
630
0
    return false;
631
0
  S.Stk.push<T>(Ptr.deref<T>());
632
0
  return true;
633
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::LoadPop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
634
635
template <PrimType Name, class T = typename PrimConv<Name>::T>
636
0
bool Store(InterpState &S, CodePtr OpPC) {
637
0
  const T &Value = S.Stk.pop<T>();
638
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
639
0
  if (!CheckStore(S, OpPC, Ptr))
640
0
    return false;
641
0
  Ptr.deref<T>() = Value;
642
0
  return true;
643
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::Store<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
644
645
template <PrimType Name, class T = typename PrimConv<Name>::T>
646
0
bool StorePop(InterpState &S, CodePtr OpPC) {
647
0
  const T &Value = S.Stk.pop<T>();
648
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
649
0
  if (!CheckStore(S, OpPC, Ptr))
650
0
    return false;
651
0
  Ptr.deref<T>() = Value;
652
0
  return true;
653
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::StorePop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
654
655
template <PrimType Name, class T = typename PrimConv<Name>::T>
656
0
bool StoreBitField(InterpState &S, CodePtr OpPC) {
657
0
  const T &Value = S.Stk.pop<T>();
658
0
  const Pointer &Ptr = S.Stk.peek<Pointer>();
659
0
  if (!CheckStore(S, OpPC, Ptr))
660
0
    return false;
661
0
  if (auto *FD = Ptr.getField()) {
662
0
    Ptr.deref<T>() = Value.truncate(FD->getBitWidthValue(S.getCtx()));
663
0
  } else {
664
0
    Ptr.deref<T>() = Value;
665
0
  }
666
0
  return true;
667
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
668
669
template <PrimType Name, class T = typename PrimConv<Name>::T>
670
0
bool StoreBitFieldPop(InterpState &S, CodePtr OpPC) {
671
0
  const T &Value = S.Stk.pop<T>();
672
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
673
0
  if (!CheckStore(S, OpPC, Ptr))
674
0
    return false;
675
0
  if (auto *FD = Ptr.getField()) {
676
0
    Ptr.deref<T>() = Value.truncate(FD->getBitWidthValue(S.getCtx()));
677
0
  } else {
678
0
    Ptr.deref<T>() = Value;
679
0
  }
680
0
  return true;
681
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
682
683
template <PrimType Name, class T = typename PrimConv<Name>::T>
684
0
bool InitPop(InterpState &S, CodePtr OpPC) {
685
0
  const T &Value = S.Stk.pop<T>();
686
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
687
0
  if (!CheckInit(S, OpPC, Ptr))
688
0
    return false;
689
0
  Ptr.initialize();
690
0
  new (&Ptr.deref<T>()) T(Value);
691
0
  return true;
692
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::InitPop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr)
693
694
template <PrimType Name, class T = typename PrimConv<Name>::T>
695
0
bool InitElem(InterpState &S, CodePtr OpPC, uint32_t Idx) {
696
0
  const T &Value = S.Stk.pop<T>();
697
0
  const Pointer &Ptr = S.Stk.peek<Pointer>().atIndex(Idx);
698
0
  if (!CheckInit(S, OpPC, Ptr))
699
0
    return false;
700
0
  Ptr.initialize();
701
0
  new (&Ptr.deref<T>()) T(Value);
702
0
  return true;
703
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElem<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
704
705
template <PrimType Name, class T = typename PrimConv<Name>::T>
706
0
bool InitElemPop(InterpState &S, CodePtr OpPC, uint32_t Idx) {
707
0
  const T &Value = S.Stk.pop<T>();
708
0
  const Pointer &Ptr = S.Stk.pop<Pointer>().atIndex(Idx);
709
0
  if (!CheckInit(S, OpPC, Ptr))
710
0
    return false;
711
0
  Ptr.initialize();
712
0
  new (&Ptr.deref<T>()) T(Value);
713
0
  return true;
714
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
Unexecuted instantiation: bool clang::interp::InitElemPop<(clang::interp::PrimType)9, clang::interp::Pointer>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int)
715
716
//===----------------------------------------------------------------------===//
717
// AddOffset, SubOffset
718
//===----------------------------------------------------------------------===//
719
720
0
template <class T, bool Add> bool OffsetHelper(InterpState &S, CodePtr OpPC) {
721
  // Fetch the pointer and the offset.
722
0
  const T &Offset = S.Stk.pop<T>();
723
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
724
0
  if (!CheckNull(S, OpPC, Ptr, CSK_ArrayIndex))
725
0
    return false;
726
0
  if (!CheckRange(S, OpPC, Ptr, CSK_ArrayToPointer))
727
0
    return false;
728
729
  // Get a version of the index comparable to the type.
730
0
  T Index = T::from(Ptr.getIndex(), Offset.bitWidth());
731
  // A zero offset does not change the pointer, but in the case of an array
732
  // it has to be adjusted to point to the first element instead of the array.
733
0
  if (Offset.isZero()) {
734
0
    S.Stk.push<Pointer>(Index.isZero() ? Ptr.atIndex(0) : Ptr);
735
0
    return true;
736
0
  }
737
  // Arrays of unknown bounds cannot have pointers into them.
738
0
  if (!CheckArray(S, OpPC, Ptr))
739
0
    return false;
740
741
  // Compute the largest index into the array.
742
0
  unsigned MaxIndex = Ptr.getNumElems();
743
744
  // Helper to report an invalid offset, computed as APSInt.
745
0
  auto InvalidOffset = [&]() {
746
0
    const unsigned Bits = Offset.bitWidth();
747
0
    APSInt APOffset(Offset.toAPSInt().extend(Bits + 2), false);
748
0
    APSInt APIndex(Index.toAPSInt().extend(Bits + 2), false);
749
0
    APSInt NewIndex = Add ? (APIndex + APOffset) : (APIndex - APOffset);
750
0
    S.CCEDiag(S.Current->getSource(OpPC), diag::note_constexpr_array_index)
751
0
        << NewIndex
752
0
        << /*array*/ static_cast<int>(!Ptr.inArray())
753
0
        << static_cast<unsigned>(MaxIndex);
754
0
    return false;
755
0
  };
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, true>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, false>(clang::interp::InterpState&, clang::interp::CodePtr)::'lambda'()::operator()() const
756
757
  // If the new offset would be negative, bail out.
758
0
  if (Add && Offset.isNegative() && (Offset.isMin() || -Offset > Index))
759
0
    return InvalidOffset();
760
0
  if (!Add && Offset.isPositive() && Index < Offset)
761
0
    return InvalidOffset();
762
763
  // If the new offset would be out of bounds, bail out.
764
0
  unsigned MaxOffset = MaxIndex - Ptr.getIndex();
765
0
  if (Add && Offset.isPositive() && Offset > MaxOffset)
766
0
    return InvalidOffset();
767
0
  if (!Add && Offset.isNegative() && (Offset.isMin() || -Offset > MaxOffset))
768
0
    return InvalidOffset();
769
770
  // Offset is valid - compute it on unsigned.
771
0
  int64_t WideIndex = static_cast<int64_t>(Index);
772
0
  int64_t WideOffset = static_cast<int64_t>(Offset);
773
0
  int64_t Result = Add ? (WideIndex + WideOffset) : (WideIndex - WideOffset);
774
0
  S.Stk.push<Pointer>(Ptr.atIndex(static_cast<unsigned>(Result)));
775
0
  return true;
776
0
}
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, true>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<8u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<16u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<32u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, true>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Integral<64u, false>, false>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: bool clang::interp::OffsetHelper<clang::interp::Boolean, false>(clang::interp::InterpState&, clang::interp::CodePtr)
777
778
template <PrimType Name, class T = typename PrimConv<Name>::T>
779
0
bool AddOffset(InterpState &S, CodePtr OpPC) {
780
0
  return OffsetHelper<T, true>(S, OpPC);
781
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
782
783
template <PrimType Name, class T = typename PrimConv<Name>::T>
784
0
bool SubOffset(InterpState &S, CodePtr OpPC) {
785
0
  return OffsetHelper<T, false>(S, OpPC);
786
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::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
787
788
789
//===----------------------------------------------------------------------===//
790
// Destroy
791
//===----------------------------------------------------------------------===//
792
793
0
inline bool Destroy(InterpState &S, CodePtr OpPC, uint32_t I) {
794
0
  S.Current->destroy(I);
795
0
  return true;
796
0
}
797
798
//===----------------------------------------------------------------------===//
799
// Cast, CastFP
800
//===----------------------------------------------------------------------===//
801
802
template <PrimType TIn, PrimType TOut> bool Cast(InterpState &S, CodePtr OpPC) {
803
  using T = typename PrimConv<TIn>::T;
804
  using U = typename PrimConv<TOut>::T;
805
  S.Stk.push<U>(U::from(S.Stk.pop<T>()));
806
  return true;
807
}
808
809
//===----------------------------------------------------------------------===//
810
// Zero, Nullptr
811
//===----------------------------------------------------------------------===//
812
813
template <PrimType Name, class T = typename PrimConv<Name>::T>
814
0
bool Zero(InterpState &S, CodePtr OpPC) {
815
0
  S.Stk.push<T>(T::zero());
816
0
  return true;
817
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)8, clang::interp::Boolean>(clang::interp::InterpState&, clang::interp::CodePtr)
818
819
template <PrimType Name, class T = typename PrimConv<Name>::T>
820
0
inline bool Null(InterpState &S, CodePtr OpPC) {
821
0
  S.Stk.push<T>();
822
0
  return true;
823
0
}
824
825
//===----------------------------------------------------------------------===//
826
// This, ImplicitThis
827
//===----------------------------------------------------------------------===//
828
829
0
inline bool This(InterpState &S, CodePtr OpPC) {
830
  // Cannot read 'this' in this mode.
831
0
  if (S.checkingPotentialConstantExpression()) {
832
0
    return false;
833
0
  }
834
835
0
  const Pointer &This = S.Current->getThis();
836
0
  if (!CheckThis(S, OpPC, This))
837
0
    return false;
838
839
0
  S.Stk.push<Pointer>(This);
840
0
  return true;
841
0
}
842
843
//===----------------------------------------------------------------------===//
844
// Shr, Shl
845
//===----------------------------------------------------------------------===//
846
847
template <PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>
848
unsigned Trunc(InterpState &S, CodePtr OpPC, unsigned Bits, const T &V) {
849
  // C++11 [expr.shift]p1: Shift width must be less than the bit width of
850
  // the shifted type.
851
  if (Bits > 1 && V >= T::from(Bits, V.bitWidth())) {
852
    const Expr *E = S.Current->getExpr(OpPC);
853
    const APSInt Val = V.toAPSInt();
854
    QualType Ty = E->getType();
855
    S.CCEDiag(E, diag::note_constexpr_large_shift) << Val << Ty << Bits;
856
    return Bits;
857
  } else {
858
    return static_cast<unsigned>(V);
859
  }
860
}
861
862
template <PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
863
inline bool ShiftRight(InterpState &S, CodePtr OpPC, const T &V, unsigned RHS) {
864
  if (RHS >= V.bitWidth()) {
865
    S.Stk.push<T>(T::from(0, V.bitWidth()));
866
  } else {
867
    S.Stk.push<T>(T::from(V >> RHS, V.bitWidth()));
868
  }
869
  return true;
870
}
871
872
template <PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
873
inline bool ShiftLeft(InterpState &S, CodePtr OpPC, const T &V, unsigned RHS) {
874
  if (V.isSigned() && !S.getLangOpts().CPlusPlus20) {
875
    // C++11 [expr.shift]p2: A signed left shift must have a non-negative
876
    // operand, and must not overflow the corresponding unsigned type.
877
    // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to
878
    // E1 x 2^E2 module 2^N.
879
    if (V.isNegative()) {
880
      const Expr *E = S.Current->getExpr(OpPC);
881
      S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << V.toAPSInt();
882
    } else if (V.countLeadingZeros() < RHS) {
883
      S.CCEDiag(S.Current->getExpr(OpPC), diag::note_constexpr_lshift_discards);
884
    }
885
  }
886
887
  if (V.bitWidth() == 1) {
888
    S.Stk.push<T>(V);
889
  } else if (RHS >= V.bitWidth()) {
890
    S.Stk.push<T>(T::from(0, V.bitWidth()));
891
  } else {
892
    S.Stk.push<T>(T::from(V.toUnsigned() << RHS, V.bitWidth()));
893
  }
894
  return true;
895
}
896
897
template <PrimType TL, PrimType TR>
898
inline bool Shr(InterpState &S, CodePtr OpPC) {
899
  const auto &RHS = S.Stk.pop<typename PrimConv<TR>::T>();
900
  const auto &LHS = S.Stk.pop<typename PrimConv<TL>::T>();
901
  const unsigned Bits = LHS.bitWidth();
902
903
  if (RHS.isSigned() && RHS.isNegative()) {
904
    const SourceInfo &Loc = S.Current->getSource(OpPC);
905
    S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
906
    return ShiftLeft<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, -RHS));
907
  } else {
908
    return ShiftRight<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, RHS));
909
  }
910
}
911
912
template <PrimType TL, PrimType TR>
913
inline bool Shl(InterpState &S, CodePtr OpPC) {
914
  const auto &RHS = S.Stk.pop<typename PrimConv<TR>::T>();
915
  const auto &LHS = S.Stk.pop<typename PrimConv<TL>::T>();
916
  const unsigned Bits = LHS.bitWidth();
917
918
  if (RHS.isSigned() && RHS.isNegative()) {
919
    const SourceInfo &Loc = S.Current->getSource(OpPC);
920
    S.CCEDiag(Loc, diag::note_constexpr_negative_shift) << RHS.toAPSInt();
921
    return ShiftRight<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, -RHS));
922
  } else {
923
    return ShiftLeft<TL, TR>(S, OpPC, LHS, Trunc<TR, TL>(S, OpPC, Bits, RHS));
924
  }
925
}
926
927
//===----------------------------------------------------------------------===//
928
// NoRet
929
//===----------------------------------------------------------------------===//
930
931
0
inline bool NoRet(InterpState &S, CodePtr OpPC) {
932
0
  SourceLocation EndLoc = S.Current->getCallee()->getEndLoc();
933
0
  S.FFDiag(EndLoc, diag::note_constexpr_no_return);
934
0
  return false;
935
0
}
936
937
//===----------------------------------------------------------------------===//
938
// NarrowPtr, ExpandPtr
939
//===----------------------------------------------------------------------===//
940
941
0
inline bool NarrowPtr(InterpState &S, CodePtr OpPC) {
942
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
943
0
  S.Stk.push<Pointer>(Ptr.narrow());
944
0
  return true;
945
0
}
946
947
0
inline bool ExpandPtr(InterpState &S, CodePtr OpPC) {
948
0
  const Pointer &Ptr = S.Stk.pop<Pointer>();
949
0
  S.Stk.push<Pointer>(Ptr.expand());
950
0
  return true;
951
0
}
952
953
//===----------------------------------------------------------------------===//
954
// Read opcode arguments
955
//===----------------------------------------------------------------------===//
956
957
template <typename T>
958
inline std::enable_if_t<!std::is_pointer<T>::value, T> ReadArg(InterpState &S,
959
1
                                                               CodePtr OpPC) {
960
1
  return OpPC.read<T>();
961
1
}
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<bool>::value), bool>::type clang::interp::ReadArg<bool>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<short>::value), short>::type clang::interp::ReadArg<short>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<int>::value), int>::type clang::interp::ReadArg<int>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<long long>::value), long long>::type clang::interp::ReadArg<long long>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<signed char>::value), signed char>::type clang::interp::ReadArg<signed char>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<unsigned short>::value), unsigned short>::type clang::interp::ReadArg<unsigned short>(clang::interp::InterpState&, clang::interp::CodePtr)
std::__1::enable_if<!(std::is_pointer<unsigned int>::value), unsigned int>::type clang::interp::ReadArg<unsigned int>(clang::interp::InterpState&, clang::interp::CodePtr)
Line
Count
Source
959
1
                                                               CodePtr OpPC) {
960
1
  return OpPC.read<T>();
961
1
}
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<unsigned long long>::value), unsigned long long>::type clang::interp::ReadArg<unsigned long long>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<!(std::is_pointer<unsigned char>::value), unsigned char>::type clang::interp::ReadArg<unsigned char>(clang::interp::InterpState&, clang::interp::CodePtr)
962
963
template <typename T>
964
inline std::enable_if_t<std::is_pointer<T>::value, T> ReadArg(InterpState &S,
965
0
                                                              CodePtr OpPC) {
966
0
  uint32_t ID = OpPC.read<uint32_t>();
967
0
  return reinterpret_cast<T>(S.P.getNativePointer(ID));
968
0
}
Unexecuted instantiation: std::__1::enable_if<std::is_pointer<clang::RecordDecl const*>::value, clang::RecordDecl const*>::type clang::interp::ReadArg<clang::RecordDecl const*>(clang::interp::InterpState&, clang::interp::CodePtr)
Unexecuted instantiation: std::__1::enable_if<std::is_pointer<clang::interp::Record::Field const*>::value, clang::interp::Record::Field const*>::type clang::interp::ReadArg<clang::interp::Record::Field const*>(clang::interp::InterpState&, clang::interp::CodePtr)
969
970
/// Interpreter entry point.
971
bool Interpret(InterpState &S, APValue &Result);
972
973
} // namespace interp
974
} // namespace clang
975
976
#endif