]> granicus.if.org Git - clang/commitdiff
merge two tests
authorChris Lattner <sabre@nondot.org>
Sun, 19 Apr 2009 20:10:12 +0000 (20:10 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 19 Apr 2009 20:10:12 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69537 91177308-0d34-0410-b5e6-96231b3b80d8

test/Preprocessor/macro_paste_bad.c
test/Preprocessor/paste_bad.c [deleted file]

index 29aafdb111e37e16acf576e25196b3781b3d7021..3aafd84071ebf643f05c1d3328276f3643c4ee07 100644 (file)
@@ -1,5 +1,22 @@
-// RUN: clang-cc -Eonly -verify %s
+// RUN: clang-cc -Eonly -verify -pedantic %s
 // pasting ""x"" and ""+"" does not give a valid preprocessing token
 #define XYZ  x ## +   // expected-error {{pasting formed 'x', an invalid preprocessing token}}
 XYZ
 
+// GCC PR 20077
+// RUN: clang-cc -Eonly %s -verify
+
+#define a   a ## ## // expected-error {{'##' cannot appear at end of macro expansion}}
+#define b() b ## ## // expected-error {{'##' cannot appear at end of macro expansion}}
+#define c   c ##    // expected-error {{'##' cannot appear at end of macro expansion}}
+#define d() d ##    // expected-error {{'##' cannot appear at end of macro expansion}}
+
+
+#define e   ## ## e // expected-error {{'##' cannot appear at start of macro expansion}}
+#define f() ## ## f // expected-error {{'##' cannot appear at start of macro expansion}}
+#define g   ## g    // expected-error {{'##' cannot appear at start of macro expansion}}
+#define h() ## h    // expected-error {{'##' cannot appear at start of macro expansion}}
+#define i   ##      // expected-error {{'##' cannot appear at start of macro expansion}}
+#define j() ##      // expected-error {{'##' cannot appear at start of macro expansion}}
+
+
diff --git a/test/Preprocessor/paste_bad.c b/test/Preprocessor/paste_bad.c
deleted file mode 100644 (file)
index fcba742..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// GCC PR 20077
-// RUN: clang-cc -Eonly %s -verify
-
-#define a   a ## ## // expected-error {{'##' cannot appear at end of macro expansion}}
-#define b() b ## ## // expected-error {{'##' cannot appear at end of macro expansion}}
-#define c   c ##    // expected-error {{'##' cannot appear at end of macro expansion}}
-#define d() d ##    // expected-error {{'##' cannot appear at end of macro expansion}}
-
-
-#define e   ## ## e // expected-error {{'##' cannot appear at start of macro expansion}}
-#define f() ## ## f // expected-error {{'##' cannot appear at start of macro expansion}}
-#define g   ## g    // expected-error {{'##' cannot appear at start of macro expansion}}
-#define h() ## h    // expected-error {{'##' cannot appear at start of macro expansion}}
-#define i   ##      // expected-error {{'##' cannot appear at start of macro expansion}}
-#define j() ##      // expected-error {{'##' cannot appear at start of macro expansion}}
-