2 Commits

Author SHA1 Message Date
Dimitrije Dobrota
6a57af8d03
[clang-tidy] Add flag to specify an alternative to std::forward (#138755)
Since std::forward is nothing more than a cast, part of STL and not the
language itself, it's easy to provide a custom implementation if one
wishes not to include the entirety of <utility>.

Added flag (ForwardFunction) provides a way to continue using this
essential check even with the custom implementation of forwarding.

---------

Co-authored-by: EugeneZelenko <eugene.zelenko@gmail.com>
2025-06-30 22:13:33 +03:00
Chris Cotter
5902bb9584 [clang-tidy] Implement cppcoreguidelines F.19
Warns when a function accepting a forwarding reference does anything besides
forwarding (with std::forward) the parameter in the body of the function.

Reviewed By: PiotrZSL

Differential Revision: https://reviews.llvm.org/D146921
2023-05-06 10:49:23 +00:00