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 729921 - [PROPOSED PATCH] wrong collaboration diagram when in template used scoped argument type
[PROPOSED PATCH] wrong collaboration diagram when in template used scoped arg...
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.7
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2014-05-10 15:22 UTC by Robert Paciorek
Modified: 2016-12-29 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of wrong collaboration diagram (6.69 KB, image/png)
2014-05-10 15:22 UTC, Robert Paciorek
  Details
example of correct collaboration diagram (8.04 KB, image/png)
2014-05-10 15:23 UTC, Robert Paciorek
  Details
proposed patch (481 bytes, patch)
2016-05-11 20:37 UTC, Robert Paciorek
none Details | Review

Description Robert Paciorek 2014-05-10 15:22:20 UTC
Created attachment 276283 [details]
example of wrong collaboration diagram

For simple code:

namespace AAA {
	struct BB {
		AAA::BB* v1;
		BB* v2;
		
		std::list<AAA::BB*> l1;
		std::list<BB*> l2;
	};
}

and config:
	EXTRACT_ALL            = YES
	BUILTIN_STL_SUPPORT    = YES
	ALWAYS_DETAILED_SEC    = YES
	HAVE_DOT               = YES
	CALL_GRAPH             = YES
	CALLER_GRAPH           = YES

Doxygen 1.8.1.2 generate correct "collaboration diagram" - see attachment OK__structAAA_1_1BB__coll__graph.png.

Doxygen 1.8.6 generate wrong "collaboration diagram" l1 on diagram is AAA::AAA::BB type and not reference to BB struct - see attachment BAD__structAAA_1_1BB__coll__graph.png.


Problem is probably in normalizeNonTemplateArgumentsInString() function, or in used by it getResolvedClass() function.

Using
	result+=cd->localName();
instead
	result+=cd->name()
in normalizeNonTemplateArgumentsInString() function fix this issue, but don't resolve short name to full scope name (I don't know if it's a problem for other functionality of doxygen).
Comment 1 Robert Paciorek 2014-05-10 15:23:16 UTC
Created attachment 276284 [details]
example of correct collaboration diagram
Comment 2 Robert Paciorek 2016-05-11 20:37:32 UTC
Created attachment 327662 [details] [review]
proposed patch

Patch for current git version.

Add colon to regexp, because in scoped type name is integral part of type name and there's no need cut template class name on colons.
Comment 3 Dimitri van Heesch 2016-10-17 19:56:57 UTC
Thanks, I'll include the patch in the next GIT update.
Comment 4 Dimitri van Heesch 2016-12-29 18:45:47 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.13. 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 (preferably in the form of a self-contained example).