[clang] [clang][bytecode][NFC] Remove unused function (PR #139355)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 22:20:06 PDT 2025
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139355
None
>From a7aba9984f3a01d07d8e90c64bea7d9c9fd328a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Sat, 10 May 2025 07:19:37 +0200
Subject: [PATCH] [clang][bytecode][NFC] Remove unused function
---
clang/lib/AST/ByteCode/Interp.cpp | 9 ---------
clang/lib/AST/ByteCode/Interp.h | 3 ---
2 files changed, 12 deletions(-)
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 9c041ad782af9..43f8d156589b6 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -942,15 +942,6 @@ bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This) {
return false;
}
-bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) {
- if (!MD->isPureVirtual())
- return true;
- const SourceInfo &E = S.Current->getSource(OpPC);
- S.FFDiag(E, diag::note_constexpr_pure_virtual_call, 1) << MD;
- S.Note(MD->getLocation(), diag::note_declared_at);
- return false;
-}
-
bool CheckFloatResult(InterpState &S, CodePtr OpPC, const Floating &Result,
APFloat::opStatus Status, FPOptions FPO) {
// [expr.pre]p4:
diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index c89e68a0c27ba..a13fd6c1f1daa 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -114,9 +114,6 @@ bool CheckCallDepth(InterpState &S, CodePtr OpPC);
/// Checks the 'this' pointer.
bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This);
-/// Checks if a method is pure virtual.
-bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD);
-
/// Checks if all the arguments annotated as 'nonnull' are in fact not null.
bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F,
const CallExpr *CE, unsigned ArgSize);
More information about the cfe-commits
mailing list