Skip to content

Commit 7d37919

Browse files
committed
issue #10846 Unable to document default argument on friend functions
1 parent 5eac8f7 commit 7d37919

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/doxygen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,7 @@ static void findFriends()
37533753
mmd->name(),mmd->isFriend(),mmd->isRelated(),mmd->isFunction());
37543754
const ArgumentList &mmdAl = mmd->argumentList();
37553755
const ArgumentList &fmdAl = fmd->argumentList();
3756-
mergeArguments(const_cast<ArgumentList&>(mmdAl),const_cast<ArgumentList&>(fmdAl));
3756+
mergeArguments(const_cast<ArgumentList&>(fmdAl),const_cast<ArgumentList&>(mmdAl));
37573757
if (!fmd->documentation().isEmpty())
37583758
{
37593759
mmd->setDocumentation(fmd->documentation(),fmd->docFile(),fmd->docLine());

src/util.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,8 +1997,8 @@ bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,cons
19971997
// pre: the types of the arguments in the list should match.
19981998
void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwrite)
19991999
{
2000-
//printf("mergeArguments '%s', '%s'\n",
2001-
// qPrint(argListToString(srcAl)),qPrint(argListToString(dstAl)));
2000+
AUTO_TRACE("srcAl='{}',dstAl='{}',forceNameOverwrite={}",
2001+
qPrint(argListToString(srcAl)),qPrint(argListToString(dstAl)),forceNameOverwrite);
20022002

20032003
if (srcAl.size()!=dstAl.size())
20042004
{
@@ -2012,6 +2012,9 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
20122012
Argument &srcA = *srcIt;
20132013
Argument &dstA = *dstIt;
20142014

2015+
AUTO_TRACE_ADD("before merge: src=[type='{}',name='{}',def='{}'] dst=[type='{}',name='{}',def='{}']",
2016+
srcA.type,srcA.name,srcA.defval,
2017+
dstA.type,dstA.name,dstA.defval);
20152018
if (srcA.defval.isEmpty() && !dstA.defval.isEmpty())
20162019
{
20172020
//printf("Defval changing '%s'->'%s'\n",qPrint(srcA.defval),qPrint(dstA.defval));
@@ -2128,6 +2131,9 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
21282131
// qPrint(dstA.type), qPrint(dstA.name));
21292132
++srcIt;
21302133
++dstIt;
2134+
AUTO_TRACE_ADD("after merge: src=[type='{}',name='{}',def='{}'] dst=[type='{}',name='{}',def='{}']",
2135+
srcA.type,srcA.name,srcA.defval,
2136+
dstA.type,dstA.name,dstA.defval);
21312137
}
21322138
}
21332139

0 commit comments

Comments
 (0)