clair icon indicating copy to clipboard operation
clair copied to clipboard

Avoid removal of virtual method calls from call graph when applying method overrides

Open linuswagner opened this issue 1 year ago • 0 comments

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.

linuswagner avatar Feb 20 '24 18:02 linuswagner