Don't generate C++ wrappers for overridden virtual functions
This is harmless, but also useless, as the implementation is the same as the existing one in the base class anyhow.
This commit is contained in:
parent
aacc930023
commit
4a3ae6f8d3
1 changed files with 5 additions and 0 deletions
|
|
@ -393,6 +393,11 @@ public:
|
|||
if (Getattr(n, "c:inherited_from"))
|
||||
return;
|
||||
|
||||
// And we even don't need to redeclare virtual functions actually overridden in the derived class, as their implementation is the same as in the base class
|
||||
// anyhow, so don't bother generating needless extra code.
|
||||
if (Getattr(n, "override"))
|
||||
return;
|
||||
|
||||
// Also ignore friend function declarations: they appear inside the class, but we shouldn't generate any wrappers for them.
|
||||
if (Checkattr(n, "storage", "friend"))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue