Skip to content

Commit be30c55

Browse files
committed
issue #11095 Grouping and deriving from a template class leads to "not documented" members.
1 parent 6e59935 commit be30c55

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

src/memberdef.cpp

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
193193
bool isLinkableInProject() const override;
194194
bool isLinkable() const override;
195195
bool hasDocumentation() const override;
196+
bool hasUserDocumentation() const override;
196197
bool isDeleted() const override;
197198
bool isBriefSectionVisible() const override;
198199
bool isDetailedSectionVisible(MemberListContainer container) const override;
@@ -805,6 +806,8 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
805806
{ return getMdAlias()->isLinkable(); }
806807
bool hasDocumentation() const override
807808
{ return getMdAlias()->hasDocumentation(); }
809+
bool hasUserDocumentation() const override
810+
{ return getMdAlias()->hasUserDocumentation(); }
808811
bool isDeleted() const override
809812
{ return getMdAlias()->isDeleted(); }
810813
bool isBriefSectionVisible() const override
@@ -4078,16 +4081,25 @@ void MemberDefImpl::warnIfUndocumented() const
40784081
const Definition *d=nullptr;
40794082
QCString t;
40804083
if (cd)
4081-
t=cd->compoundTypeString(), d=cd;
4084+
{
4085+
t=cd->compoundTypeString();
4086+
d=cd;
4087+
}
40824088
else if (nd)
40834089
{
4084-
d=nd;
40854090
t=nd->compoundTypeString();
4091+
d=nd;
40864092
}
40874093
else if (gd)
4088-
t="group", d=gd;
4094+
{
4095+
t="group";
4096+
d=gd;
4097+
}
40894098
else
4090-
t="file", d=fd;
4099+
{
4100+
t="file";
4101+
d=fd;
4102+
}
40914103
bool extractAll = Config_getBool(EXTRACT_ALL);
40924104

40934105
//printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
@@ -4105,7 +4117,7 @@ void MemberDefImpl::warnIfUndocumented() const
41054117
QCString sep = getLanguageSpecificSeparator(lang,TRUE);
41064118
warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
41074119
qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),qPrint(t),
4108-
qPrint(sep=="::"?d->name():substitute(d->name(),"::",sep)));
4120+
qPrint(substitute(d->name(),"::",sep)));
41094121
}
41104122
else if (!hasDetailedDescription())
41114123
{
@@ -6283,6 +6295,18 @@ QCString MemberDefImpl::documentation() const
62836295
}
62846296
}
62856297

6298+
bool MemberDefImpl::hasUserDocumentation() const
6299+
{
6300+
if (m_templateMaster)
6301+
{
6302+
return m_templateMaster->hasUserDocumentation();
6303+
}
6304+
else
6305+
{
6306+
return DefinitionMixin::hasUserDocumentation();
6307+
}
6308+
}
6309+
62866310
const ArgumentList &MemberDefImpl::typeConstraints() const
62876311
{
62886312
return m_typeConstraints;

0 commit comments

Comments
 (0)