Commit 8769773f for libheif
commit 8769773fc1741950abccce01cbf8aeb5cee73158
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Thu Aug 27 00:57:47 2026 +0200
.clang-tidy: enable performance-* except performance-enum-size
With the previous commit the code base is clean under clang-tidy 18 for
the performance-* checks. performance-enum-size stays disabled: it fires
on the public C API enums, whose base type is part of the ABI, and on
internal enums where a smaller type buys nothing.
diff --git a/.clang-tidy b/.clang-tidy
index 585e9c8b..2a2a4b1c 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,12 +1,10 @@
---
-# Note: "performance-*" was listed here for years but never took effect in the
-# CI: as the last entry of a folded YAML scalar it carried a trailing newline,
-# which the clang-tidy 12 used by the CI did not strip from the glob. With a
-# current clang-tidy the family fires on about 200 sites, roughly half of them
-# performance-enum-size on the public C API enums (whose base type is part of
-# the ABI). Enable it deliberately, together with the code changes, not as a
-# side effect of a compiler upgrade.
-Checks: '-clang-analyzer-security.insecureAPI.strcat,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,modernize-shrink-to-fit,modernize-use-default-member-init,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-override'
+# performance-enum-size is excluded: it fires on the public C API enums, whose base
+# type is part of the ABI, and on internal enums where a smaller type buys nothing.
+# (performance-* was listed here for years but never took effect with the clang-tidy
+# 12 used by the CI until 2026: as the last entry of a folded YAML scalar it carried a
+# trailing newline that clang-tidy 12 did not strip from the glob.)
+Checks: '-clang-analyzer-security.insecureAPI.strcat,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,modernize-shrink-to-fit,modernize-use-default-member-init,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-override,performance-*,-performance-enum-size'
HeaderFilterRegex: .*
WarningsAsErrors: '*'
...