From ebf0aed5b15160763aa86ea54419588e2dae5a0a Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 19 Aug 2026 02:30:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(cbuiltin):=20translate=5Fc=5Faddr=20?= =?UTF-8?q?=E8=A1=A5=E6=9C=AB=E5=B0=BE=20return=20None=EF=BC=88=E7=9C=9F?= =?UTF-8?q?=E5=AE=9E=E6=8E=89=E5=87=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arg0 非 Name/Attribute/Subscript 时三个分支都不进入 → 流程真实掉出函数末尾,补显式 return None(fail-fast 不允许掉出) --- App/lib/core/Gen/CallGenCBuiltin.vp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/App/lib/core/Gen/CallGenCBuiltin.vp b/App/lib/core/Gen/CallGenCBuiltin.vp index 8ce1c4d..7ccd0a0 100644 --- a/App/lib/core/Gen/CallGenCBuiltin.vp +++ b/App/lib/core/Gen/CallGenCBuiltin.vp @@ -421,6 +421,10 @@ class CallGenCBuiltin(CallGenBase.CallGenBase): pass return None + # 其他 arg0 形式(非 Name/Attribute/Subscript):真实掉出函数末尾, + # 补显式 return None(fail-fast 不允许流程掉出末尾) + return None + def translate_c_load(self, pool: memhub.MemBuddy | t.CPtr, builder: llvmlite.IRBuilder | t.CPtr,