]> granicus.if.org Git - clang/commit
[analyzer] Nullability: add option to not report on calls to system headers.
authorDevin Coughlin <dcoughlin@apple.com>
Sat, 5 Mar 2016 01:32:43 +0000 (01:32 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Sat, 5 Mar 2016 01:32:43 +0000 (01:32 +0000)
commite608712133a5c27b1a47f7127074670c9d61aeb8
treeaea1807270d0f3ffbd20f61c3567390deeb50060
parent3278448855f1c0fa9c7709fc3efc56d1377deb87
[analyzer] Nullability: add option to not report on calls to system headers.

Add an -analyzer-config 'nullability:NoDiagnoseCallsToSystemHeaders' option to
the nullability checker. When enabled, this option causes the analyzer to not
report about passing null/nullable values to functions and methods declared
in system headers.

This option is motivated by the observation that large projects may have many
nullability warnings. These projects may find warnings about nullability
annotations that they have explicitly added themselves higher priority to fix
than warnings on calls to system libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262763 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
test/Analysis/Inputs/system-header-simulator-for-nullability.h [new file with mode: 0644]
test/Analysis/nullability.mm
test/Analysis/nullability_nullonly.mm