-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Feature: Go to DefinitionAn issue related to Go to Definition/Declaration.An issue related to Go to Definition/Declaration.Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version:
- VS Code Version: 1.31.1
- C/C++ Extension Version: 0.21
- Other extensions you installed (and if the issue persists after disabling them):
- A clear and concise description of what the bug is.
To Reproduce
- I add two folders to a new workspace, one folder is "cpps" and another one is "headers"
- In "apps" folder there is a cpp file called "cpp_test.cpp" and in "headers" folder there are two files, "header_test.h" and "header_test.cpp".
- code as following:
cpp_test.cpp(in cpps folder)
#include "../headers/headers_test.h"
int cpps_test()
{
ClassA *obj = new ClassA();
obj->test(); //"go to definition" on function "test" will go to declaration instead of def.
}
headers_test.h(in headers folder)
class ClassA {
public:
ClassA(){}
int test();
};
"headers_test.cpp(in headers folder)
#include "test.h"
ClassA::test(){
int mm = 0;
}
This is a bug? Are there some ways to resolve this issue?
Metadata
Metadata
Assignees
Labels
Feature: Go to DefinitionAn issue related to Go to Definition/Declaration.An issue related to Go to Definition/Declaration.Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.