Skip to content

Commit 58888e8

Browse files
committed
Remove validation of instructiont::function as it is going away
This member is being removed, there is nothing to validate about it.
1 parent e4dfc6c commit 58888e8

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/goto-programs/goto_program.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -680,13 +680,6 @@ void goto_programt::instructiont::validate(
680680
validate_full_code(code, ns, vm);
681681
validate_full_expr(guard, ns, vm);
682682

683-
const symbolt *table_symbol;
684-
DATA_CHECK_WITH_DIAGNOSTICS(
685-
vm,
686-
!ns.lookup(function, table_symbol),
687-
id2string(function) + " not found",
688-
source_location);
689-
690683
auto expr_symbol_finder = [&](const exprt &e) {
691684
find_symbols_sett typetags;
692685
find_type_symbols(e.type(), typetags);
@@ -704,12 +697,13 @@ void goto_programt::instructiont::validate(
704697

705698
auto &current_source_location = source_location;
706699
auto type_finder =
707-
[&ns, vm, &table_symbol, &current_source_location](const exprt &e) {
700+
[&ns, vm, &current_source_location](const exprt &e) {
708701
if(e.id() == ID_symbol)
709702
{
710703
const auto &goto_symbol_expr = to_symbol_expr(e);
711704
const auto &goto_id = goto_symbol_expr.get_identifier();
712705

706+
const symbolt *table_symbol;
713707
if(!ns.lookup(goto_id, table_symbol))
714708
{
715709
bool symbol_expr_type_matches_symbol_table =
@@ -783,6 +777,7 @@ void goto_programt::instructiont::validate(
783777
}
784778
};
785779

780+
const symbolt *table_symbol;
786781
switch(type)
787782
{
788783
case NO_INSTRUCTION_TYPE:

0 commit comments

Comments
 (0)