Skip to content

[clang-tidy] rule limitation: readability-identifier-naming doesn't allow distinguishing between class and struct members #156285

@tothambrus11

Description

@tothambrus11

In our company, the style guide says class members should be postfixed by _, regardless whether they are public/private, but struct members shouldn't be postfixed. In the readability-identifier-naming rule, there are rules for Member* and a ClassMember*, but there are no rules for StructMember*.

I failed to understand from the documentation whether ClassMember* is supposed to match both structs and classes, or what the difference is between Member* and ClassMember*. Regardless, it would be nice to add a new matcher that unambiguously matches only struct members.

If somebody could guide me on the current semantics and where I should contribute, I would be happy to implement the fixes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions