microsoft / microsoft/vscode-cpptools

Completion doesn't work in C files after the "struct" keyword

Open
#4,661 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Auto-complete Language Service Works in VS
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

int a_var = 1;
if (a_var) {} /* the auto completion is good /
if (!a_var) {} /
the auto completion is not work */

struct m_type {
int c_var;
};
struct m_type t_var;
int a_var = 1, b_var =2;

int c = a_var + b_var; /* a_var and b_var are auto completed /
int c = a_var + t_var.c_var; /
c_var can't auto completed */

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

Start by reproducing the minimal C examples in the issue, especially completion after the struct keyword and for t_var.c_var. No source file, test, or entry point is named, so trace the C completion path from the reproduced case. Done means member completion works in the shown struct access while existing completion behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.