GNOME Bugzilla – Bug 398942
Doesn't detect this.* references correctly.
Last modified: 2018-06-07 19:43:11 UTC
Doxygen does not correctly detect references to member variables when using "this" variable. Example: public class dxTest { private int a = 0; public setA( int a ){ this.a = a; } } This does not show a reference to 'a' private member variable. However, if you change the method signature and remove "this", doxygen detects the reference. public class dxTest { private int a = 0; public setA( int a_work ){ a = a_work; } } Let me know if this is a dup since it seem this would have been discovered already. I did a search but didn't find anything.
I just now realized this is a duplicate bug. Original posting located @: http://bugzilla.gnome.org/show_bug.cgi?id=342813 This is a serious bug nonetheless.
Marking as duplicate per comment #1. *** This bug has been marked as a duplicate of 342813 ***
Created attachment 152647 [details] [review] fixes problem with instance variables and arguments with the same name keeps track of ocurrances of "this->" or "this." so that identifiers that come just after them refer to instance variables and not to local variables.
This bug is *not* a duplicate of 342813. I could reproduce this bug here, but could not reproduce that other bug. The patch above fixes the problem.
I think that this bug was solved, but not entirely. If the parameter name is different than the member variable name, doxygen still isn't able to detect the reference. For example, in this case the references are detected: public class dxTest { private int a = 0; public setA( int a ){ this.a = a; } } But if I change the parameter name, no references are detected: public class dxTest { private int a = 0; public setA( int abc ){ this.a = abc; } } I've added a example created modifying doxyapp as an attachment. The problem seems to be in the getReferencesMembers function, which returns NULL when we change the parameter name.
Created attachment 372596 [details] Example created using doxyapp