Check for consistent use of nullability type specifiers in a header.
authorDouglas Gregor <dgregor@apple.com>
Fri, 19 Jun 2015 18:27:45 +0000 (18:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 19 Jun 2015 18:27:45 +0000 (18:27 +0000)
commitbec595a6412104306926278f811fd7a75fd0d25f
tree93e5b56701b83f396d5c0ac172b15a9cc36fb275
parenta59a7211f06a0ba306c4293be19b1b70e8d3ea3e
Check for consistent use of nullability type specifiers in a header.

Adds a new warning (under -Wnullability-completeness) that complains
about pointer, block pointer, or member pointer declarations that have
not been annotated with nullability information (directly or inferred)
within a header that contains some nullability annotations. This is
intended to be used to help maintain the completeness of nullability
information within a header that has already been audited.

Note that, for performance reasons, this warning will underrepresent
the number of non-annotated pointers in the case where more than one
pointer is seen before the first nullability type specifier, because
we're only tracking one piece of information per header. Part of
rdar://problem/18868820.

llvm-svn: 240158
17 files changed:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/AttributeList.h
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseObjc.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaObjCXX/Inputs/nullability-consistency-1.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-2.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-4.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-5.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-6.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-7.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-consistency-8.h [new file with mode: 0644]
clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h
clang/test/SemaObjCXX/nullability-consistency.mm [new file with mode: 0644]
clang/utils/TableGen/ClangAttrEmitter.cpp