Sign up FAST! Login

Better Apps with Clang's Weverything or Wall is a Lie!

Stashed in: For Milo

To save this post, select a stash from drop-down menu or type in a new one:

The main point:

Discipline is nice, but tool-assisted enforcement is even better.

The basic rules:

Start with this in your app target’s Build Settings > Other Warning Flags:


And use this on a case-by-case basis and only when absolutely necessary:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-W"
// code...
#pragma clang diagnostic pop

You May Also Like: