[RFA,2/3] Remove cleanup from ada_collect_symbol_completion_matches
Commit Message
ada_collect_symbol_completion_matches installs a null_cleanup but not
any other cleanups. This patch removes it.
gdb/ChangeLog
2018-05-18 Tom Tromey <tom@tromey.com>
* ada-lang.c (ada_collect_symbol_completion_matches): Remove
cleanup.
---
gdb/ChangeLog | 5 +++++
gdb/ada-lang.c | 3 ---
2 files changed, 5 insertions(+), 3 deletions(-)
Comments
On 2018-05-19 12:06 PM, Tom Tromey wrote:
> ada_collect_symbol_completion_matches installs a null_cleanup but not
> any other cleanups. This patch removes it.
It doesn't seem like any of the called function leaves a dangling cleanup, so LGTM.
Simon
@@ -6445,7 +6445,6 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker,
struct objfile *objfile;
const struct block *b, *surrounding_static_block = 0;
struct block_iterator iter;
- struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
gdb_assert (code == TYPE_CODE_UNDEF);
@@ -6550,8 +6549,6 @@ ada_collect_symbol_completion_matches (completion_tracker &tracker,
lookup_name, text, word);
}
}
-
- do_cleanups (old_chain);
}
/* Field Access */