We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3afff86 commit b44589eCopy full SHA for b44589e
src/goto-programs/remove_instanceof.cpp
@@ -87,6 +87,14 @@ std::size_t remove_instanceoft::lower_instanceof(
87
std::vector<irep_idt> children=
88
class_hierarchy.get_children_trans(target_name);
89
children.push_back(target_name);
90
+ // Sort alphabetically to make order of generated disjuncts
91
+ // independent of class loading order
92
+ std::sort(
93
+ children.begin(),
94
+ children.end(),
95
+ [](const irep_idt &a, const irep_idt &b) { // NOLINT
96
+ return a.compare(b) < 0;
97
+ });
98
99
// Insert an instruction before the new check that assigns the clsid we're
100
// checking for to a temporary, as GOTO program if-expressions should
0 commit comments