Skip to content

clang-format 15 (with 1.13.4) may sometimes fail to run Format Selection #10186

@sean-mcmanus

Description

@sean-mcmanus

Repro code is

int a()
{
return 0;
}

// Doing Format Selection on the range of code below fails with clang-format 15 -- works with 14.
// The "matching" code above appears to trigger the bug. Format document works.
int b()
{
return 0;
}

The workaround is to set C_Cpp.clang_format_path to a clang-format 14 binary.

I'm not sure yet if it's a bug with clang-format itself or if there is some "by design" change that we may need to address ourselves.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions