microsoft / microsoft/vscode-cpptools
No autocompletion for C/C++ goto labels
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Bug type: Language Service
Describe the bug
The autocompletion engine doesn't seem to provide suggestions for goto statement labels in C/C++.
- OS and Version: MacOS Monterey, 12.1
- VS Code Version: 1.67.2
- C/C++ Extension Version: v1.9.8
- Other extensions you installed (and if the issue persists after disabling them): C/C++ Extension Pack
Steps to reproduce
- Open any C/C++ source file
- Write a dummy goto label anywhere in
main, e.g.test_label: - Write
goto test, and wait for autocompletion
Either nothing shows up, or unrelated variables / functions containing the string "test" are suggested.
Expected behavior
Autocomplete should suggest test_label to complete the goto statement
Screenshot

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in a C/C++ source file: define a label inside main, type a partial goto target, and inspect the completion results. Trace the language-service completion path for goto statements; done means the matching label is suggested without unrelated variables or functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100