<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 23, 2013 at 8:04 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Some quick grepping appears to turn up a couple more of these. I'll<br>
take care of these at some point (can't promise any deadline; I'm not<br>
in full dev mode (watching the bots, etc.) due to school). It would be<br>
cool if somebody dropped in a couple fixes if they're in the area.</blockquote><div><br></div><div style>& I'm just going to take this opportunity to raise an option here (& I've mentioned things like this before but they don't seem to be very popular):<br>
<br>cast should return references, not pointers (& I'd prefer it take references, not pointers) and then we couldn't write this sort of bug*... <br>(dyn_cast could take references too, but obviously still return pointers (or Optional<T&>, though I realize that's a bit odd))</div>
<div style><br></div><div style>* well, we could write similarly buggy code for cases that cast to a boolean testable type, but they'd be a little more obvious, perhaps</div></div></div></div>