]> granicus.if.org Git - clang/commit
[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 28 Jan 2016 22:23:34 +0000 (22:23 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 28 Jan 2016 22:23:34 +0000 (22:23 +0000)
commit2cd93241422ef7586c71235559dafeec05043a50
tree28dc0d4bd8f9fbe54d3e41c96e75436c1d91d5c7
parent6e4034084453fb289ca51c83db79c6cdbbd012c8
[analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.

There are multiple, common idioms of defensive nil-checks in copy,
mutableCopy, and init methods in ObjC. The analyzer doesn't currently have the
capability to distinguish these idioms from true positives, so suppress all
warnings about returns in those families. This is a pretty blunt suppression
that we should improve later.

rdar://problem/24395811

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259099 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
test/Analysis/nullability.mm