drm_hwcomposer: Enable modernize-type-traits clang-tidy check
... and suppress a warning.
Change-Id: I2361ebaae476928424837ea8c79fddb8b4fc6e33
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/.ci/Makefile b/.ci/Makefile
index ca0daca..fba46b8 100644
--- a/.ci/Makefile
+++ b/.ci/Makefile
@@ -55,7 +55,6 @@
-cert-err33-c \
-readability-math-missing-parentheses \
-readability-avoid-unconditional-preprocessor-if \
- -modernize-type-traits \
TIDY_CHECKS_NORMAL := \
$(TIDY_CHECKS_FINE) \
diff --git a/hwc2_device/hwc2_device.cpp b/hwc2_device/hwc2_device.cpp
index c7bce5f..842dd9d 100644
--- a/hwc2_device/hwc2_device.cpp
+++ b/hwc2_device/hwc2_device.cpp
@@ -54,6 +54,7 @@
template <typename PFN, typename T>
static hwc2_function_pointer_t ToHook(T function) {
+ // NOLINTNEXTLINE(modernize-type-traits): ToHook is going to be removed
static_assert(std::is_same<PFN, T>::value, "Incompatible fn pointer");
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast):
return reinterpret_cast<hwc2_function_pointer_t>(function);