Skip to content

[clang-format] [C++20] [Modules] Unexpected/Uncontrollable indentation for export block #121723

@ChuanqiXu9

Description

@ChuanqiXu9

Reproducer:

export module a;
export {
int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(int xxxxxxxxxxxxxxxxxxxxxxx, int xxxxxxxxxxxxxxx);
}

after format we got:

export module a;
export {
  int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      int xxxxxxxxxxxxxxxxxxxxxxx, int xxxxxxxxxxxxxxx);
}

But we don't want the indentation. Or we hope we can control the behavior by an option like NamespaceIndentation (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#namespaceindentation)


Expected output:

export module a;
export {
int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    int xxxxxxxxxxxxxxxxxxxxxxx, int xxxxxxxxxxxxxxx);
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions