Skip to content

clang-format regression around class declarations with attributes #127470

@kadircet

Description

@kadircet

desired formatting:

#define ABSL_ATTRIBUTE_TRIVIAL_ABI
#define ABSL_NULLABILITY_COMPATIBLE

class ABSL_ATTRIBUTE_TRIVIAL_ABI ABSL_NULLABILITY_COMPATIBLE
    ArenaSafeUniquePtr{};

actual formatting:

#define ABSL_ATTRIBUTE_TRIVIAL_ABI
#define ABSL_NULLABILITY_COMPATIBLE

class ABSL_ATTRIBUTE_TRIVIAL_ABI
    ABSL_NULLABILITY_COMPATIBLE ArenaSafeUniquePtr {};

bisection points to #124891. it's similar to #124574 as we were putting class-name to its own line and now we're mixing it with attributes. I guess this is due to special casing ClassHeadName despite having a heuristic with false positives that determines it (e.g. in this case we're falsely treating ABSL_ATTRIBUTE_TRIVIAL_ABI as ClassHeadName).

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions