From 685864dea8c35a6abf3ab61de786167e73b18816 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 2 Mar 2026 15:31:35 +1100 Subject: clang-tidy: Don't insist on #ifdef over #if defined() Commit 036fb8770 ("checksum: add VSX fast path for POWER8/POWER9") changed an #ifdef to #if defined, in order to match a newly introduced #if which needs to check two different symbols. This causes clang-tidy to complain that the directive could be written more concisely. In this case consistency with the other #if branch seems more important, and in general insisting on #ifdef over #if seems unhelpfully pedantic. Suppress that warning globally. Reported-by: Laurent Vivier Fixes: 036fb8770cc2 ("checksum: add VSX fast path for POWER8/POWER9") Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- .clang-tidy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 9d346ec..773121f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -81,6 +81,11 @@ Checks: # precedence over addition in modern mathematical notation. Adding # parentheses to reinforce that certainly won't improve readability. - "-readability-math-missing-parentheses" + + # #if defined(FOO) is fine, and can be more consistent with other + # #if directives. Don't insist on #ifdef instead. + - "-readability-use-concise-preprocessor-directives" + WarningsAsErrors: "*" HeaderFileExtensions: - h -- cgit v1.2.3