Skip to content

Code formatting automatically deletes space between #define and something #7254

@lakshits11

Description

@lakshits11

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10
  • VS Code Version:Insiders
  • C/C++ Extension Version: 1.2.2
  • Other extensions you installed (and if the issue persists after disabling them): NO
  • Does this issue involve using SSH remote to run the extension on a remote machine?: NO
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

- Here in before and after you can see that it automatically deletes spaces between #define and something after define
Like I had #define ll ************* long long int . Here * means spaces.
But after formatting it becomes #define ll long long int

Before
beforee

After
after

Steps to reproduce

  1. Make a folder and inside it create a cpp file.
  2. Copy code from pastebin
  3. Format file using clang-format according to settings.

Expected behavior

What I want is that it should not delete those spaces and everything else like formatting style for braces etc. remain same as it is now.
And yes, I use gcc compiler on my system. Editor uses the default clang format bundled with the extension and I also didn't created any file for specifying any format settings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions