Skip to content

Clang-Format inserts extra indent for initializer lists with PP in the #else branch #69237

@petrhosek

Description

@petrhosek

For the following snippet:

A a_ {
  kFlag1,
#if BUILD_FLAG
      kFlag2,
#else
      kFlag3,
#endif
      kFlag4
};

Clang-Format inserts an extra indent in the #else branch after #65409:

A a_{kFlag1,
#if BUILD_FLAG
     kFlag2,
#else
       kFlag3,
#endif
     kFlag4};

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions