[PATCH] D141310: [clang] add -Wcompare-function-pointers

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 17:00:00 PST 2023


cjdb added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7007
+  "comparison of function pointers (%0 and %1)">,
+  InGroup<CompareFunctionPointers>, DefaultIgnore;
 def warn_typecheck_ordered_comparison_of_function_pointers : Warning<
----------------
cjdb wrote:
> It's very rare that we set a warning to `DefaultIgnore`. What's the motivation for this?
> This warning is disabled by default, since it's only relevant if ICF is explicitly enabled.

I see why now. Perhaps this warning should be enabled by default when ICF is also enabled, and an error otherwise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141310/new/

https://reviews.llvm.org/D141310



More information about the cfe-commits mailing list