Skip to content

Commit

Permalink
add recommended warning flags from Xcode 9
Browse files Browse the repository at this point in the history
  • Loading branch information
diederich committed Jun 6, 2017
1 parent 2055f18 commit c382374
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Base/Common.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ CLANG_ENABLE_MODULES = YES
// Enable ARC
CLANG_ENABLE_OBJC_ARC = YES

// Warn about block captures of implicitly autoreleasing parameters.
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES

// Warn about implicit conversions to boolean values that are suspicious.
// For example, writing 'if (foo)' with 'foo' being the name a function will trigger a warning.
CLANG_WARN_BOOL_CONVERSION = YES

// Warn about suspicious uses of the comma operator.
CLANG_WARN_COMMA = YES

// Warn about implicit conversions of constant values that cause the constant value to change,
// either through a loss of precision, or entirely in its meaning.
CLANG_WARN_CONSTANT_CONVERSION = YES
Expand Down Expand Up @@ -65,9 +71,15 @@ CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO
// Warn about classes that unintentionally do not subclass a root class (such as NSObject).
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR

// Warn about ranged-based for loops.
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES

// Whether to warn on suspicious implicit conversions
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES

// Warn about non-prototype declarations.
CLANG_WARN_STRICT_PROTOTYPES = YES

// Warn about incorrect uses of nullable values
CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION = YES

Expand Down

0 comments on commit c382374

Please sign in to comment.