[PATCH] D123901: [LLVM][Casting.h] Allow dyn_cast to return Optional for types that are not constructble from nullptr.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 16 12:14:14 PDT 2022
nikic added a comment.
Not a big fan of this overload. dyn_cast is such a core operation, I'd rather not muddy things by making it return `Optional<>` -- but only sometimes. I expect this is going to cause a lot of confusion when people work on an `Instruction &`, but really want to be working on `Instruction *`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123901/new/
https://reviews.llvm.org/D123901
More information about the llvm-commits
mailing list