| Author |
Topic  |
|
|
NOPcode
Ketchup Master
   
USA
86 Posts |
Posted - Apr 03 2026 : 09:44:38 AM
|
VS2022 Version 17.14.29
This has started with the last two-ish updates, and it's starting to actually get worse. When I right-click on the function (either in the definition, implementation, or point of use), Find References no longer shows the point of use, and sometimes even fails to find the implementation. Visual Studio's built-in Find All References still works.
FR does seem to work with the class name (FooBar) but not for the actual function (FooBar::Mumble or fbPtr->Mumble).
Doesn't seem to matter the project type or complexity, just fails to find the point of use.
Intellisense is turned on in the editor. |
|
|
feline
Whole Tomato Software
    
United Kingdom
19350 Posts |
Posted - Apr 07 2026 : 08:11:26 AM
|
Are you getting a status bar message saying "VA: Find References is not available because the symbol is not recognized."? If so, that would explain why Find References isn't working, but is only a small step forward.
On the class name can you please trigger Alt-Shift-G, Got Related, and select "Goto Member..." from the context menu. Is the member function you are seeing problems with listed as a class member?
Assuming there is no problem with the first two checks, if you place the keyboard caret into the member function name, what, if anything, is shown in VA's context and definition fields? Is VA showing the correct information for this member function, or is it showing something else?
If VA isn't finding the implementation, what, if anything, does Alt-G do on the function name?
The symptoms suggest something is confusing our parser, and if I had to guess, without any other information, I would suspect macros are causing problems. If so, this is often fairly easy to work around, once we actually have some form of example showing the actual problem. |
zen is the art of being at one with the two'ness |
 |
|
|
NOPcode
Ketchup Master
   
USA
86 Posts |
Posted - Apr 08 2026 : 04:29:58 AM
|
>Are you getting a status bar message...
No. When this fails it either (a) shows the previously found and totally unrelated function or (b) only shows the function within the class, not the call points from outside the class. (a) seems to happen more often with shared_ptr or unique_ptr etc than otherwise, and (b) seems to occur more with non-.sln solutions (ex: CMake.txt projects).
>Alt-G
This shows the list of the definitions/implementations. Same as the Go button on the top right. Clicking on one of those takes me to the proper header/cpp file location.
>keyboard caret
The only thing that shows up is the VS2022 tooltip; right clicking shows the usual VAX menu but there is no specific context for this. I may not know exactly what you are asking for here.
For this specific problem no macros are in the way - that is, there is no macro definition that is wrapping the class or messing with it. It's not just one specific class or project, and it sometimes goes stop failing and things work properly again until the next time I really need it and then it falls over. |
 |
|
|
feline
Whole Tomato Software
    
United Kingdom
19350 Posts |
Posted - Apr 08 2026 : 10:23:39 AM
|
VA has stopped showing a message (error) box when Find References cannot be run, but it still brings focus to the Find References Results window. So having the window appear, but with old / wrong results indicates that Find References could not be run. There should be an error message on the IDE status bar telling you this, but if something else also draws to the status bar, then the message can very easily be missed.
But if Alt-G is working then I would expect Find References to work, at least well enough to list the declaration and implementation, even if nothing else. So that is odd. Do you get a better Find References behaviour when run from the method declaration?
For the keyboard caret, apologies, I clearly didn't explain clearly enough.
If you press Alt-M does VA show a list of methods in the current file? If so, you have showing the VA Navigation bar turned On. This is normally placed at the top of the editor window, but it can be moved to the bottom of the editor window. The Alt-M list appears "from" the left hand side part of the VA Navigation bar.
As you move the keyboard caret, the point where you are typing, around, VA will update the Navigation bar with the current context / information about the current file or symbol. If VA is showing the wrong information for a function / type, or even just showing nothing, then this is a clear sign that our parser is somehow confused by something, and not understanding the current code correctly.
It doesn't tell us why, obviously, but at this point Find References won't work well, since VA is having problems. Does this make a bit more sense?
Given the pattern you are seeing, I have a couple of guesses - but these are just guesses. This reminds me of a couple of different problems I have seen over the years, both VERY rare. The first problem only showed up in a large solution when:
VA Options -> Advanced -> Performance -> Enable multithreaded parsing
was turned On. This is on by default, and normally just makes everything faster. With this turned On, somehow, VA would sometimes parse the code in the "wrong" order, and get very confused. With this turned Off, doing a VA symbol database produced the proper results, but took quite a bit longer. It sort of fits what you are describing, but I think it only ever happened to one user. So the odds of you having a problem like this are really tiny.
My second guess, and its a more likely guess, there is something in one of your outlying library header files that is the trigger. If VA isn't parsing everything on solution load, then it might be a while before the trigger file is parsed. So, in theory, a VA symbol database will "fix" the problem, for a while, then it will crop up again. One case I remember had a library that used a macro to re-define a C++ KEYWORD. Not sure why, but it did. VA found and parsed the macro, then things started to get messy. |
zen is the art of being at one with the two'ness |
 |
|
| |
Topic  |
|
|
|