GNOME Bugzilla – Bug 625531
Inherited documentation doesn't work in case of multiple inheritance
Last modified: 2010-10-09 08:19:17 UTC
Created attachment 166745 [details] Example case that reproduces the issue. Hello, Since my upgrade to Doxygen 1.7.1, when a class member is not documented but it re-implements a documented member of a base class, the documentation of the base class is not re-used in the derived class anymore. This seems to occur only in case of multiple inheritance for all the base classes but the last one. This used to work with Doxygen 1.6.3 and 1.5.7. This behavior seems to be a regression of the 1.7 version. Please find attached a test case that reproduces the issue. Doxygen 1.7.1 produces the following warning: all.hpp:20: warning: Member receiveWithoutCopy() (function) of class ReadableSharedQueue is not documented. whereas previous versions didn't.
Created attachment 166746 [details] The Doxyfile used to reproduce
hello i'm facing the same issue. however, it seems like Lénaïc's observation regarding lack of re-use of the documentation is only partially true: if there is more than one base class, only the documentation for members of the last base class in the list is used. my attached test case illustrates this (built using the doxyfile obtained via doxygen -g)
Created attachment 167013 [details] testcase multiple inheritance
I have seen the same issue with some code using multiple inheritance that used to work with older versions of Doxygen.
Confirmed. Should be fixed in the next subversion update. If possible, please try the following patch and let me know if it indeed fixes the problem. --- ../../doxygen-svn/src/classdef.cpp 2010-07-28 20:45:28.000000000 +0200 +++ classdef.cpp 2010-08-04 22:30:55.000000000 +0200 @@ -2172,20 +2172,18 @@ } if (baseClasses()) { - //BaseClassListIterator bcli(*baseClasses()); - //for ( ; bcli.current() && !found ; ++bcli) - BaseClassDef *bcdi = baseClasses()->first(); - while (bcdi) + // Beware: trying to optimise the iterator away using ->first() & ->next() + // causes bug 625331 + BaseClassListIterator bcli(*baseClasses()); + for ( ; bcli.current() && !found ; ++bcli) { - //ClassDef *ccd=bcli.current()->classDef; - ClassDef *ccd=bcdi->classDef; + ClassDef *ccd=bcli.current()->classDef; if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster(); //printf("isBaseClass() baseclass %s\n",ccd->name().data()); if (ccd==bcd) found=TRUE; else found=ccd->isBaseClass(bcd,followInstances,level+1); - bcdi = baseClasses()->next(); } }
dimitry, thanks, this patch works both in my stripped down test case and my huge real-world case.
Hello, Same as Samuel: this patch fixes both my stripped down test case and my real-world case. Thanks you very much.
The patch works for my code too. Thank you very much for such a quick resolution.
Hello Dimitri, There is only one typo in the patch... in the comments. You are referencing that bug, but there is a typo in the number: its 625*5*31 and not 625*3*31. That's all. ;-) Thanks again for your reactivity and your efficiency!
Hi Lénaïc, thanks for the review and thank you both for the feedback.
*** Bug 626037 has been marked as a duplicate of this bug. ***
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.7.2. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant.