[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125335)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 1 08:12:34 PST 2025


kazutakahirata wrote:

> Feel free to batch some of these changes together in a single PR!

Thanks!  It's becoming harder to find occurrences where I can migrate `PU.dyn_cast<T>` to `dyn_cast<T>(PU)` (not to be confused with `dyn_cast_if_present<T>(PU)`) because I have to convince myself that `PU` is never null.  Not every places does `!PU.isNull()` or a dereference of `cast<T>(PU)`.

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


More information about the cfe-commits mailing list