Argument unused warnings

Something broke yesterday causing Swift to report gobs of argument unused warnings, see:
  [SR-1546] [SwiftPM] Update to use @discardableResult · Issue #5284 · apple/swift-package-manager · GitHub
for a reference.

Does anyone know who this should go to?

- Daniel

[QoI] make several improvements to the unused expression diagnostics,… · apple/swift@3549ec5 · GitHub ?

Dmitri

···

On Tue, May 17, 2016 at 12:37 PM, Daniel Dunbar via swift-dev <swift-dev@swift.org> wrote:

Something broke yesterday causing Swift to report gobs of argument unused warnings, see:
  [SR-1546] [SwiftPM] Update to use @discardableResult · Issue #5284 · apple/swift-package-manager · GitHub
for a reference.

Does anyone know who this should go to?

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

Right, this is intentional behavior as part of SE-0047: https://github.com/apple/swift-evolution/blob/master/proposals/0047-nonvoid-warn.md

It was a bug that calls to these non-void methods didn’t warn before. They can be marked with the @discardableResult attribute if that makes sense.

-Chris

···

On May 17, 2016, at 1:25 PM, Dmitri Gribenko via swift-dev <swift-dev@swift.org> wrote:

On Tue, May 17, 2016 at 12:37 PM, Daniel Dunbar via swift-dev > <swift-dev@swift.org> wrote:

Something broke yesterday causing Swift to report gobs of argument unused warnings, see:
[SR-1546] [SwiftPM] Update to use @discardableResult · Issue #5284 · apple/swift-package-manager · GitHub
for a reference.

Does anyone know who this should go to?

https://github.com/apple/swift/commit/3549ec540408d760c255a526b1cff85644cb96d5 ?

Great, thanks. IMHO it would be nice to open a bug on Foundation/SwiftPM/XCTet when changes like this go in just so we know of the intentional change we need to react to, it is sometimes hard to keep up with the language changes without notification.

- Daniel

···

On May 17, 2016, at 9:25 PM, Chris Lattner <clattner@apple.com> wrote:

On May 17, 2016, at 1:25 PM, Dmitri Gribenko via swift-dev <swift-dev@swift.org> wrote:

On Tue, May 17, 2016 at 12:37 PM, Daniel Dunbar via swift-dev >> <swift-dev@swift.org> wrote:

Something broke yesterday causing Swift to report gobs of argument unused warnings, see:
[SR-1546] [SwiftPM] Update to use @discardableResult · Issue #5284 · apple/swift-package-manager · GitHub
for a reference.

Does anyone know who this should go to?

[QoI] make several improvements to the unused expression diagnostics,… · apple/swift@3549ec5 · GitHub ?

Right, this is intentional behavior as part of SE-0047: https://github.com/apple/swift-evolution/blob/master/proposals/0047-nonvoid-warn.md

It was a bug that calls to these non-void methods didn’t warn before. They can be marked with the @discardableResult attribute if that makes sense.

-Chris