[cfe-commits] r38743 - in /cfe/cfe/trunk/test/Preprocessor: macro_disable.c macro_disable2.c macro_not_define.c
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:16 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:15 2007
New Revision: 38743
URL: http://llvm.org/viewvc/llvm-project?rev=38743&view=rev
Log:
new testcase
Added:
cfe/cfe/trunk/test/Preprocessor/macro_disable.c (with props)
cfe/cfe/trunk/test/Preprocessor/macro_disable2.c (with props)
cfe/cfe/trunk/test/Preprocessor/macro_not_define.c (with props)
Added: cfe/cfe/trunk/test/Preprocessor/macro_disable.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_disable.c?rev=38743&view=auto
==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_disable.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_disable.c Wed Jul 11 11:24:15 2007
@@ -0,0 +1,13 @@
+// RUN: clang -E %s | grep 'a: 2 + M_0(3)(4)(5);' &&
+// RUN: clang -E %s | grep 'b: 4 + 4 + 3 + 2 + 1 + M_0(3)(2)(1);'
+
+#define M_0(x) M_ ## x
+#define M_1(x) x + M_0(0)
+#define M_2(x) x + M_1(1)
+#define M_3(x) x + M_2(2)
+#define M_4(x) x + M_3(3)
+#define M_5(x) x + M_4(4)
+
+a: M_0(1)(2)(3)(4)(5);
+b: M_0(5)(4)(3)(2)(1);
+
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_disable.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_disable.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: cfe/cfe/trunk/test/Preprocessor/macro_disable2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_disable2.c?rev=38743&view=auto
==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_disable2.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_disable2.c Wed Jul 11 11:24:15 2007
@@ -0,0 +1,8 @@
+// RUN: clang -E %s | grep 'A B C A B A C A B C A'
+
+#define A A B C
+#define B B C A
+#define C C A B
+
+A
+
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_disable2.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_disable2.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: cfe/cfe/trunk/test/Preprocessor/macro_not_define.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_not_define.c?rev=38743&view=auto
==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_not_define.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_not_define.c Wed Jul 11 11:24:15 2007
@@ -0,0 +1,9 @@
+// RUN: clang -E %s | grep '^ # define X 3$'
+
+#define H #
+ #define D define
+
+ #define DEFINE(a, b) H D a b
+
+ DEFINE(X, 3)
+
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_not_define.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/cfe/trunk/test/Preprocessor/macro_not_define.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
More information about the cfe-commits
mailing list