summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2016-12-19 20:58:20 +0000
committerJordan Rose <jordan_rose@apple.com>2016-12-19 20:58:20 +0000
commit06dd406e27b4d43e202b1a8a9782896f80cb0370 (patch)
tree342b9af216edc90509f80d2301b2ee139d142039 /clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h
parent2520c9ebee4f8525648d7ad874e0461d9ec0a1ba (diff)
downloadbcm5719-llvm-06dd406e27b4d43e202b1a8a9782896f80cb0370.tar.gz
bcm5719-llvm-06dd406e27b4d43e202b1a8a9782896f80cb0370.zip
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 llvm-svn: 290132
Diffstat (limited to 'clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h')
-rw-r--r--clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h b/clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h
index 520d1a4b344..e188151364b 100644
--- a/clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h
+++ b/clang/test/SemaObjCXX/Inputs/nullability-consistency-3.h
@@ -1 +1,3 @@
void double_declarator1(int *_Nonnull *); // expected-warning{{pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)}}
+// expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
+// expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
OpenPOWER on IntegriCloud