[clang] [clang][Sema] Avoid out-of-memory crash on huge designated initializer indices (PR #205503)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 06:16:02 PDT 2026


erichkeane wrote:

> Hi all, just checking in on the preferred direction here. Should I continue with the defensive diagnostic approach in this PR, or would you prefer that I investigate a compact zero-filled representation for sparse designated initializers instead?

Ideally we'd do figure out a way to take advantage of everything LLVM lets us do, but frankly, I suspect that LLVM is already going to be a quite limiting factor with quite a lot of work here. 

I think the idea of a limit on these lists is reasonable, but as above folks have said, we need this to be command-line-configurable.  we have similar imp-limit config options.

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


More information about the cfe-commits mailing list