diff --git a/docs/dev/clang-tidy-fixes-2026-04.md b/docs/dev/clang-tidy-fixes-2026-04.md index b08097c12..1291ed9ab 100644 --- a/docs/dev/clang-tidy-fixes-2026-04.md +++ b/docs/dev/clang-tidy-fixes-2026-04.md @@ -21,6 +21,8 @@ - [PR #499](https://github.com/Framework-R-D/phlex/pull/499) - [x] [bugprone-throwing-static-initialization](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/throwing-static-initialization.html) (7) - [PR #472](https://github.com/Framework-R-D/phlex/pull/472) +- [ ] [bugprone-branch-clone](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/branch-clone.html) (12) +- [ ] [bugprone-throw-keyword-missing](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/throw-keyword-missing.html) (6) - [x] [bugprone-unchecked-optional-access](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unchecked-optional-access.html) (15) - [PR #495](https://github.com/Framework-R-D/phlex/pull/495) - [x] [cert-dcl50-cpp](https://clang.llvm.org/extra/clang-tidy/checks/cert/dcl50-cpp.html) (2) @@ -47,6 +49,7 @@ - [PR #451](https://github.com/Framework-R-D/phlex/issues/451) - [x] [clang-analyzer-security.ArrayBound](https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer/security.ArrayBound.html) (2) - No longer found with current `clang-tidy` configuration. +- [ ] [clang-analyzer-security.insecureAPI.rand](https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer/security.insecureAPI.rand.html) (6) - [x] [concurrency-mt-unsafe](https://clang.llvm.org/extra/clang-tidy/checks/concurrency/mt-unsafe.html) (1) - [PR #542](https://github.com/Framework-R-D/phlex/pull/542) - [x] [cppcoreguidelines-avoid-const-or-ref-data-members](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-const-or-ref-data-members.html) (26) @@ -108,9 +111,11 @@ - [ ] [modernize-return-braced-init-list](https://clang.llvm.org/extra/clang-tidy/checks/modernize/return-braced-init-list.html) (6) - [x] [modernize-use-auto](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-auto.html) (24) - [PR #733](https://github.com/Framework-R-D/phlex/pull/733) +- [ ] [modernize-use-emplace](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html) (1) - [ ] [modernize-use-designated-initializers](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-designated-initializers.html) (69) - [ ] [modernize-use-equals-default](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html) (7) - [ ] [modernize-use-integer-sign-comparison](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-integer-sign-comparison.html) (7) +- [ ] [modernize-use-scoped-lock](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-scoped-lock.html) (6) - [x] [modernize-use-nullptr](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-nullptr.html) (194) - [PR #592](https://github.com/Framework-R-D/phlex/pull/592) - [x] [modernize-use-ranges](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-ranges.html) (5) @@ -168,6 +173,7 @@ - [PR #759](https://github.com/Framework-R-D/phlex/pull/759) - [x] [readability-redundant-access-specifiers](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-access-specifiers.html) (3) - [PR #757](https://github.com/Framework-R-D/phlex/pull/757) +- [ ] [readability-redundant-casting](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-casting.html) (5) - [x] [readability-redundant-control-flow](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-control-flow.html) (19) - [PR #743](https://github.com/Framework-R-D/phlex/pull/743) - [x] [readability-redundant-member-init](https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html) (24) @@ -180,3 +186,7 @@ - [ ] [readability-simplify-boolean-expr](https://clang.llvm.org/extra/clang-tidy/checks/readability/simplify-boolean-expr.html) (1) - [x] [readability-static-definition-in-anonymous-namespace](https://clang.llvm.org/extra/clang-tidy/checks/readability/static-definition-in-anonymous-namespace.html) (12) - [PR #742](https://github.com/Framework-R-D/phlex/pull/742) +- [ ] [readability-static-accessed-through-instance](https://clang.llvm.org/extra/clang-tidy/checks/readability/static-accessed-through-instance.html) (10) +- [ ] [readability-use-anyofallof](https://clang.llvm.org/extra/clang-tidy/checks/readability/use-anyofallof.html) (2) +- [x] [readability-use-concise-preprocessor-directives](https://clang.llvm.org/extra/clang-tidy/checks/readability/use-concise-preprocessor-directives.html) (201) + - [PR #772](https://github.com/Framework-R-D/phlex/pull/772) diff --git a/phlex/model/index_generator.hpp b/phlex/model/index_generator.hpp index 7a08d0f5b..cf856b21e 100644 --- a/phlex/model/index_generator.hpp +++ b/phlex/model/index_generator.hpp @@ -15,14 +15,14 @@ #include "phlex/model/fwd.hpp" -#if defined(__has_include) +#ifdef __has_include #if __has_include() #include #include #endif #endif -#if !defined(__cpp_lib_generator) +#ifndef __cpp_lib_generator #include #include #include @@ -31,7 +31,7 @@ #endif namespace phlex { -#if defined(__cpp_lib_generator) +#ifdef __cpp_lib_generator using index_generator = std::generator; #else class index_generator {