Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have seen this question, but the answer doesn't seem to be valid in Xcode 7. At least I can't find it.

Can anyone tell me where can I tell the compiler to notify me about unused functions/parameters/values ?

question from:https://stackoverflow.com/questions/35233564/how-to-find-unused-code-in-xcode-7

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
262 views
Welcome To Ask or Share your Answers For Others

1 Answer

Xcode has a number of settings you can enable to warn you about things like unused functions, parameters, and values.

enter image description here

You can also easily enable strict warnings by setting your Other Warning Flags to -Wall -Wextra -Weverything.

Another option for detecting unused code is by using Code Coverage.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...