-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call graph regression: Some parts are mixed up #8476
Comments
From your bisect I assume that the problem is still present in the current master.
|
@albert-github I was able to generate a very small example (kind of dirty...). And updated the first message with it. |
Thanks for the example, this would otherwise be hard / impossible to check. |
I've able to reduce the problem a little bit further to:
and a Doxyfile:
Looks like it depends on the return type
Example: example.tar.gz |
The code was previously "buggy", but the bug was hidden. Even in commit e9ca9dc, the Basically every function/variable returning a "complex type" (an enum or a struct), is not located properly (not at the right line number). Edit 1: The function |
Well noted. I had seen it as well but didn't pay attention to it. Some further tests show that doxygen doesn't like a |
This is definitively a problem inside yyextra->current->name = yytext ;
if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC))
{
yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext);
}
+ yyextra->yyBegColNr=yyextra->yyColNr;
+ yyextra->yyBegLineNr=yyextra->yyLineNr;
lineCount(yyscanner);
if (yyextra->current->spec & Entry::Protocol)
{
yyextra->current->name += "-p";
} |
@albert-github @doxygen Any idea how to fix properly this problem? |
This looks like to fix the problem for this case, though I'm a bit hesitant for side effects as not the complete type is processed The mentioned code should be added around, currently, line 5604 where the compound name
in the rule at line 5598 the second part of the type (
it looks like th efunction When we create function:
and this type is handled around line 2173 with the rule:
here the |
Any new ? Without any fixes a recent Doxygen version is not usable. |
@benjarobin I've just pushed a potential fix. Please verify if it works for you. |
I did a quick test with the original test case (see #8476 (comment)), but it looks like I'm missing the caller graphs for the different ExecState functions (compare the output of the current master version, 1.9.2 (0e3174e), with the 1.8.20 release). |
@albert-github Indeed, the same logic bug that was there for callgraphs was also there for calledby graphs. Should be fixed now. |
Looks OK now. I also looked at the:
looks OK too though a bit strange, for me, is the behavior for the enum values: so in one place there is a "References" but on the other place there is no "Referenced by ". I'm not sure what would be best, also in relation to e.g. the |
@doxygen Thank you! I built doxygen from master, then test it on my "big" project, and everything looks good :-) |
This issue was previously marked 'fixed but not released', |
Describe the bug
For a C project, when doxygen is generating the call graph with dot (
CALL_GRAPH
andCALLER_GRAPH
are set toYES
), the resulting html documentation contains call graph and caller graph from the wrong function, even if the root node is the correct function name. Everything looks mixed up in the call tree...After running
git bisect start origin/master tags/Release_1_8_20
I found that the regression was introduces by the commit 0252f61, the commit e9ca9dc is fine.So the version 1.9.1 is impacted.
Expected behavior
Correct call graph / caller graph generation.
To Reproduce
test-repro.zip
Screenshot OK
(using commit e9ca9dc)
Screenshot KO
(using commit 0252f61)
Version
See bisect analyze above. Can be reproduced with latest master
The text was updated successfully, but these errors were encountered: