[PATCH] D27837: Add fix-it notes to the nullability consistency warning

Jordan Rose via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 18:02:03 PST 2016


jordan_rose created this revision.
jordan_rose added a reviewer: doug.gregor.
jordan_rose added a subscriber: cfe-commits.
jordan_rose set the repository for this revision to rL LLVM.

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


Repository:
  rL LLVM

https://reviews.llvm.org/D27837

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaType.cpp
  test/FixIt/Inputs/nullability.h
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27837.81700.patch
Type: text/x-patch
Size: 33022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161216/45750a32/attachment-0001.bin>


More information about the cfe-commits mailing list