[clang] [clang][bytecode] Remove unused reportOverflow() (PR #157225)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 5 21:58:04 PDT 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/157225.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/InterpState.cpp (-6)
- (modified) clang/lib/AST/ByteCode/InterpState.h (-3)
``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpState.cpp b/clang/lib/AST/ByteCode/InterpState.cpp
index 6b0e72095dc55..131d84b300953 100644
--- a/clang/lib/AST/ByteCode/InterpState.cpp
+++ b/clang/lib/AST/ByteCode/InterpState.cpp
@@ -73,12 +73,6 @@ void InterpState::cleanup() {
Frame *InterpState::getCurrentFrame() { return Current; }
-bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) {
- QualType Type = E->getType();
- CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;
- return noteUndefinedBehavior();
-}
-
void InterpState::deallocate(Block *B) {
assert(B);
assert(!B->isDynamic());
diff --git a/clang/lib/AST/ByteCode/InterpState.h b/clang/lib/AST/ByteCode/InterpState.h
index e4d1dc64ff01b..e095908bce986 100644
--- a/clang/lib/AST/ByteCode/InterpState.h
+++ b/clang/lib/AST/ByteCode/InterpState.h
@@ -90,9 +90,6 @@ class InterpState final : public State, public SourceMapper {
bool hasPriorDiagnostic() override { return Parent.hasPriorDiagnostic(); }
bool noteSideEffect() override { return Parent.noteSideEffect(); }
- /// Reports overflow and return true if evaluation should continue.
- bool reportOverflow(const Expr *E, const llvm::APSInt &Value);
-
/// Deallocates a pointer.
void deallocate(Block *B);
``````````
</details>
https://github.com/llvm/llvm-project/pull/157225
More information about the cfe-commits
mailing list