[clang-tools-extra] [clang-tidy] Improve performance-enum-size to exclude empty enums (PR #71640)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 8 01:45:44 PST 2023
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 8c014e5949fdbecc31a82138361f8cdf886768a9 5fca3fdf781dc849db770975b9f7017b091cd112 -- clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp clang-tools-extra/test/clang-tidy/checkers/performance/enum-size.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp b/clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp
index 182ed49426e5..0f3e9d3ef759 100644
--- a/clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp
@@ -23,9 +23,7 @@ namespace clang::tidy::performance {
namespace {
-AST_MATCHER(EnumDecl, hasEnumerators) {
- return !Node.enumerators().empty();
-}
+AST_MATCHER(EnumDecl, hasEnumerators) { return !Node.enumerators().empty(); }
const std::uint64_t Min8 =
std::imaxabs(std::numeric_limits<std::int8_t>::min());
``````````
</details>
https://github.com/llvm/llvm-project/pull/71640
More information about the cfe-commits
mailing list