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

Bug 354398

Summary: Remote C/C++ search on method return class instance
Product: [Tools] PTP Reporter: Qirui Yang <iharrimoon>
Component: RDTAssignee: Project Inbox <ptp-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: cdtdoug, iharrimoon, jwsliu, recoskie, yangqiru
Version: 4.0.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Qirui Yang CLA 2011-08-10 11:31:19 EDT
Build Identifier: 7.0.2.201102110609

See below

Reproducible: Always

Steps to Reproduce:
1.Create a remote C/C++ project. 
  -- add a source file 'myClass.C' with code:
  #include "myClass.h"

myClass::myClass()
{


}

myClass::~myClass() {

}

int main(void){
	myClass a;
	return 0;
}

-- add a header file 'myClass.h' with code:
  
#ifndef MYCLASS_H_
#define MYCLASS_H_

class myClass {
public:
	myClass();
	virtual ~myClass();
};

#endif /* MYCLASS_H_ */

2. Do a remote c/c++ search on  "myClass", only check 'Method' in 'Search for'.
3. Double click myClass::myClass (2 matches) in Search View, you can see that 'a' is highlighted.
Comment 1 Qirui Yang CLA 2011-08-10 14:36:17 EDT
Note:  This issue also happens using C/C++ Search on a local C++ project.
Comment 2 Qirui Yang CLA 2011-08-18 16:52:56 EDT
This is cause by select reference in search setting. Will modify the test case.
Comment 3 John Liu CLA 2011-08-18 17:03:31 EDT
This is a right result as "a" is a reference of myClass. If you uncheck the reference in the search condition, you won't see it in the search result.