]> granicus.if.org Git - clang/commit
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)
commitd442f4a26c67e5688e6cd309be4326c8ce38ed89
treeae1c45b40c20df452c4292f4d84f4cb2eb3498db
parent109dad2dfc7f1f23e826832aee0d77a51fbf4d6c
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240158 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/AttributeList.h
include/clang/Sema/Sema.h
lib/Parse/ParseObjc.cpp
lib/Sema/SemaType.cpp
test/SemaObjCXX/Inputs/nullability-consistency-1.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-2.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-3.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-4.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-5.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-6.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-7.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-consistency-8.h [new file with mode: 0644]
test/SemaObjCXX/Inputs/nullability-pragmas-1.h
test/SemaObjCXX/nullability-consistency.mm [new file with mode: 0644]
utils/TableGen/ClangAttrEmitter.cpp