summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-08-08 19:26:32 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-08-08 19:26:32 (GMT)
commit303f66d5ac2d996b17987365ec61dc19e5915828 (patch)
treeab16e3b354a4ff1a636e6855fd45f3b5c7b10c85 /src/docparser.cpp
parent355370151b61f79633b3867634d76eaf8bacce54 (diff)
parent10989e2dade3bb35a421787c5315d2630d665842 (diff)
downloadDoxygen-303f66d5ac2d996b17987365ec61dc19e5915828.zip
Doxygen-303f66d5ac2d996b17987365ec61dc19e5915828.tar.gz
Doxygen-303f66d5ac2d996b17987365ec61dc19e5915828.tar.bz2
Merge pull request #352 from groleo/diagnostics
docparser: warn when finding a documented empty return type
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 468f862..d1362f0 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -611,7 +611,18 @@ static void detectNoDocumentedParams()
{
g_memberDef->setHasDocumentedReturnType(TRUE);
}
-
+ if ( // see if return type is documented in a function w/o return type
+ g_memberDef->hasDocumentedReturnType() &&
+ (returnType.isEmpty() || // empty return type
+ returnType.find("void")!=-1 || // void return type
+ returnType.find("subroutine")!=-1 || // fortran subroutine
+ g_memberDef->isConstructor() || // a constructor
+ g_memberDef->isDestructor() // or destructor
+ )
+ )
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"documented empty return type");
+ }
}
}