File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ Author: Peter Schrammel
25
25
#include " goto_functions.h"
26
26
#include " goto_model.h"
27
27
28
+ #include < algorithm>
29
+
28
30
void show_goto_functions (
29
31
const namespacet &ns,
30
32
message_handlert &message_handler,
@@ -51,9 +53,19 @@ void show_goto_functions(
51
53
52
54
case ui_message_handlert::uit::PLAIN:
53
55
{
56
+ // sort alphabetically
57
+ std::vector<std::string> function_ids;
58
+ function_ids.reserve (goto_functions.function_map .size ());
59
+
54
60
for (const auto &fun : goto_functions.function_map )
61
+ function_ids.push_back (id2string (fun.first ));
62
+
63
+ std::sort (function_ids.begin (), function_ids.end ());
64
+
65
+ for (const auto &f_id : function_ids)
55
66
{
56
- const symbolt &symbol = ns.lookup (fun.first );
67
+ const symbolt &symbol = ns.lookup (f_id);
68
+ const auto &fun = *goto_functions.function_map .find (f_id);
57
69
58
70
if (list_only)
59
71
{
You can’t perform that action at this time.
0 commit comments