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

Bug 328041

Summary: Call Hierarchy does not show callers of function which has many arguments (16)
Product: [Tools] CDT Reporter: John Pruitt <john.pruitt>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: RESOLVED INVALID QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Pruitt CLA 2010-10-18 10:36:51 EDT
Build Identifier: Build id: 20090920-1017

A function with 16 arguments is shown with no callers in the call hierarchy.

Reproducible: Always

Steps to Reproduce:
1.Use a source file with the contents shown below.
2. Highlight the definition of func3(), bring up the Call Hierarchy and show the callees. 
3. Note that the MakeCarRep functions with a single argument are shown but the call to the version with 16 arguments is not shown. 
4. Showing the callers of func2() shows the MakeCarRep with 16 arguments but it does not show any callers of this function.

Source file contents:
--------------------------------------------

class TtDataUnit
{
public:
	int a;
};
class Fil3d
{
public:
	int b;
};
class TtHypFusRep
{
public:
	int c;
};
class TtCarRep
{
public:
	int d;
};
class GaussKar
{
public:
	int e;
};
class TtHyp2Car
{
public:
	TtHyp2Car(){};

	int MakeCarRep( TtDataUnit &rUnit, double cu[3], double Var,
	  unsigned int *pKaRB, int mStep, int& resetTT, int Grup, int& miD3Cov,
	  double mSysVar, double mMinHeight, Fil3d* pF3D, TtHypFusRep& HypRep,
	  TtCarRep& CarRep, unsigned int iDebugPrint, GaussKar* pGaussKar, double TimeMeas );
	int MakeCarRep( TtDataUnit &rUnit );
	int MakeCarRep( int i );
};
extern void func2();
extern void func3();
extern void func4();
extern void func5();
int TtHyp2Car::MakeCarRep( TtDataUnit &rUnit, double cu[3], double Var,
  unsigned int *pKaRB, int mStep, int& resetTT, int Grup, int& miD3Cov,
  double mSysVar, double mMinHeight, Fil3d* pF3D, TtHypFusRep& HypRep,
  TtCarRep& CarRep, unsigned int iDebugPrint, GaussKar* pGaussKar, double TimeMeas )
{
	func2();
}

int TtHyp2Car::MakeCarRep( TtDataUnit &rUnit )
{
	func4();
}
int TtHyp2Car::MakeCarRep( int i )
{
	func5();
}
TtDataUnit t1;
Fil3d t2;
TtHypFusRep t3;
TtCarRep t4;
GaussKar t5;
TtHyp2Car t6;



void func3()
{
	double cu[3];
	int int1 = 0, int2 = 2, int3 = 3;
	func2();
	t6.MakeCarRep(t1,cu,1.0, &int1, 3, &int2, 4, &int3, 4.0, 5.0, &t2, t3, t4, 4, &t5, 6.0 );
	t6.MakeCarRep(3);
	t6.MakeCarRep(t1);
}
int func()
{
	func2();
	func3();
}
Comment 1 Markus Schorn CLA 2010-10-21 05:48:44 EDT
In your example where you call MakeCarRep 3 of the arguments do not match the parameters:
'&int1' has type 'int *', required is 'unsigned int*'
'&int2' has type 'int *', required is 'int'
'&int3' has type 'int *', required is 'int'
Comment 2 John Pruitt CLA 2010-10-21 09:11:42 EDT
Markus,

Point well taken. I went back to the actual example and got more of the actual code. And made sure it compiles without warnings. The crux of the problem seems to be that the real code did not include stdlib.h to get a typedef for size_t that is needed by eclipse but apparently not needed by visual studio 2008. There was an expression for the 3rd argument that resulted in a double but since size_t did not have a typedef, eclipse was not able to resolve the expression type correctly.

Thanks. Hope you are doing well.

John