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 398942 - Doesn't detect this.* references correctly.
Doesn't detect this.* references correctly.
Status: RESOLVED DUPLICATE of bug 342813
Product: doxygen
Classification: Other
Component: documentation
1.5.1
Other Windows
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2007-01-21 05:51 UTC by D
Modified: 2018-06-07 19:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes problem with instance variables and arguments with the same name (2.03 KB, patch)
2010-01-30 21:59 UTC, Antonio Terceiro
none Details | Review
Example created using doxyapp (11.67 KB, text/plain)
2018-06-07 19:43 UTC, cynestro
  Details

Description D 2007-01-21 05:51:16 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.
Comment 1 D 2007-01-26 05:23:21 UTC
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.
Comment 2 Kevin McBride 2007-01-26 15:56:41 UTC
Marking as duplicate per comment #1.

*** This bug has been marked as a duplicate of 342813 ***
Comment 3 Antonio Terceiro 2010-01-30 21:59:36 UTC
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.
Comment 4 Antonio Terceiro 2010-01-30 22:00:29 UTC
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.
Comment 5 cynestro 2018-06-07 19:41:55 UTC
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.
Comment 6 cynestro 2018-06-07 19:43:11 UTC
Created attachment 372596 [details]
Example created using doxyapp