microsoft / microsoft/vscode-cpptools
Mistyped standard attributes should give a warning
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Feature Request
I recently typed code similar to this:
switch (rule) {
case EXPRESSION:
/* ... */
[[falthrough]];
default:
}
/* ... */
Where's the error? It's hard to notice, but [[fallthrough]], a statement which tells the compiler not to warn on falling through the bottom of a case, is mistyped as [[falthrough]], without one of the Ls. Technically, this isn't a syntax error, but it should be a warning in VS Code since the statement won't do anything.
Extension version: 1.29.2
VS Code version: Code 1.106.3 (bf9252a2fb45be6893dd8870c0bf37e2e1766d61, 2025-11-25T22:28:18.024Z)
OS version: Linux x64 6.8.0-88-generic
Modes:
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
Reproduce the reported C++ switch example with [[falthrough]] in the C/C++ extension and compare it with the valid [[fallthrough]] attribute. Trace the extension's existing handling of standard attributes and diagnostics; done means the mistyped attribute produces a warning without treating valid attributes as errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100