Skip to content

[WIP] clang-tidy CI test : enable performance-enum-size check#6822

Closed
lucafedeli88 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
lucafedeli88:clang_tidy_enable_performance-enum-size_check
Closed

[WIP] clang-tidy CI test : enable performance-enum-size check#6822
lucafedeli88 wants to merge 1 commit intoBLAST-WarpX:developmentfrom
lucafedeli88:clang_tidy_enable_performance-enum-size_check

Conversation

@lucafedeli88
Copy link
Copy Markdown
Member

@lucafedeli88 lucafedeli88 commented Apr 29, 2026

This PR enables the following check in clang-tidy CI test :

Recommends the smallest possible underlying type for an enum or enum class based on the range of its enumerators. Analyzes the values of the enumerators in an enum or enum class, including signed values, to recommend the smallest possible underlying type that can represent all the values of the enum.

This check was introduced in clang-tidy v18, and we temporarily disabled it when we switched from clang-tidy v17 to clang-tidy v18 to enable the switch to C++20 ( #6606 ). However, per se, the check only requires C++ 11.

@lucafedeli88 lucafedeli88 added component: tests Tests and CI cleaning Clean code, improve readability labels Apr 29, 2026
@lucafedeli88
Copy link
Copy Markdown
Member Author

It's difficult to deal with AMREX_ENUM. I have to close this for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning Clean code, improve readability component: tests Tests and CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant