summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/extension-warning.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Preprocessor/extension-warning.c')
-rw-r--r--clang/test/Preprocessor/extension-warning.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/extension-warning.c b/clang/test/Preprocessor/extension-warning.c
new file mode 100644
index 00000000000..c325c2fcf23
--- /dev/null
+++ b/clang/test/Preprocessor/extension-warning.c
@@ -0,0 +1,10 @@
+// RUN: clang -fsyntax-only -verify -pedantic %s
+
+// The preprocessor shouldn't warn about extensions within macro bodies that
+// aren't expanded.
+#define __block __attribute__((__blocks__(byref)))
+
+// This warning is entirely valid.
+__block int x; // expected-warning{{extension used}}
+
+void whatever() {}
OpenPOWER on IntegriCloud