Skip to content

Commit

Permalink
issue #10081 [C++] Inherited virtual functions are not listed as bein…
Browse files Browse the repository at this point in the history
…g inherited in child class
  • Loading branch information
doxygen committed May 28, 2023
1 parent 5eb566a commit c58aa9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/classdef.cpp
Expand Up @@ -866,7 +866,7 @@ void ClassDefImpl::internalInsertMember(MemberDef *md,
bool addToAllList
)
{
//printf("insertInternalMember(%s) isHidden()=%d\n",qPrint(md->name()),md->isHidden());
//printf("%s:insertInternalMember(%s) isHidden()=%d\n",qPrint(name()),qPrint(md->name()),md->isHidden());
if (md->isHidden()) return;

if (getLanguage()==SrcLangExt_VHDL)
Expand Down Expand Up @@ -4558,7 +4558,7 @@ void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedCl
void ClassDefImpl::addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const
{
//printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",qPrint(name()),m_impl->memberGroupSDict,qPrint(inheritId));
//printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
for (const auto &mg : m_impl->memberGroups)
{
if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
Expand Down
15 changes: 7 additions & 8 deletions src/memberlist.cpp
Expand Up @@ -105,7 +105,7 @@ int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
count+=mg->countInheritableMembers(inheritedFrom);
}
//printf("%s::countInheritableMembers(%s)=%d\n",
// qPrint(listTypeAsString()),
// qPrint(listTypeAsString(m_listType)),
// qPrint(inheritedFrom->name()),count);
return count;
}
Expand Down Expand Up @@ -348,8 +348,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, bool inGroup,
bool first=TRUE;
for (const auto &md : m_members)
{
//printf(">>> Member '%s' type=%d visible=%d\n",
// qPrint(md->name()),md->memberType(),md->isBriefSectionVisible());
//printf(">>> Member '%s' type=%d visible=%d inheritedFrom=%p\n",
// qPrint(md->name()),md->memberType(),md->isBriefSectionVisible(),(void*)inheritedFrom);
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible())
{
Expand Down Expand Up @@ -515,15 +515,14 @@ void MemberList::writeDeclarations(OutputList &ol,
if (ctx==0 && fd) ctx = fd;

//printf("%p: MemberList::writeDeclaration(title='%s',subtitle='%s')=%d inheritedFrom=%p\n",
// this,title,subtitle,numDecMembers(),inheritedFrom);
// (void*)this,qPrint(title),qPrint(subtitle),numDecMembers(),(void*)inheritedFrom);

int num = numDecMembers();
int numEnumValues = numDecEnumValues();
if (inheritedFrom)
{
//if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
if ( cd && !optimizeVhdl && cd->countMembersIncludingGrouped(
m_listType,inheritedFrom,TRUE)>0 )
int count = cd->countMembersIncludingGrouped(m_listType,inheritedFrom,TRUE);
if ( cd && !optimizeVhdl && count>0 )
{
inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
stripPath(cd->getOutputFileBase());
Expand Down Expand Up @@ -580,7 +579,7 @@ void MemberList::writeDeclarations(OutputList &ol,
}
else
{
writePlainDeclarations(ol,inGroup,cd,nd,fd,gd,0,0,inheritId);
writePlainDeclarations(ol,inGroup,cd,nd,fd,gd,0,inheritedFrom,inheritId);
}

//printf("memberGroupList=%p\n",memberGroupList);
Expand Down

0 comments on commit c58aa9e

Please sign in to comment.