Add NORETURN warning on functions without return values (#6534).

This commit is contained in:
Wilson Snyder
2025-10-07 21:06:11 -04:00
parent f979e459e8
commit 165622a9e9
43 changed files with 509 additions and 264 deletions
+1
View File
@@ -2554,6 +2554,7 @@ AstFunc* V3Randomize::newRandomizeFunc(VMemberMap& memberMap, AstClass* nodep,
? new AstVar{nodep->fileline(), VVarType::MEMBER, name,
VFlagChildDType{}, dtypep}
: new AstVar{nodep->fileline(), VVarType::MEMBER, name, dtypep};
fvarp->fileline()->warnOff(V3ErrorCode::NORETURN, true);
fvarp->lifetime(VLifetime::AUTOMATIC_EXPLICIT);
fvarp->funcLocal(true);
fvarp->funcReturn(true);