[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu May 16 13:35:26 PDT 2024


efriedma-quic wrote:

clang already generates certain diagnostics from ExprConstant; expanding the set of diagnostics could be reasonable.

Alternatively, we could try to add some sort of cooperation between DiagRuntimeBehavior and constant evaluation, to try to avoid having to diagnose everything twice: basically, Sema makes a list of constant-evaluated expressions it wants to warn about, then if ExprConstant prints a warning if it sees one of those expressions.

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


More information about the cfe-commits mailing list