[clang] [clang][bytecode][NFC] Remove unused Integral range functions (PR #169508)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 25 07:52:38 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/169508.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Integral.h (-11)
``````````diff
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>
``````````
</details>
https://github.com/llvm/llvm-project/pull/169508
More information about the cfe-commits
mailing list