-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Feature: Document SymbolOutline view and breadcrumbsOutline view and breadcrumbsLanguage 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.verifiedBug has been reproducedBug has been reproduced
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Manjaro Linux, kernel 5.10.2-2
- VS Code Version: 1.52.1-2
- C/C++ Extension Version: 1.2.0-insiders2
- Other extensions you installed (and if the issue persists after disabling them): Disabled all other extensions
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
Steps to reproduce
- Create a file containing:
namespace foo {
namespace bar {
namespace foo {
int testFunc();
class bar
{
bar();
};
}
}
}- Note the outline view:

testFunc()andclass barappear within the outer-mostnamespace foo, whereas the constructorbar()appears innamespace bar. However,bar()is still recognized as being a method, rather than a function. - If you change the inner-most
namespace footonamespace notfoo, you get this outline:

testFunc()andclass barare now positioned correctly, while the constructorbar()still appears undernamespace bar.
I recognize that this is an edge case that isn't likely to come up. I found it while coming up with edge cases when testing my own extension.
Logs
-------- Diagnostics - 1/22/2021, 12:28:37 AM
Version: 1.2.0-insiders2
Current Configuration:
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"compilerArgs": [],
"intelliSenseMode": "gcc-x64",
"intelliSenseModeIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"compilerPathIsExplicit": true,
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Translation Unit Mappings:
[ /home/tyler/repos/test.h ]:
/home/tyler/repos/test.h
Translation Unit Configurations:
[ /home/tyler/repos/test.h ]:
Process ID: 137320
Memory Usage: 9 MB
Compiler Path: /usr/bin/clang
Includes:
/usr/include/c++/10.2.0
/usr/include/c++/10.2.0/x86_64-pc-linux-gnu
/usr/include/c++/10.2.0/backward
/usr/local/include
/usr/lib/clang/11.0.0/include
/usr/include
Standard Version: c++14
IntelliSense Mode: linux-clang-x64
Other Flags:
--clang
--clang_version=110000
--header_only_fallback
Total Memory Usage: 9 MB
------- Workspace parsing diagnostics -------
Number of folders and files enumerated: 45423
Number of files discovered (not excluded): 41148
Number of files parsed: 4245
Metadata
Metadata
Assignees
Labels
Feature: Document SymbolOutline view and breadcrumbsOutline view and breadcrumbsLanguage 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.verifiedBug has been reproducedBug has been reproduced