]> git.saurik.com Git - apple/objc4.git/blobdiff - test/include-warnings.c
objc4-756.2.tar.gz
[apple/objc4.git] / test / include-warnings.c
diff --git a/test/include-warnings.c b/test/include-warnings.c
new file mode 100644 (file)
index 0000000..72990e2
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+TEST_BUILD
+    $C{COMPILE} $DIR/include-warnings.c -o include-warnings.exe -Wsystem-headers -Weverything -Wno-undef -Wno-old-style-cast -Wno-nullability-extension 2>&1 | grep -v 'In file' | grep objc || true
+END
+
+TEST_RUN_OUTPUT
+OK: includes.c
+END
+*/
+
+// Detect warnings inside any header.
+// The build command above filters out warnings inside non-objc headers 
+// (which are noisy with -Weverything).
+// -Wno-undef suppresses warnings about `#if __cplusplus` and the like.
+// -Wno-old-style-cast is tough to avoid in mixed C/C++ code.
+// -Wno-nullability-extension disables a warning about non-portable
+//   _Nullable etc which we already handle correctly in objc-abi.h.
+
+#include "includes.c"