Skip to content

Commit

Permalink
Submit warning when the ingroup command is used with an non-existing …
Browse files Browse the repository at this point in the history
…group name

Submit warning when the ingroup command is used with an non-existing group name
(based on https://stackoverflow.com/questions/77043433/doxygen-warning-for-not-existing-group ; found some problems in CGAL as well).
  • Loading branch information
albert-github committed Sep 6, 2023
1 parent d062df6 commit e075f1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/groupdef.cpp
Expand Up @@ -1529,9 +1529,8 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
for (const Grouping &g : root->groups)
{
GroupDef *gd=0;
if (!g.groupname.isEmpty() &&
(gd=Doxygen::groupLinkedMap->find(g.groupname)) &&
g.pri >= pri)
if (!g.groupname.isEmpty()) gd=Doxygen::groupLinkedMap->find(g.groupname);
if (gd && g.pri >= pri)
{
if (fgd && gd!=fgd && g.pri==pri)
{
Expand All @@ -1546,6 +1545,13 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
fgd = gd;
pri = g.pri;
}
else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
{
warn(root->fileName, root->startLine,
"Found non-existing group '%s' for the command '%s', ignoring command",
qPrint(g.groupname), Grouping::getGroupPriName( g.pri )
);
}
}
//printf("fgd=%p\n",fgd);

Expand Down

0 comments on commit e075f1b

Please sign in to comment.