Skip to content

Commit

Permalink
Made check for void return more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Aug 31, 2019
1 parent 8a641da commit 361f3e1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/memberdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4201,25 +4201,25 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
m_impl->hasDocumentedReturnType = TRUE;
}
else if ( // see if return type is documented in a function w/o return type
hasReturnCommand &&
(
(returnType.find("void")!=-1 && returnType.find('*')==-1) || // void return type
returnType.find("subroutine")!=-1 || // fortran subroutine
isConstructor() || // a constructor
isDestructor() // or destructor
)
)
hasReturnCommand &&
(
returnType=="void" || // void return type
returnType.find("subroutine")!=-1 || // fortran subroutine
isConstructor() || // a constructor
isDestructor() // or destructor
)
)
{
warn_doc_error(getDefFileName(),getDefLine(),"documented empty return type of %s",
qualifiedName().data());
}
else if ( // see if return needs to documented
m_impl->hasDocumentedReturnType ||
(returnType.find("void")!=-1 && returnType.find('*')==-1) || // void return type
returnType.find("subroutine")!=-1 || // fortran subroutine
isConstructor() || // a constructor
isDestructor() // or destructor
)
m_impl->hasDocumentedReturnType ||
returnType=="void" || // void return type
returnType.find("subroutine")!=-1 || // fortran subroutine
isConstructor() || // a constructor
isDestructor() // or destructor
)
{
m_impl->hasDocumentedReturnType = TRUE;
}
Expand Down

0 comments on commit 361f3e1

Please sign in to comment.