[cfe-commits] r69537 - in /cfe/trunk/test/Preprocessor: macro_paste_bad.c paste_bad.c

Chris Lattner sabre at nondot.org
Sun Apr 19 13:10:12 PDT 2009


Author: lattner
Date: Sun Apr 19 15:10:12 2009
New Revision: 69537

URL: http://llvm.org/viewvc/llvm-project?rev=69537&view=rev
Log:
merge two tests

Removed:
    cfe/trunk/test/Preprocessor/paste_bad.c
Modified:
    cfe/trunk/test/Preprocessor/macro_paste_bad.c

Modified: cfe/trunk/test/Preprocessor/macro_paste_bad.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_paste_bad.c?rev=69537&r1=69536&r2=69537&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/macro_paste_bad.c (original)
+++ cfe/trunk/test/Preprocessor/macro_paste_bad.c Sun Apr 19 15:10:12 2009
@@ -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}}
+
+

Removed: cfe/trunk/test/Preprocessor/paste_bad.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/paste_bad.c?rev=69536&view=auto

==============================================================================
--- cfe/trunk/test/Preprocessor/paste_bad.c (original)
+++ cfe/trunk/test/Preprocessor/paste_bad.c (removed)
@@ -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}}
-





More information about the cfe-commits mailing list