<div dir="ltr">Hi Miklos,<div><br></div><div>Thank you so much! I was not aware of the cast kind enums that were available - this helps me a ton.</div><div><br></div><div>- Ray</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 15, 2020 at 9:04 AM Miklos Vajna <<a href="mailto:vmiklos@vmiklos.hu">vmiklos@vmiklos.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ray,<br>
<br>
On Thu, Jun 11, 2020 at 11:59:18PM -0700, Ray Zhang via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
> In order to safely change C-style casts to static_cast, we want to be able<br>
> to tell whether two types are convertible to each other.<br>
<br>
If you already have access to an ExplicitCastExpr, try using<br>
getCastKind(): CK_BaseToDerived would be when you can safely replace<br>
your C cast with a static_cast, I guess.<br>
<br>
Regards,<br>
<br>
Miklos<br>
</blockquote></div>