]> granicus.if.org Git - clang/commitdiff
Add testcase that I forgot for r101667 for gnu-keywords.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 18 Apr 2010 06:12:13 +0000 (06:12 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 18 Apr 2010 06:12:13 +0000 (06:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101700 91177308-0d34-0410-b5e6-96231b3b80d8

test/Lexer/gnu_keywords.c [new file with mode: 0644]

diff --git a/test/Lexer/gnu_keywords.c b/test/Lexer/gnu_keywords.c
new file mode 100644 (file)
index 0000000..3234f58
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %clang -DGNU_KEYWORDS -std=gnu89 -fsyntax-only -verify %s
+// RUN: %clang -DGNU_KEYWORDS -std=c99 -fgnu-keywords -fsyntax-only -verify %s
+// RUN: %clang -std=c99 -fsyntax-only -verify %s
+// RUN: %clang -std=gnu89 -fno-gnu-keywords -fsyntax-only -verify %s
+
+void f() {
+#ifdef GNU_KEYWORDS
+  asm ("ret" : :);
+#else
+  int asm;
+#endif
+}