We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ec9b57 commit f131a83Copy full SHA for f131a83
src/goto-diff/goto_diff_base.cpp
@@ -125,12 +125,9 @@ void goto_difft::convert_function(
125
json_objectt &result,
126
const irep_idt &function_name) const
127
{
128
- const goto_programt &program=
129
- goto_model2.goto_functions.function_map.at(function_name).body;
130
- if(!program.instructions.empty())
131
- {
132
- result["sourceLocation"]=
133
- json(program.instructions.begin()->source_location);
134
- }
+ symbol_tablet::symbolst::const_iterator s_it=
+ goto_model2.symbol_table.symbols.find(function_name);
+ if(s_it!=goto_model2.symbol_table.symbols.end())
+ result["sourceLocation"]=json(s_it->second.location);
135
result["name"]=json_stringt(id2string(function_name));
136
}
0 commit comments