Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 159515

Summary: PDOM missing information about overloaded methods
Product: [Tools] CDT Reporter: Jason Montojo <jason.montojo>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jason Montojo CLA 2006-10-02 16:28:15 EDT
When a method is overloaded, the PDOM captures a subset of the information about all the methods.  For example, given this code:

class Class1 {
public:
	void f();
	void f(int i);
};

Class1::f() {
}

Class1::f(int i) {
}

int main() {
	Class1 c;
	c.f(1);
	c.f();	
	return 0;
}

1. Class1::f resolves to only 1 IBinding
2. The IBinding for Class1::f has parameters for only 1 definition of f()
3. The IBinding for Class1::f has 2 references in the PDOM
4. The IBinding for Class1::f has 4 declarations in the PDOM
5. The IBinding for Class1::f has 2 definitions in the PDOM

So the references, declarations, and definitions are being counted across all variants of f(), but the IBinding points to one specific variant.

This doesn't affect the C/C++ editor's Open Declaration/Definition feature, but it does affect Declarations->Workspace, References->Workspace and friends.
Comment 1 Markus Schorn CLA 2006-10-03 02:03:50 EDT

*** This bug has been marked as a duplicate of 156504 ***