]> granicus.if.org Git - clang/commit
Add fix-it notes to the nullability consistency warning.
authorJordan Rose <jordan_rose@apple.com>
Mon, 19 Dec 2016 20:58:20 +0000 (20:58 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 19 Dec 2016 20:58:20 +0000 (20:58 +0000)
commit84ab5b60de850ca615d6223720626f3cd56c3f72
treefcacfcc125bb74f51e9998a560bd1f35406c5b1a
parent01fa6f3b298b98d5f3ecccad52223326c30a280b
Add fix-it notes to the nullability consistency warning.

This is especially important for arrays, since no one knows the proper
syntax for putting qualifiers in arrays.

    nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
    void arrayParameter(int x[]);
                             ^
    nullability.h:3:26: note: insert '_Nullable' if the array parameter may be null
    void arrayParameter(int x[]);
                             ^
                              _Nullable
    nullability.h:3:26: note: insert '_Nonnull' if the array parameter should never be null
    void arrayParameter(int x[]);
                             ^
                              _Nonnull

rdar://problem/29524992

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290132 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaType.cpp
test/FixIt/Inputs/nullability.h [new file with mode: 0644]
test/FixIt/nullability.mm
test/SemaObjCXX/Inputs/nullability-consistency-1.h
test/SemaObjCXX/Inputs/nullability-consistency-2.h
test/SemaObjCXX/Inputs/nullability-consistency-3.h
test/SemaObjCXX/Inputs/nullability-consistency-4.h
test/SemaObjCXX/Inputs/nullability-consistency-5.h
test/SemaObjCXX/Inputs/nullability-consistency-6.h
test/SemaObjCXX/Inputs/nullability-consistency-7.h
test/SemaObjCXX/Inputs/nullability-consistency-8.h
test/SemaObjCXX/Inputs/nullability-consistency-arrays.h
test/SemaObjCXX/Inputs/nullability-consistency-system/nullability-consistency-system.h
test/SemaObjCXX/Inputs/nullability-pragmas-1.h