[Mlir-commits] [mlir] [mlir] Use `getSingleElement`/`hasSingleElement` in various places (PR #131460)

Jakub Kuderski llvmlistbot at llvm.org
Mon Mar 17 08:36:45 PDT 2025


kuhar wrote:

> > We don't expect to hit the assertion anywhere, if the assertion never triggers, we wouldn't notice.
> 
> This is consistent with assertions in the projects in general I believe: we don't test for assertions.

We do test for assertions in ADT code when the assertions are advertised as part of the interface. For example many range/iterator functions like `enumerate`, `zip`, `early_inc_range`, `seq` are all tested for assertions. Outside of ADT we also test stuff like `cast`/`any_cast`/etc.

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


More information about the Mlir-commits mailing list