microsoft / microsoft/vscode-cpptools

call hierarchy doesn't show thread creations using the function pointer

Offen
#12,965 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug Feature Request Language Service Visual Studio
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Environment
  • OS and Version: Windows_NT x64 10.0.19045
  • VS Code Version: 1.94.0
  • C/C++ Extension Version: 1.22.11
  • If using SSH remote, specify OS of remote machine: Ubuntu 20.04.6 LTS
Bug Summary and Steps to Reproduce

Bug Summary:
When you look for call hierarchy of a function, it doesn't list the references where it is called as function pointer, for example thread creation. This is useful, else we have to figure out the rest of the hierarchy using search function.

Steps to reproduce:

  1. Go to '...' function definition or declaration
  2. Click on '....' right click and select call hierarchy
  3. Scroll down to '....'
  4. See error

Expected behavior:

Configuration and Logs
I couldn't find "c_cpp_properties.json" in command palette


C/C++: Log Diagnostics

Version: 1.22.11
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "/path/to/folder**"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/clang",
    "cStandard": "c17",
    "cppStandard": "c++14",
    "intelliSenseMode": "linux-clang-x64",
    "compilerPathInCppPropertiesJson": "/usr/bin/clang",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": false,
    "mergeConfigurations": false,
    "compilerPathIsExplicit": false,
    "browse": {
        "path": [
            "/path/to/folder**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Modified Settings:
{
    "C_Cpp.dimInactiveRegions": false,
    "C_Cpp.inactiveRegionOpacity": 1
}
Additional Tracked Settings:
{
    "editorTabSize": 4,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {
        "string": "cpp"
    },
    "filesExclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true
    },
    "filesAutoSaveAfterDelay": true,
    "editorInlayHintsEnabled": true,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },
    "workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.22.11.0
Current database path: /home/username/.cache/vscode-cpptools/72eeda4a81e2b8934c4f4a61f7642951/.browse.VC.db
Translation Unit Mappings:
[ /path/to/foldersrc/send_packets.c - source TU]:
    /path/to/folderinclude/send_packets.h
[ /path/to/foldersrc/stun.c - source TU]:
    /path/to/folderinclude/stun.h
Translation Unit Configurations:
[ /path/to/foldersrc/send_packets.c ]
    Process ID: 2784273
    Memory Usage: 48 MB
    Compiler Path: /usr/bin/clang
    Includes:
        /path/to/folderinclude
    System Includes:
        /usr/local/include
        /usr/lib/llvm-10/lib/clang/10.0.0/include
        /usr/include/x86_64-linux-gnu
        /usr/include
    Standard Version: c17
    IntelliSense Mode: linux-clang-x64
    Other Flags:
        --clang
        --clang_version=100000
[ /path/to/foldersrc/stun.c ]
    Process ID: 2785321
    Memory Usage: 39 MB
    Compiler Path: /usr/bin/clang
    Includes:
        /path/to/folderinclude
    System Includes:
        /usr/local/include
        /usr/lib/llvm-10/lib/clang/10.0.0/include
        /usr/include/x86_64-linux-gnu
        /usr/include
    Standard Version: c17
    IntelliSense Mode: linux-clang-x64
    Other Flags:
        --clang
        --clang_version=100000
Total Memory Usage: 87 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 6421
Number of files parsed: 983
Other Extensions

No response

Additional context

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es werden keine Repository-Dateien oder Tests genannt. Beginne damit, die Aufrufhierarchie ausgehend von einer als Funktionszeiger zur Thread-Erstellung verwendeten C- oder C++-Funktion zu reproduzieren, und verfolge dann die Implementierung der Aufrufhierarchie in der Erweiterung. Als erledigt gilt die Aufgabe, wenn über den Funktionszeiger erreichte Referenzen in der Hierarchie erscheinen und ein Regressionstest diesen Fall abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.