From ada6ddcf869b07a73946cd4c7d97f8a7c6c26efc Mon Sep 17 00:00:00 2001 From: Sirac Ozmen Date: Thu, 5 Nov 2026 05:02:09 +0300 Subject: [PATCH] fix(maul): mark the shared cpu.h's two bool functions nodiscard --- maul/renamed/src/cpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maul/renamed/src/cpu.h b/maul/renamed/src/cpu.h index 2d9b59c..b8e79fb 100644 --- a/maul/renamed/src/cpu.h +++ b/maul/renamed/src/cpu.h @@ -8,6 +8,8 @@ #ifndef @OPT@_SRC_CPU_H #define @OPT@_SRC_CPU_H +#include "@LIB@/base.h" + #include // The backend the library's vector code was built for: "avx2", "neon" @@ -17,13 +19,13 @@ const char* @P@GetSimdBackend(void); // Whether this CPU runs the built backend. // NOLINTNEXTLINE(readability-redundant-declaration): base.h may declare it -bool @P@IsCpuBackendSupported(void); +@PP@_NODISCARD bool @P@IsCpuBackendSupported(void); // The CPU check without a world: stores the backend's name in *backend // when backend is not null and returns whether this CPU runs it (when it // does not, the build should be configured scalar). Safe from any thread; // it keeps no state. // NOLINTNEXTLINE(readability-redundant-declaration): base.h may declare it -bool @P@CheckCpu(const char** backend); +@PP@_NODISCARD bool @P@CheckCpu(const char** backend); #endif