[clang] [clang][bytecode][NFC] Use Func->getDecl() instead of getCallee() (PR #220230)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 1 05:04:13 PDT 2026


https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/220230

We already `assert(Func)` above and use `Func` directly in other places in this function, so just get the `FunctionDecl` from that instead of going through the virtual function.

>From 3d1ccf8af979759c6404a20007555e863d661f9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 1 Sep 2026 14:02:02 +0200
Subject: [PATCH] [clang][bytecode][NFC] Use Func->getDecl() instead of
 getCallee()

We already `assert(Func)` above and use `Func` directly in other places
in this function, so just get the `FunctionDecl` from that instead of
going through the virtual function.
---
 clang/lib/AST/ByteCode/InterpFrame.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/AST/ByteCode/InterpFrame.cpp b/clang/lib/AST/ByteCode/InterpFrame.cpp
index 4ec08deeb3279..033e35eee42ad 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.cpp
+++ b/clang/lib/AST/ByteCode/InterpFrame.cpp
@@ -163,7 +163,7 @@ void InterpFrame::describe(llvm::raw_ostream &OS) const {
 
   const ASTContext &ASTCtx = S.getASTContext();
   const Expr *CallExpr = Caller->getExpr(getRetOpPC());
-  const FunctionDecl *F = getCallee();
+  const FunctionDecl *F = Func->getDecl();
   auto PrintingPolicy = ASTCtx.getPrintingPolicy();
   PrintingPolicy.SuppressLambdaBody = true;
 



More information about the cfe-commits mailing list