Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions clang/lib/AST/ByteCode/Integral.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ template <unsigned Bits, bool Signed> class Integral final {
return Integral(Value.V);
}

static bool inRange(int64_t Value, unsigned NumBits) {
return CheckRange<ReprT, Min, Max>(Value);
}

static bool increment(Integral A, Integral *R) {
return add(A, Integral(ReprT(1)), A.bitWidth(), R);
}
Expand Down Expand Up @@ -323,13 +319,6 @@ template <unsigned Bits, bool Signed> class Integral final {
return false;
}
}
template <typename T, T Min, T Max> static bool CheckRange(int64_t V) {
if constexpr (std::is_signed_v<T>) {
return Min <= V && V <= Max;
} else {
return V >= 0 && static_cast<uint64_t>(V) <= Max;
}
}
};

template <unsigned Bits, bool Signed>
Expand Down