Skip to content

Clang-format breaks const identifier of const memeber function after argument comment #45854

@llvmbot

Description

@llvmbot
Bugzilla Link 46509
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

The following snippet was formatted with clang-format which came along clang 5.0

virtual Composite *copy_composite_tree(Composite *parent  // parent of copied tree
                                      ) const;

We updated to clang 10.0 and now the format changes to

virtual Composite *copy_composite_tree(Composite *parent  // parent of copied tree
) const;

The const qualifier is broken onto the next line.

This holds for all build in styles (LLVM, Google, ...).
WINDOWS 10 and Rehat 6 both give the same result.
The above snippet is just an example. It holds for all such occurrences in our code base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions