[clang] [llvm] [clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 21 07:59:15 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 8f7fdd94ef19af7b4905b316c253a78219a6038f c6028b0ddd8ce1ace6e6c3f14244e889250a8e34 -- clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.h clang-tools-extra/test/clang-tidy/checkers/readability/use-std-min-max.cpp clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp b/clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
index 6e39ebeda2..4cd7898efb 100644
--- a/clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
@@ -90,7 +90,6 @@ void UseStdMinMaxCheck::check(const MatchFinder::MatchResult &Result) {
CondRhsStr + ");")
.str();
}
-
};
const auto OperatorStr = BinaryOp->getOpcodeStr();
if (((BinaryOp->getOpcode() == BO_LT || BinaryOp->getOpcode() == BO_LE) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/77816
More information about the llvm-commits
mailing list