From d7eb891b701050b7b47aafb51efb9fe707e79365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 24 Jun 2024 14:04:19 +0200 Subject: [PATCH] Use another workaround for fixing the wrong lint --- src/LoadStoreChunk.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/LoadStoreChunk.cpp b/src/LoadStoreChunk.cpp index 4d81371604..f1b6e12b5d 100644 --- a/src/LoadStoreChunk.cpp +++ b/src/LoadStoreChunk.cpp @@ -238,33 +238,32 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE) #undef INSTANTIATE_METHOD_TEMPLATES_FOR_BASE -/* - * In the following macro, we replace `dtype` with `std::remove_cv_t` since otherwise clang-tidy won't understand it's a type and we cannot - * surround it with parentheses. The type names are surrounded with angle - * brackets, so the warning is useless. - */ - +/* clang-format would destroy the NOLINT comments */ +// clang-format off #define INSTANTIATE_STORE_CHUNK_FROM_BUFFER(dtype) \ - template class ConfigureLoadStoreFromBuffer< \ - std::shared_ptr>>; \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + template class ConfigureLoadStoreFromBuffer>; \ template class ConfigureStoreChunkFromBuffer< \ std::shared_ptr, \ - ConfigureLoadStoreFromBuffer< \ - std::shared_ptr>>>; \ - template class ConfigureLoadStore>>>; \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ConfigureLoadStoreFromBuffer>>; \ + template class ConfigureLoadStore< \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ConfigureLoadStoreFromBuffer>>; \ INSTANTIATE_METHOD_TEMPLATES( \ - ConfigureLoadStore>>>, \ + ConfigureLoadStore< \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ConfigureLoadStoreFromBuffer>>, \ dtype) \ - template class ConfigureStoreChunkFromBuffer< \ - UniquePtrWithLambda>>; \ - template class ConfigureLoadStore>>>; \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + template class ConfigureStoreChunkFromBuffer>; \ + template class ConfigureLoadStore< \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ConfigureStoreChunkFromBuffer>>; \ INSTANTIATE_METHOD_TEMPLATES( \ - ConfigureLoadStore>>>, \ + ConfigureLoadStore< \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ConfigureStoreChunkFromBuffer>>, \ dtype) \ template class ConfigureStoreChunkFromBuffer< \ std::shared_ptr>; \ @@ -274,6 +273,7 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE) ConfigureLoadStore< \ ConfigureStoreChunkFromBuffer>>, \ dtype) +// clang-format on OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_STORE_CHUNK_FROM_BUFFER)