Skip to content

Commit

Permalink
Fixes #7760: void return type reported as not documented
Browse files Browse the repository at this point in the history
  • Loading branch information
spdw committed Aug 14, 2020
1 parent 047adfb commit 24a6115
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions src/memberdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4051,34 +4051,14 @@ void MemberDefImpl::warnIfUndocumented() const
}
}

static QCString removeReturnTypeKeywords(const QCString &s)
{
QCString result = s;
bool done;
do
{
done=true;
if (result.stripPrefix("constexpr ") ||
result.stripPrefix("consteval ") ||
result.stripPrefix("virtual ") ||
result.stripPrefix("static ") ||
result.stripPrefix("volatile "))
{
done=false;
}
}
while (!done);
return result;
}

void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
{
if (!Config_getBool(WARN_NO_PARAMDOC)) return;
QCString returnType = removeReturnTypeKeywords(typeString());
QCString returnType = typeString();
bool isPython = getLanguage()==SrcLangExt_Python;
bool isFortran = getLanguage()==SrcLangExt_Fortran;
bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
bool isVoidReturn = returnType=="void";
bool isVoidReturn = (returnType=="void") || (returnType.right(5)==" void");

if (!m_impl->hasDocumentedParams && hasParamCommand)
{
Expand Down

0 comments on commit 24a6115

Please sign in to comment.