Rong Yang
Rong Yang

Reputation: 103

xcode 7 how to suppress warning "overrides a member function but is not marked 'override'"

I updated xcode to 7 today. After the update the project I am working on has the warning "overrides a member function but is not marked 'override'". Since our project set "treade warning as error" to true. I got lots of errors.

I double checked "Other Linker Flags" and pretty sure the flag "-Wsuggest-override" is not included.

Since it is a big project I prefer to suppress the warning instead add the keyword "override" everywhere.

Any suggestion for disabling the warning?

Thanks

Upvotes: 10

Views: 17025

Answers (1)

sjdowling
sjdowling

Reputation: 3022

You need to turn off the -Winconsistent-missing-override flag which automatically gets added with -Wall on recent versions of clang. You can do this by passing the -Wno-inconsistent-missing-override flag. See.

Upvotes: 23

Related Questions