<div>This is question is probably better on the clang cfe-dev list. </div><div><br><div class="gmail_quote"><div>On Sun, Apr 9, 2017 at 12:01 PM Brennan Vincent via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How difficult would it be to add a warning to Clang when the programmer<br class="gmail_msg">
performs a cast that provably has no effect?<br class="gmail_msg">
<br class="gmail_msg">
A particular case I have in mind is someone getting confused and calling<br class="gmail_msg">
std::move on an argument to a copy-constructor for a class that doesn't<br class="gmail_msg">
implement move semantics.<br class="gmail_msg">
<br class="gmail_msg">
I would be grateful if someone either (1) told me why this is<br class="gmail_msg">
difficult/impossible, or (2) gave me some pointers to where I could<br class="gmail_msg">
start trying to implement it...<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">~Craig</div>