diff --git a/.clang-tidy b/.clang-tidy deleted file mode 100644 index 923b0e8..0000000 --- a/.clang-tidy +++ /dev/null @@ -1,27 +0,0 @@ ---- -Checks: '-*, - - bugprone-*, - -bugprone-easily-swappable-parameters, - -bugprone-macro-parentheses, - - clang-analyzer-*, - - concurrency-*, - - cppcoreguidelines-*, - -cppcoreguidelines-macro-usage, - - modernize-*, - -modernize-use-trailing-return-type, - - performance-*, - - portability-*, - - readability-*, - -readability-identifier-length, - -readability-named-parameter, - -readability-redundant-access-specifiers, - ' -... diff --git a/.clangd b/.clangd index 1ce7445..1c32a0e 100644 --- a/.clangd +++ b/.clangd @@ -1,2 +1,26 @@ +Diagnostics: + ClangTidy: + Add: + - bugprone-* + - clang-analyzer-* + - concurrency-* + - cppcoreguidelines-* + - misc-* + - modernize-* + - performance-* + - portability-* + - readability-* + Remove: + - bugprone-easily-swappable-parameters + - bugprone-macro-parentheses + - cppcoreguidelines-macro-usage + - misc-no-recursion + - misc-non-private-member-variables-in-classes + - misc-unused-using-decls + - modernize-use-trailing-return-type + - readability-identifier-length + - readability-named-parameter + - readability-redundant-access-specifiers + CompileFlags: - CompilationDatabase: ./develop/.cdb \ No newline at end of file + CompilationDatabase: ./develop/.cdb diff --git a/.vscode/settings.json b/.vscode/settings.json index 29e9ada..c7e1c18 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,5 +17,8 @@ "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true }, + "clangd.arguments": [ + "--header-insertion=never" + ], "cmake.copyCompileCommands": "${workspaceFolder}/develop/.cdb/compile_commands.json" } diff --git a/develop/.clangd b/develop/.clangd new file mode 100644 index 0000000..ac96b97 --- /dev/null +++ b/develop/.clangd @@ -0,0 +1,7 @@ +Diagnostics: + ClangTidy: + Remove: + - cppcoreguidelines-* + - modernize-* + - performance-* + - readability-* diff --git a/develop/manuals/.clang-tidy b/develop/manuals/.clang-tidy deleted file mode 100644 index d67cfbf..0000000 --- a/develop/manuals/.clang-tidy +++ /dev/null @@ -1,18 +0,0 @@ ---- -Checks: '-*, - - bugprone-*, - -bugprone-easily-swappable-parameters, - - clang-analyzer-*, - - concurrency-*, - - modernize-*, - -modernize-avoid-c-arrays, - -modernize-use-nodiscard, - -modernize-use-trailing-return-type, - - portability-*, - ' -... diff --git a/develop/singles/headers/meta.hpp/meta_all.hpp b/develop/singles/headers/meta.hpp/meta_all.hpp index 8923de2..f6da04c 100644 --- a/develop/singles/headers/meta.hpp/meta_all.hpp +++ b/develop/singles/headers/meta.hpp/meta_all.hpp @@ -419,7 +419,7 @@ namespace meta_hpp::detail assert(!dst); // NOLINT static_assert(sizeof(Fp) <= sizeof(buffer_t)); - static_assert(alignof(Fp) <= alignof(buffer_t)); + static_assert(alignof(buffer_t) % alignof(Fp) == 0); static_assert(std::is_invocable_r_v); static_assert(std::is_nothrow_move_constructible_v); @@ -8164,8 +8164,8 @@ namespace meta_hpp assert(!dst); // NOLINT constexpr bool in_buffer = - sizeof(Tp) <= sizeof(buffer_t) && - alignof(Tp) <= alignof(buffer_t) && + (sizeof(Tp) <= sizeof(buffer_t)) && + (alignof(buffer_t) % alignof(Tp) == 0) && std::is_nothrow_move_constructible_v; if constexpr ( in_buffer ) { diff --git a/develop/untests/.clang-tidy b/develop/untests/.clang-tidy deleted file mode 100644 index d67cfbf..0000000 --- a/develop/untests/.clang-tidy +++ /dev/null @@ -1,18 +0,0 @@ ---- -Checks: '-*, - - bugprone-*, - -bugprone-easily-swappable-parameters, - - clang-analyzer-*, - - concurrency-*, - - modernize-*, - -modernize-avoid-c-arrays, - -modernize-use-nodiscard, - -modernize-use-trailing-return-type, - - portability-*, - ' -... diff --git a/headers/meta.hpp/meta_base/fixed_function.hpp b/headers/meta.hpp/meta_base/fixed_function.hpp index cd90dc4..f74a59d 100644 --- a/headers/meta.hpp/meta_base/fixed_function.hpp +++ b/headers/meta.hpp/meta_base/fixed_function.hpp @@ -149,7 +149,7 @@ namespace meta_hpp::detail assert(!dst); // NOLINT static_assert(sizeof(Fp) <= sizeof(buffer_t)); - static_assert(alignof(Fp) <= alignof(buffer_t)); + static_assert(alignof(buffer_t) % alignof(Fp) == 0); static_assert(std::is_invocable_r_v); static_assert(std::is_nothrow_move_constructible_v); diff --git a/headers/meta.hpp/meta_uvalue/uvalue.hpp b/headers/meta.hpp/meta_uvalue/uvalue.hpp index 6056b2a..edbc36c 100644 --- a/headers/meta.hpp/meta_uvalue/uvalue.hpp +++ b/headers/meta.hpp/meta_uvalue/uvalue.hpp @@ -70,8 +70,8 @@ namespace meta_hpp assert(!dst); // NOLINT constexpr bool in_buffer = - sizeof(Tp) <= sizeof(buffer_t) && - alignof(Tp) <= alignof(buffer_t) && + (sizeof(Tp) <= sizeof(buffer_t)) && + (alignof(buffer_t) % alignof(Tp) == 0) && std::is_nothrow_move_constructible_v; if constexpr ( in_buffer ) {