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?= <[email protected]>
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;
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to