Skip to content

[clang-tidy] "bugprone-return-const-ref-from-parameter" - should catch reference-like returns #140054

Open
@denzor200

Description

@denzor200

This check is expected to show warning in this function:

std::reference_wrapper<const S> fn_wrapper(const S &a) {
  return a;
}

But it didn't. Full snippet

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