tidy - readability-avoid-const-params-in-decls — Extra Clang Tools 22.0.0git documentation (original) (raw)

readability-avoid-const-params-in-decls

Checks whether a function declaration has parameters that are top levelconst.

const values in declarations do not affect the signature of a function, so they should not be put there.

Examples:

void f(const string); // Bad: const is top level. void f(const string&); // Good: const is not top level.

Options

IgnoreMacros

If set to true, the check will not give warnings inside macros. Default is true.