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<
----------------
aaron.ballman wrote:
> cjdb wrote:
> > 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.
> The problem is: ICF is an lld thing, it's not a Clang thing; so Clang has no 
> idea if ICF will or won't be enabled.
Okay, that sounds like we can't make it an error to turn this warning on when 
ICF isn't enabled, but what about turning it on when the driver sees 
`-icf=all`? Or does that bypass `clang_cc1` altogether?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141310

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to