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

`Func` is only null for the bottom frame, which we create using another 
constructor.

>From 19cd6749f6df41f116f48cc5c9538314e91f7a8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Tue, 1 Sep 2026 18:02:07 +0200
Subject: [PATCH] [clang][bytecode][NFC] assert(Func) in InterpFrame ctor

`Func` is only null for the bottom frame, which we create using another
constructor.
---
 clang/lib/AST/ByteCode/InterpFrame.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/AST/ByteCode/InterpFrame.cpp 
b/clang/lib/AST/ByteCode/InterpFrame.cpp
index 033e35eee42ad..b895dee3ae1ec 100644
--- a/clang/lib/AST/ByteCode/InterpFrame.cpp
+++ b/clang/lib/AST/ByteCode/InterpFrame.cpp
@@ -32,13 +32,11 @@ InterpFrame::InterpFrame(InterpState &S, const Function 
*Func,
     : Caller(Caller), S(S), Func(Func), RetPC(RetPC),
       Args(static_cast<char *>(S.Stk.top())), ArgSize(ArgSize),
       Depth(Caller ? Caller->Depth + 1 : 0) {
+  assert(Func);
 #ifndef NDEBUG
   FrameOffset = S.Stk.size();
 #endif
 
-  if (!Func)
-    return;
-
   FuncFlags |= Func->hasRVO() * HasRVOFlag;
   FuncFlags |= Func->hasThisPointer() * HasThisFlag;
 

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

Reply via email to