[llvm] [ADT] Make null PointerUnion with different active members compare equal (PR #121847)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 06:17:35 PST 2025
https://github.com/nikic commented:
Hm, I'm not really convinced this change is right. If PointerUnion allows having null pointers of different types, then treating them as equal may not be correct in general.
I think the fix here should either be that assigning null pointer that is not nullptr_t to a PointerUnion is invalid, or that dyn_cast_if_present should account for the different null pointers.
https://github.com/llvm/llvm-project/pull/121847
More information about the llvm-commits
mailing list