<div dir="ltr">Yeah, I'd be OK with that, for sure. (probably add some checks to ensure the source/dest types are pointers, probably, somehow, maybe)</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 5, 2015 at 2:24 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron.ballman@gmail.com" target="_blank">aaron.ballman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aaron.ballman added a comment.<br>
<br>
Thank you for taking care of this! Generally, LGTM, but I do wonder if it might make sense to make something like (totally untested):<br>
<br>
template <typename InTy, typename OutTy><br>
static inline OutTy safe_cast_fn_ptr(InTy fn) {<br>
<br>
return reinterpret_cast<OutTy>(reinterpret_cast<uintptr_t>(fn));<br>
<br>
}<br>
<br>
And use it in place of the extra type casting, since there's a fair amount of it in this test file?<br>
<br>
~Aaron<br>
<br>
<br>
<a href="http://reviews.llvm.org/D11779" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11779</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>