After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625531 - Inherited documentation doesn't work in case of multiple inheritance
Inherited documentation doesn't work in case of multiple inheritance
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.1
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 626037 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-07-28 22:38 UTC by Lénaïc Huard
Modified: 2010-10-09 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example case that reproduces the issue. (445 bytes, text/x-c++hdr)
2010-07-28 22:38 UTC, Lénaïc Huard
Details
The Doxyfile used to reproduce (66.32 KB, application/octet-stream)
2010-07-28 22:39 UTC, Lénaïc Huard
Details
testcase multiple inheritance (895 bytes, text/plain)
2010-08-02 21:05 UTC, Samuel Nobs
Details

Description Lénaïc Huard 2010-07-28 22:38:36 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.
Comment 1 Lénaïc Huard 2010-07-28 22:39:34 UTC
Created attachment 166746 [details]
The Doxyfile used to reproduce
Comment 2 Samuel Nobs 2010-08-02 21:04:58 UTC
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)
Comment 3 Samuel Nobs 2010-08-02 21:05:50 UTC
Created attachment 167013 [details]
testcase multiple inheritance
Comment 4 Jon Harvie 2010-08-03 20:06:03 UTC
I have seen the same issue with some code using multiple inheritance that used to work with older versions of Doxygen.
Comment 5 Dimitri van Heesch 2010-08-04 20:34:20 UTC
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();
     }
   }
Comment 6 Samuel Nobs 2010-08-04 21:57:47 UTC
dimitry,

thanks, this patch works both in my stripped down test case and my huge real-world case.
Comment 7 Lénaïc Huard 2010-08-04 22:30:25 UTC
Hello,

Same as Samuel: this patch fixes both my stripped down test case and my real-world case.

Thanks you very much.
Comment 8 Jon Harvie 2010-08-05 17:45:48 UTC
The patch works for my code too.

Thank you very much for such a quick resolution.
Comment 9 Lénaïc Huard 2010-08-05 20:45:51 UTC
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!
Comment 10 Dimitri van Heesch 2010-08-06 20:14:01 UTC
Hi Lénaïc, thanks for the review and thank you both for the feedback.
Comment 11 Dimitri van Heesch 2010-08-14 19:08:31 UTC
*** Bug 626037 has been marked as a duplicate of this bug. ***
Comment 12 Dimitri van Heesch 2010-10-09 08:19:17 UTC
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.