0

Anyone ever faced this weird behavior in Visual Studio 2019? I have below code snippet

{       
        if (condition1)
        {
            function1(arg1);
        }

        // A comment
        if (condition2)
        {
            return EXIT_SUCCESS;
        }
        
        // Comment2
        function2(arg2);

        // Comment3
        function3(arg1, arg2);
    }

When i Ctrl + Click on function1(arg1), then my control jumps to function1 body which is residing in the same file. However, this is not true for function2 and function3 which are also present in the same file. The code compiles and runs OK. Even the "right click + Go to definition" doesn't work for function2 and function3. Intellisense is enabled.

Following are signatures of functions

void function1(ClassA& obj)
void function2(std::vector<std::string>& arg2)
void function3(ClassA& obj, std::vector<std::string>& arg2)
Test
  • 564
  • 3
  • 12
  • 1
    try with this https://stackoverflow.com/questions/57474785/visual-studio-2019-go-to-definition-and-intellisense-not-working – Bharat Jul 21 '21 at 02:53
  • 1
    I recommend you report this question to developer community: https://developercommunity.visualstudio.com/report?space=8&entry=problem – Dylan Jul 21 '21 at 10:02

0 Answers0