Skip to content

Peek References does not work on struct's members #14602

Description

@mehlian

Environment

  • OS and Version: Windows 10
  • VS Code Version: 1.108.2
  • C/C++ Extension Version: C/C++ v1.32.2
  • If using SSH remote, specify OS of remote machine: none

Bug Summary and Steps to Reproduce

Bug Summary:
No result found when using 'Peek References' on struct members.

Steps to reproduce:

  1. Paste code (file.hpp):
struct MyStruct
{
    int value;
};

struct Container
{
    int value2;
    MyStruct *myStruct;
};

void func(Container *container)
{
    container->myStruct = 0;
}

void func2(Container *container)
{
    container->value2 = 1;
    container->myStruct = 0;
}
  1. Use 'Peek References' option (Shift+F12) when over 'myStruct' or 'value2' variable (inside function or at struct definition).
  2. See 'No references found for 'myStruct'.

Expected behavior:
Peek windows should appear and show all places where 'myStruct' member is used.

Configuration and Logs

ask for specific details

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions