Skip to content

Commit 9b8a24b

Browse files
committed
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.
1 parent 0c58a89 commit 9b8a24b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/rename_symbol.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ bool rename_symbolt::rename(typet &dest) const
146146
else if(dest.id()==ID_code)
147147
{
148148
code_typet &code_type=to_code_type(dest);
149-
rename(code_type.return_type());
149+
if(!rename(code_type.return_type()))
150+
result = false;
150151

151152
for(auto &p : code_type.parameters())
152153
{

0 commit comments

Comments
 (0)