From 3bc881556ef5aac73294a9306580b27f3f198cd3 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 24 May 2020 16:35:26 +0200 Subject: Better warning for non documented struct In case if a 'struct' we get the message about a 'class', by using the 'compoundTypeString' this can be corrected. (message was originally found in #7304) --- src/memberdef.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index ac7605d..d857fa6 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -4008,16 +4008,13 @@ void MemberDefImpl::warnIfUndocumented() const const FileDef *fd = getFileDef(); const GroupDef *gd = getGroupDef(); const Definition *d=0; - const char *t=0; + QCString t; if (cd) - t="class", d=cd; + t=cd->compoundTypeString(), d=cd; else if (nd) { d=nd; - if (d->getLanguage() == SrcLangExt_Fortran) - t="module"; - else - t="namespace"; + t=nd->compoundTypeString(); } else if (gd) t="group", d=gd; @@ -4036,7 +4033,7 @@ void MemberDefImpl::warnIfUndocumented() const ) { warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.", - qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name())); + qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),qPrint(t),qPrint(d->name())); } else if (!isDetailedSectionLinkable()) { -- cgit v0.12