Skip to content

Commit

Permalink
Bug 124252 - A function cannot be documented as related to two classes.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
albert-github committed Jun 16, 2018
1 parent 4536982 commit e8661c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/commentscan.l
Expand Up @@ -2544,19 +2544,35 @@ 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;
}

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;
Expand Down

0 comments on commit e8661c3

Please sign in to comment.