Skip to content

struct within sizeof gets incorrect scopes #679

@alexr00

Description

@alexr00

Checklist

  • This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose

The code with a problem is:

struct sigaction setup_action;
memset(&setup_action, 0, sizeof(struct sigaction));

It looks like:

Here, the struct within the sizeof has the scopes:

meta.arguments.operator.sizeof
source.cpp

Nothing there to indicate that this is struct.
Image

It should look like:

This is when the language is set to C. The struct is highlighted correctly.
Image

Originally from @su8 in microsoft/vscode#243001

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions