[SR-2849] Add a warning for unused parameters #45443
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
feature
A feature request or implementation
function parameters
Feature → declarations: function parameters
Additional Detail from JIRA
md5: a0372c6b5db167e925ad73f87d7f903e
is duplicated by:
Issue Description:
When
_ GCC_WARN_UNUSED_PARAMETER_
is enabled unused parameters does not produce warning.How to reproduce:
or
Result:
No warnings.
Expected Result:
Xcode should warn about unused parameters:
tableView
,section
andnotification
.Also Xcode should suggest to replace these parameters with
_
which is already possible to do:This setting works as expected in Objective-C (requires
__unused
attribute to suppress the warning).The text was updated successfully, but these errors were encountered: