Skip to content

clang-tidy: more patterns for readability-use-std-min-max #124483

@mathstuf

Description

@mathstuf

The following patterns should also be detected:

if (a >= k) a = k - 1; // a = std::min(a, k - 1);
if (a + c > k) a = k - c; // a = std::min(a, k - c);

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions