Skip to content

Commit 738fbde

Browse files
committed
Don't validate Java symbols' base names for now
They use a different pattern to that expected for C programs, and changing that will have some impact. For now let's make validation practically usable without making a change with potentially widespread impact.
1 parent c203ef2 commit 738fbde

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/util/symbol.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ bool symbolt::is_well_formed() const
137137
// Well-formedness criterion number 2 is for a symbol
138138
// to have it's base name as a suffix to it's more
139139
// general name.
140-
if(!has_suffix(id2string(name), id2string(base_name)))
141-
{
140+
// Exception: Java symbols' base names do not have type signatures
141+
// (for example, they can have name "someclass.method:(II)V" and base name
142+
// "method")
143+
if(!has_suffix(id2string(name), id2string(base_name)) && mode != ID_java)
142144
return false;
143-
}
144145

145146
return true;
146147
}

0 commit comments

Comments
 (0)