[cfe-commits] r67381 - /cfe/trunk/test/Preprocessor/assembler-with-cpp.c
Chris Lattner
sabre at nondot.org
Fri Mar 20 09:28:23 PDT 2009
Author: lattner
Date: Fri Mar 20 11:28:22 2009
New Revision: 67381
URL: http://llvm.org/viewvc/llvm-project?rev=67381&view=rev
Log:
add tests for the various .S bugs I fixed on wednesday.
Modified:
cfe/trunk/test/Preprocessor/assembler-with-cpp.c
Modified: cfe/trunk/test/Preprocessor/assembler-with-cpp.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/assembler-with-cpp.c?rev=67381&r1=67380&r2=67381&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/assembler-with-cpp.c (original)
+++ cfe/trunk/test/Preprocessor/assembler-with-cpp.c Fri Mar 20 11:28:22 2009
@@ -1,6 +1,36 @@
-// RUN: clang -x assembler-with-cpp -E %s &&
-// RUN: not clang -x c -E %s
+// RUN: clang -x assembler-with-cpp -E %s > %t &&
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
#endif
+
+
+// Invalid token pasting is ok.
+// RUN: grep '1: X .' %t &&
+#define A X ## .
+1: A
+
+// Line markers are not linemarkers in .S files, they are passed through.
+// RUN: grep '# 321' %t &&
+# 321
+
+// Unknown directives are passed through.
+// RUN: grep '# B C' %t &&
+# B C
+
+// Unknown directives are expanded.
+// RUN: grep '# BAR42' %t &&
+#define D(x) BAR ## x
+# D(42)
+
+// Unmatched quotes are permitted.
+// RUN: grep "2: '" %t &&
+// RUN: grep '3: "' %t &&
+2: '
+3: "
+
+// Empty char literals are ok.
+// RUN: grep "4: ''" %t &&
+4: ''
+
+// RUN: true
More information about the cfe-commits
mailing list