[PATCH] D127231: Restore isa<Ty>(X) asserts inside cast<Ty>(X)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 12:34:03 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/include/llvm/Support/Casting.h:585
LLVM_NODISCARD inline decltype(auto) cast(From *Val) {
+ assert(isa<To>(Val) && "cast<Ty>() argument of incompatible type!");
return CastInfo<To, From *>::doCast(Val);
----------------
It doesn't look like there is an implementation of isa that takes From *. It fails to compile on a Casting unittest.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127231/new/
https://reviews.llvm.org/D127231
More information about the llvm-commits
mailing list