Skip to content

Commit

Permalink
Self recursive functions did not show a self arrow in the callgraph
Browse files Browse the repository at this point in the history
- Also an extra node could appear in the callgraph when a function declaration
  was document but the function definition was not.
  • Loading branch information
doxygen committed Jun 29, 2021
1 parent 53f2a06 commit ce032dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/code.l
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
(void*)yyextra->currentDefinition,(void*)yyextra->currentMemberDef,yyextra->insideBody));

if (yyextra->currentDefinition && yyextra->currentMemberDef &&
md!=yyextra->currentMemberDef && yyextra->insideBody && yyextra->collectXRefs)
yyextra->insideBody && yyextra->collectXRefs)
{
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
Expand Down Expand Up @@ -3052,7 +3052,7 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
{
// add usage reference
if (yyextra->currentDefinition && yyextra->currentMemberDef &&
/*xmd!=yyextra->currentMemberDef &&*/ yyextra->insideBody && yyextra->collectXRefs)
yyextra->insideBody && yyextra->collectXRefs)
{
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(xmd));
Expand Down
8 changes: 5 additions & 3 deletions src/dotcallgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

static QCString getUniqueId(const MemberDef *md)
{
QCString result = md->getReference()+"$"+
md->getOutputFileBase()+"#"+
md->anchor();
const MemberDef *def = md->memberDefinition();
if (def==0) def = md;
QCString result = def->getReference()+"$"+
def->getOutputFileBase()+"#"+
def->anchor();
return result;
}

Expand Down
3 changes: 1 addition & 2 deletions src/pycode.l
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
//printf("yyextra->currentDefinition=%p yyextra->currentMemberDef=%p\n",
// yyextra->currentDefinition,yyextra->currentMemberDef);

if (yyextra->currentDefinition && yyextra->currentMemberDef &&
md!=yyextra->currentMemberDef && yyextra->collectXRefs)
if (yyextra->currentDefinition && yyextra->currentMemberDef && yyextra->collectXRefs)
{
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
Expand Down

0 comments on commit ce032dd

Please sign in to comment.