<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 10, 2015, at 4:49 PM, Dmitri Gribenko via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Thu, Dec 10, 2015 at 4:47 PM, Adrian Kashivskyy<br class=""><<a href="mailto:adrian.kashivskyy@me.com" class="">adrian.kashivskyy@me.com</a>> wrote:<br class=""><blockquote type="cite" class="">I'm sure there are plenty of methods in Foundation that return a value which<br class="">can be ignored. However, as Joe noticed, such functions are generally in<br class="">minority.<br class=""><br class="">I'd rather see a couple of `@allow_unused_result` than a dozen of<br class="">`@warn_unused_result`.<br class=""></blockquote><br class="">We are interested in seeing the actual data.<br class=""></div></div></blockquote></div><div class=""><br class=""></div><div class="">Indeed, this change has the potential to produce a huge number of warnings that would not be appreciated by the majority of Swift programmers. One can go ahead and hack the Swift compiler fairly easily and go build some apps to see just how often the warning fires. The place to change in the source is in</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckDecl.cpp" class="">https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckDecl.cpp</a></div><div class=""><br class=""></div><div class="">so that we always diagnose calls to non-Void functions. It should be an easy one-off change to gather data.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div class=""><br class=""></div></body></html>