[clang] [clang][bytecode][NFC] Remove unused Integral range functions (PR #169508)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 25 07:52:03 PST 2025
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/169508
None
>From dcbf7c2ebf88bd08bb947623dc3788ed9bc73db7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 25 Nov 2025 16:51:19 +0100
Subject: [PATCH] [clang][bytecode][NFC] Remove unused Integral range functions
---
clang/lib/AST/ByteCode/Integral.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/clang/lib/AST/ByteCode/Integral.h b/clang/lib/AST/ByteCode/Integral.h
index 131802439f0c5..a0a90f108fdf5 100644
--- a/clang/lib/AST/ByteCode/Integral.h
+++ b/clang/lib/AST/ByteCode/Integral.h
@@ -222,10 +222,6 @@ template <unsigned Bits, bool Signed> class Integral final {
return Integral(Value);
}
- 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);
}
@@ -328,13 +324,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>
More information about the cfe-commits
mailing list