Skip to content

Commit 24a6115

Browse files
committed
Fixes #7760: void return type reported as not documented
1 parent 047adfb commit 24a6115

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

src/memberdef.cpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4051,34 +4051,14 @@ void MemberDefImpl::warnIfUndocumented() const
40514051
}
40524052
}
40534053

4054-
static QCString removeReturnTypeKeywords(const QCString &s)
4055-
{
4056-
QCString result = s;
4057-
bool done;
4058-
do
4059-
{
4060-
done=true;
4061-
if (result.stripPrefix("constexpr ") ||
4062-
result.stripPrefix("consteval ") ||
4063-
result.stripPrefix("virtual ") ||
4064-
result.stripPrefix("static ") ||
4065-
result.stripPrefix("volatile "))
4066-
{
4067-
done=false;
4068-
}
4069-
}
4070-
while (!done);
4071-
return result;
4072-
}
4073-
40744054
void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
40754055
{
40764056
if (!Config_getBool(WARN_NO_PARAMDOC)) return;
4077-
QCString returnType = removeReturnTypeKeywords(typeString());
4057+
QCString returnType = typeString();
40784058
bool isPython = getLanguage()==SrcLangExt_Python;
40794059
bool isFortran = getLanguage()==SrcLangExt_Fortran;
40804060
bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
4081-
bool isVoidReturn = returnType=="void";
4061+
bool isVoidReturn = (returnType=="void") || (returnType.right(5)==" void");
40824062

40834063
if (!m_impl->hasDocumentedParams && hasParamCommand)
40844064
{

0 commit comments

Comments
 (0)