diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-08-15 13:03:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-15 13:03:53 (GMT) |
commit | c4564a6af5e58769d09491eaac3d46f4638784be (patch) | |
tree | 999ba5115017d2b9369484d8a8fd388c3bcbd5ee | |
parent | 369c860a7ef2757e32621e703687f6309371d6e2 (diff) | |
parent | 24a6115110e386d5693adc28e3c2fde18b51199c (diff) | |
download | Doxygen-c4564a6af5e58769d09491eaac3d46f4638784be.zip Doxygen-c4564a6af5e58769d09491eaac3d46f4638784be.tar.gz Doxygen-c4564a6af5e58769d09491eaac3d46f4638784be.tar.bz2 |
Merge pull request #7958 from spdw/fix_void_return_type
Fixes doxygen/doxygen#7760: void return type reported as not documented
-rw-r--r-- | src/memberdef.cpp | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 312e13e..bd7cecf 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -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) { |