On 18 Mar 2019, at 14:39, Don Hinton wrote:
It looks like this change introduced a small bug; Specifically, the
following cast test:
- if (auto PT = dyn_cast<llvm::PointerType>(DestTy)) {
...
+ // If we're producing a pointer, this is easy.
+ if (auto destPtrTy = cast<llvm::PointerType>(destTy)) {
Since the cast can fail, shouldn't you prefer dyn_cast<>(), which can
return nullptr, over cast<>(), which will assert?
Yes, although if it hasn't caused a problem in the last year and a half,
maybe we should just change the code to be non-conditional.
John.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits