1 .. title:: clang-tidy - readability-redundant-access-specifiers
3 readability-redundant-access-specifiers
4 =======================================
6 Finds classes, structs, and unions containing redundant member (field and
7 method) access specifiers.
26 In the example above, the second ``public`` declaration can be removed without
27 any changes of behavior.
32 .. option:: CheckFirstDeclaration
34 If set to `true`, the check will also diagnose if the first access
35 specifier declaration is redundant (e.g. ``private`` inside ``class``,
36 or ``public`` inside ``struct`` or ``union``).
49 If `CheckFirstDeclaration` option is enabled, a warning about redundant
50 access specifier will be emitted, because ``public`` is the default member access