[all-commits] [llvm/llvm-project] c13e27: Add clang-tidy check to suggest replacement of con...
Bhuminjay Soni via All-commits
all-commits at lists.llvm.org
Tue Feb 6 11:57:46 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c13e271a38363d354294e2af1651470bed8facb3
https://github.com/llvm/llvm-project/commit/c13e271a38363d354294e2af1651470bed8facb3
Author: Bhuminjay Soni <Soni5Happy at gmail.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang-tools-extra/clang-tidy/readability/CMakeLists.txt
M clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
A clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
A clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.h
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/list.rst
A clang-tools-extra/docs/clang-tidy/checks/readability/use-std-min-max.rst
A clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp
Log Message:
-----------
Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (#77816)
This pull request fixes #64914 where author suggests adding a
readability check to propose the replacement of conditional statements
with std::min/std::max for improved code readability. Additionally,
reference is made to PyLint's similar checks:
[consider-using-min-builtin](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/consider-using-min-builtin.html)
and
[consider-using-max-builtin](https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/consider-using-max-builtin.html)
More information about the All-commits
mailing list