[clang-tools-extra] [llvm] [clang-tidy] Add portability-function-pointer-equality lint (PR #239430)

Jordan R AW via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 13:58:27 PST 2026


================
@@ -0,0 +1,65 @@
+```{title} clang-tidy - misc-function-pointer-equality
+```
+
+# misc-function-pointer-equality
+
+Detects equality comparisons between function pointers and standard containers
+keyed by function pointers, which can behave unpredictably or unsoundly when
+aggressive Identical Code Folding (`--icf=all`) is enabled.
----------------
ajordanr-google wrote:

I have elaborated on this considerably further, and removed the word "unsound". Unsound in this case was referring to linker and compiler transformations that lead to significant observable runtime behaviour differences for what should be provably equivalent.

https://github.com/llvm/llvm-project/pull/239430


More information about the cfe-commits mailing list