summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-06-16 17:03:58 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-06-16 17:03:58 (GMT)
commite8661c343a4e8ebeaf82b2f926d68167e41be284 (patch)
tree4b8e54483896fbc4b17401faac5ed9e96645794a /src/commentscan.l
parent4536982bdebc0056d0c5d64a12881f20b5801c06 (diff)
downloadDoxygen-e8661c343a4e8ebeaf82b2f926d68167e41be284.zip
Doxygen-e8661c343a4e8ebeaf82b2f926d68167e41be284.tar.gz
Doxygen-e8661c343a4e8ebeaf82b2f926d68167e41be284.tar.bz2
Bug 124252 - A function cannot be documented as related to two classes.
Multiple use in one comment block of \relates or \relatesalso or \memberof or a mixture is silently ignored (only last command is active). In this patch a warning is given and the right relatesType is set (in case of Simple the previous type remained).
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index 55c55a7..5ae20dc 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -2544,12 +2544,23 @@ static bool handleEndParBlock(const QCString &)
static bool handleRelated(const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
+ current->relatesType = Simple;
BEGIN(RelatesParam1);
return FALSE;
}
static bool handleRelatedAlso(const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = Duplicate;
BEGIN(RelatesParam1);
return FALSE;
@@ -2557,6 +2568,11 @@ static bool handleRelatedAlso(const QCString &)
static bool handleMemberOf(const QCString &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = MemberOf;
BEGIN(RelatesParam1);
return FALSE;