summaryrefslogtreecommitdiffstats
path: root/test/SemaObjCXX/Inputs/nullability-consistency-5.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/Inputs/nullability-consistency-5.h')
-rw-r--r--test/SemaObjCXX/Inputs/nullability-consistency-5.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjCXX/Inputs/nullability-consistency-5.h b/test/SemaObjCXX/Inputs/nullability-consistency-5.h
new file mode 100644
index 0000000..3a685af
--- /dev/null
+++ b/test/SemaObjCXX/Inputs/nullability-consistency-5.h
@@ -0,0 +1,14 @@
+#define SUPPRESS_NULLABILITY_WARNING(Type) \
+ _Pragma("clang diagnostic push") \
+ _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") \
+ Type \
+ _Pragma("clang diagnostic pop")
+
+void suppress1(SUPPRESS_NULLABILITY_WARNING(int *) ptr); // no warning
+
+void shouldwarn5(int *ptr); //expected-warning{{missing a nullability type specifier}}
+
+void trigger5(int * __nonnull);
+
+void suppress2(SUPPRESS_NULLABILITY_WARNING(int *) ptr); // no warning
+
OpenPOWER on IntegriCloud