summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-02 18:50:17 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-02 18:50:17 +0000
commitc84e8b779ed816bbaecc8c82fd60d157dbfbab71 (patch)
tree4d23ea84a983156ae238d0449e334624fe64f2d4 /clang/test/Preprocessor
parent9989ddeb15f5ea25a25a46ff24dfd7e231f3c818 (diff)
downloadbcm5719-llvm-c84e8b779ed816bbaecc8c82fd60d157dbfbab71.tar.gz
bcm5719-llvm-c84e8b779ed816bbaecc8c82fd60d157dbfbab71.zip
- Implement __block.
- Replace FIXME in Preprocessor::HandleIdentifier() with a check that avoids diagnosing extension tokens that originate from macro definitions. llvm-svn: 55639
Diffstat (limited to 'clang/test/Preprocessor')
-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