From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=PblxvJfZ; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 8A2F85A0275 for ; Mon, 02 Mar 2026 05:31:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1772425897; bh=NWiYPsV8j4i46dnTJ/o/B1olweHP307oatj4UK9Y0Sk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PblxvJfZ+y8D5iCvUHi22JYJzBzKzCYgNiM98Zdh3lv5oBSw6YZ637vGh2MTc3DfT MNX8N31X8DQwL+XPDs6VvCWHA+BpmY9vWyg9zHyPVuvlrIDaWhMoJ5hoOyYPYYhZjA HX4HKT8yUUcJny8MOGY7k+J4Qe683blGe+hN6vRsJcSh6PynP1SnSBhk6ELQ7ROSLS gfJoSbBa02kze8q49UHMXsEPVAOw6Wba2SHfcpsstxQ5KCoAj1Sfgz1ygl8dfwfnxY skDwLUxleVel7AXmPKzG2WjIrhpokjQc2kB7NXzTQDqxekrlIqifNZkOfhxz+BahXn NSnlwOE3ip1dg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fPQxP0PZfz4w26; Mon, 02 Mar 2026 15:31:37 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 3/3] clang-tidy: Don't insist on #ifdef over #if defined() Date: Mon, 2 Mar 2026 15:31:35 +1100 Message-ID: <20260302043135.800803-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260302043135.800803-1-david@gibson.dropbear.id.au> References: <20260302043135.800803-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: WTZ2ZLJQ3TPG4SLK2QVIGIRCYANAV635 X-Message-ID-Hash: WTZ2ZLJQ3TPG4SLK2QVIGIRCYANAV635 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. Signed-off-by: David Gibson --- .clang-tidy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 9d346ec2..773121f5 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 -- 2.53.0