vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Outline missing some symbols if within an `extern "C"` block

Open taotaoli opened this issue 1 year ago • 1 comments

Environment

  • OS and Version: Linux x64 5.15.0-113-generic snap
  • VS Code Version: 1.91.1
  • C/C++ Extension Version: v1.20.5
  • If using SSH remote, specify OS of remote machine: No

Bug Summary and Steps to Reproduce

Bug Summary: Outline miss some symbols if the test.h has macro define, if I delete the macro define "#ifdef __cplusplus" , all Symbols will show in the outline test.zip

Steps to reproduce:

  1. open test.h with VS Code
  2. not all symbols in outline

Expected behavior: show all symbols in outline Screenshot from 2024-07-22 16-31-55

Screenshot from 2024-07-22 16-32-23

Configuration and Logs

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++14",
            "intelliSenseMode": "linux-clang-x64"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

taotaoli avatar Jul 22 '24 08:07 taotaoli

Hi @taotaoli . Thanks for reporting this. I can reproduce the issue. It seems to be related to use of extern "C", and not macros, per se.

Colengms avatar Aug 16 '24 23:08 Colengms