GNOME Bugzilla – Bug 319998
'Referenced by' and 'References' section misses items
Last modified: 2006-06-11 08:40:49 UTC
Please describe the problem: Look at the documentation generated for NSXApp::OnIdle(). Doxygen stops generating information after it parses pgMotion->bInit(). Notice that ONIDLE_LIGHT and ToolMatching::init() are not listed in the 'References" section. As a result of this, the documentation generated for the ToolMatching::init() method is also missing a 'Referenced by' section. Test 1: Replace '_atEvent.isOK()' with 'true', and rerun. In this case, OnIdle gets fully parsed, and ToolMatching::init() documentation is correctly generated to have a 'Referenced by NSXApp::OnIdle()' section. Test 2: Replace 'pgMotion->bInit()' with 'true', and rerun. In this case as well, OnIdle gets fully parsed, and ToolMatching::init() documentation is correctly generated to have a 'Referenced by NSXApp::OnIdle()' section. Steps to reproduce: 1. Unzip the attached Zip file 2. Run the rundox.bat file 3. Observe the generated TestProj.chm file. Actual results: References section for a Member Function stops reporting Members and Functions it refers to after minimally complex references occur. Expected results: References section for a Member Function should list all its items. Does this happen every time? Yes Other information: Yes - I am attaching 'before' and 'after' chm files.
Created attachment 53957 [details] Source files, config file, readme file and generated output
Doxygen Version: 1.4.5 Operating System: Windows XP Professional with Service Pack 2 Other Programs: ActivePerl Version 5.8.7 Build 813 Graphviz Version 2.6 HTML Help Version 1.3 (4.74.8702.0)
Created attachment 62503 [details] [review] proposed patch to correctly parse member functions in conditionals I can confirm this bug, the parser does not correctly handle member functions called inside if statements. The problem is that the lexer doesn't increment the "{" count for a member function called inside an if statement, which causes it to think that the function is complete when encountering the next "}". That's also why the source markup doesn't recognize member functions since it thinks the objects are out of scope. The attached patch fixes this for me, with no obvious ill effects in other locations.
Here's a minimal test case. The x->member() call in testfn() is missing from the "references" section, and doesn't get highlighted in the source view. /** Example class. */ class Example { /** sample member. */ member(int arg1, int arg2) {} /** predicate */ bool predicate() { return false; } }; /** test function. * @param x The object */ void testfn(Example *x) { if (x->predicate()) { return; } x->member(); }
Created attachment 62504 [details] Doxyfile config for example in comment #4 Doxygen config for example in #4. Nothing unusual in this one, you should also be able to reproduce it by putting the sample code into an existing project with reasonable settings. Bug verified in HTML output when using doxygen 1.4.6 on Debian Linux, also verified that the proposed patch fixes it.
I compiled on Windows XP, and ran it on a large test case. Your patch corrected the problem I was seeing. The size of the .chm file generated from my test case increased from 42,120 KB to 45,697 KB. The references sections look very much more accurate. Thank you Klaus!
Patch has been included in CVS update "release-1.4.6-20060202".
Created attachment 62835 [details] Example illustrating further issues with lexer Hi, There is still some problem with the lexer. Though the members called after an if statement block appear in the "references" list, members called inside branches do no appear in the list. The attached code along with the sample output (*.txt files) illustrates the situation. (I have generated the text files by adding some extra code to to Definition::writeSourceRefList function, not affecting the function in any other way, as I needed the reference relations explicitly for the product I am working on). The text files suffixed with _original illustrate the problem with the original release version, while those suffixed with _patced illustrate that the patch does not solve the problem completely (members called inside branches still do not appear in the references list). It would be good if someone can fix the problem completely. Thanks! Janak
This is an automated message triggered by a new release of doxygen. This bug has was marked as assigned, and therefore should be fixed with the new release (1.4.7). Please check if this is indeed the case. If not then please reopen the bug report.