From 9b8a24b1696168ff6262cd23de22edf0b8ab3ab3 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Fri, 15 Apr 2022 15:00:09 +0000 Subject: [PATCH] rename_symbolt: renaming in return values should affect the result If users want to check whether any renaming took place, they need to be informed in case that renaming took place in the type of the return value of a code_typet. Only function_name_manglert currently checks this result value, but none of its current use would really result in renaming within a return value. --- src/util/rename_symbol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/rename_symbol.cpp b/src/util/rename_symbol.cpp index 3b161371dcd..a44369fbc34 100644 --- a/src/util/rename_symbol.cpp +++ b/src/util/rename_symbol.cpp @@ -146,7 +146,8 @@ bool rename_symbolt::rename(typet &dest) const else if(dest.id()==ID_code) { code_typet &code_type=to_code_type(dest); - rename(code_type.return_type()); + if(!rename(code_type.return_type())) + result = false; for(auto &p : code_type.parameters()) {