[cfe-commits] r38739 - in /cfe/cfe/trunk/test/Preprocessor: macro_paste_hard.c macro_rparen_scan.c

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:24:14 PDT 2007


Author: sabre
Date: Wed Jul 11 11:24:14 2007
New Revision: 38739

URL: http://llvm.org/viewvc/llvm-project?rev=38739&view=rev
Log:
new testcase

Added:
    cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c   (with props)
    cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c   (with props)

Added: cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c?rev=38739&view=auto

==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c Wed Jul 11 11:24:14 2007
@@ -0,0 +1,17 @@
+; RUN: clang -E %s | grep '1: aaab 2' &&
+; RUN: clang -E %s | grep '2: 2 baaa' &&
+; RUN: clang -E %s | grep '3: 2 xx'
+
+#define a(n) aaa ## n
+#define b 2
+1: a(b b)   // aaab 2    2 gets expanded, not b.
+
+#undef a
+#undef b
+#define a(n) n ## aaa
+#define b 2
+2: a(b b)   // 2 baaa    2 gets expanded, not b.
+
+#define baaa xx
+3: a(b b)   // 2 xx
+

Propchange: cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c

------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/cfe/trunk/test/Preprocessor/macro_paste_hard.c

------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c?rev=38739&view=auto

==============================================================================
--- cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c (added)
+++ cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c Wed Jul 11 11:24:14 2007
@@ -0,0 +1,8 @@
+// RUN: clang -E %s | grep '^3 ;$'
+
+/* Right paren scanning, hard case.  Should expand to 3. */
+#define i(x) 3 
+#define a i(yz 
+#define b ) 
+a b ) ; 
+

Propchange: cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c

------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/cfe/trunk/test/Preprocessor/macro_rparen_scan.c

------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision





More information about the cfe-commits mailing list