hnrklssn wrote: This is a follow up to https://github.com/llvm/llvm-project/pull/189106, which only addressed `dyn_cast`. This one addresses both `cast` and `dyn_cast`, and their variants `_or_null`/`_if_present` variants. https://github.com/llvm/llvm-project/pull/191322