microsoft / microsoft/vscode-cpptools

Mistyped standard attributes should give a warning

Open
#14,094 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Language Service parser Visual Studio
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.