[cfe-commits] r57094 - /cfe/trunk/test/Driver/rewrite-macros.c

Daniel Dunbar daniel at zuster.org
Sat Oct 4 18:39:05 PDT 2008


Author: ddunbar
Date: Sat Oct  4 20:39:04 2008
New Revision: 57094

URL: http://llvm.org/viewvc/llvm-project?rev=57094&view=rev
Log:
Add -rewrite-macros test case.

Added:
    cfe/trunk/test/Driver/rewrite-macros.c

Added: cfe/trunk/test/Driver/rewrite-macros.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/rewrite-macros.c?rev=57094&view=auto

==============================================================================
--- cfe/trunk/test/Driver/rewrite-macros.c (added)
+++ cfe/trunk/test/Driver/rewrite-macros.c Sat Oct  4 20:39:04 2008
@@ -0,0 +1,18 @@
+// RUN: clang -verify --rewrite-macros -o %t %s &&
+
+#define A(a,b) a ## b
+
+// RUN: grep '12 */\*A\*/ /\*(1,2)\*/' %t &&
+A(1,2)
+
+// RUN: grep '/\*_Pragma("mark")\*/' %t &&
+_Pragma("mark")
+
+// RUN: grep "//#warning eek" %t &&
+/* expected-warning {{#warning eek}} */ #warning eek
+
+// RUN: grep "//#pragma mark mark" %t &&
+#pragma mark mark
+
+// RUN: true
+





More information about the cfe-commits mailing list