clair
clair copied to clipboard
Avoid removal of virtual method calls from call graph when applying method overrides
See #83 . We are currently moving in the other extreme, because there are other schemes that we might be able to remove safely.
Looking at my project, I see the following override relations:
<"cpp+functionSet","cpp+method">,
<"cpp+destructor","cpp+destructor">,
<"cpp+destructor","cpp+functionSpecialization">,
<"cpp+method","cpp+method">,
<"cpp+method","cpp+functionSpecialization">,
<"cpp+functionSpecialization","cpp+destructor">,
<"cpp+functionSpecialization","cpp+method">,
<"cpp+functionSpecialization","cpp+functionSpecialization">,
<"cpp+new","cpp+functionSpecialization">,
<"cpp+new","cpp+constructor">,
<"cpp+new","cpp+functionInstance">,
<"cpp+new","problem">
(left is overwritten by right).
Without too much research, it looks like most of them should stay in the call graph even after expanding it. The first one might be removable (see here, functionSet seems to be an intermediate representation).
@jurgenvinju also pointed out that we might want to look at individual virtual methods and filter out the ones that do not have an implementation.