Unable to receive warnings about unused features

I would like Xcode to show a warning if I have unused functions in my project. I am using Swift.

I went to Project / Build settings and in the Apple LLVM 8.1 - Warnings - All Languages section I set Unused functions to Yes .

enter image description here

But I do not get a warning about unused functions in my project.

How can I install Xcode correctly to show me warnings for unused functions?

+5
source share
1 answer

I do not believe that any of these warning flags apply to Swift; they are mainly applied to C languages โ€‹โ€‹(C, C ++, Objective-C). I understand that the Swift team wants to avoid creating โ€œdialectsโ€ of the language, so all warnings and errors supported by the Swift compiler are always on, and there really is no way to enable or disable individual warnings. Therefore, given this, I believe that the Swift compiler is currently not able to test unused functions.

+1
source

Source: https://habr.com/ru/post/1271310/


All Articles