T O P I C R E V I E W |
steve_dercks |
Posted - Mar 10 2009 : 3:43:34 PM To demonstrate the problem I created a simple console application. I've stripped everything out except the essentials.
#include "stdafx.h" #include "NewClass.h"
int main(int argc, char* argv[]) { NewClass n;
BaseClass *b = &n;
int i = b->GetValue();
return 0; }
In a separate file ...
// BaseClass.h
class BaseClass { public: virtual int GetValue()=0;
};
And a third file ...
//NewClass.h
#include "BaseClass.h"
class NewClass : public BaseClass { public: int GetValue(){return(1);} };
Now, if you put the caret on the GetValue in the main file and do a find references, you only get the GetValue in the main file, not the definition or implementation(they're the same in this example).
If you put the caret on the GetValue in the implementation and find references, you only get the implementation not its use in the main program.
When I put everything in one file, it found everything correctly.
Visual C++ 6.0
VA_X.dll file version 10.5.1715.0 built 2009.01.25 Licensed to: VA X: [email protected] (1-user license) Support ends 2009.12.19 MSDev.exe version 6.0.9782.1 Devshl.dll version 6.0.9782.0 Devedit.pkg version 6.0.9782.0 Font: Courier -13(Pixels) Comctl32.dll version 5.81.4968.2500 Windows 2000 5.0 Build 2195 Service Pack 4 Single processor
Platform: Win32 (x86) Stable Includes: C:\\PROGRAM FILES\\MICROSOFT VISUAL STUDIO .NET 2003\\VC7\\PLATFORMSDK\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include; C:\\PROGRAM FILES\\COMMON FILES\\SYSTEM\\ADO; C:\\POET61\\INC; D:\\SDEV\\LORAMINC; D:\\SDEV\\LORAMINCPOET; D:\\SDEV\\MCL\\INCLUDE; C:\\PROESSENTIALS5\\VC; D:\\SDEV\\NLREG;
Other Includes:
Stable Source Directories: D:\\SDEV\\LORAMSRC; C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\SRC; C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE; C:\\Program Files\\Microsoft Visual Studio\\VC98\\CRT\\SRC;
|
5 L A T E S T R E P L I E S (Newest First) |
support |
Posted - Jan 31 2010 : 1:14:08 PM case=3346 is implemented in build 1810 |
steve_dercks |
Posted - Mar 12 2009 : 7:52:45 PM In this case, the base is pure virtual, the reference in main is to NewClass::GetValue(). It seems that any find reference should note that this method is called from main(). |
accord |
Posted - Mar 12 2009 : 7:12:45 PM Find References finds methods in the same class and in derived classes. But we are considering to allow Find References to search base classes as well as derived classes:
case=3346 |
steve_dercks |
Posted - Mar 11 2009 : 08:16:00 AM When I reload the workspace after everthing has been saved, then the first case, selecting the method in main works. All instances of GetValue are found.
The second case, selecting the implementation still doesn't work. Looks like the method is never used. This is actually the case I first noticed in my application. I have tried rebuilding and that doesn't help. |
accord |
Posted - Mar 10 2009 : 5:07:48 PM I was seeing problems till I saved all files. Can you please try to press save all button to see if this makes any difference for you? |