aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/extension-warning.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/extension-warning.c')
-rw-r--r--test/Preprocessor/extension-warning.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Preprocessor/extension-warning.c b/test/Preprocessor/extension-warning.c
new file mode 100644
index 0000000000..c325c2fcf2
--- /dev/null
+++ b/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() {}