[cfe-commits] r69538 - in /cfe/trunk/test/Preprocessor: _Pragma-poison.c macro_paste_bad.c poison.c poison_expansion.c

Chris Lattner sabre at nondot.org
Sun Apr 19 13:15:59 PDT 2009


Author: lattner
Date: Sun Apr 19 15:15:59 2009
New Revision: 69538

URL: http://llvm.org/viewvc/llvm-project?rev=69538&view=rev
Log:
merge pragma poison tests into one file with -verify mode.

Removed:
    cfe/trunk/test/Preprocessor/_Pragma-poison.c
    cfe/trunk/test/Preprocessor/poison_expansion.c
Modified:
    cfe/trunk/test/Preprocessor/macro_paste_bad.c
    cfe/trunk/test/Preprocessor/poison.c

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

==============================================================================
--- cfe/trunk/test/Preprocessor/_Pragma-poison.c (original)
+++ cfe/trunk/test/Preprocessor/_Pragma-poison.c (removed)
@@ -1,8 +0,0 @@
-// RUN: clang-cc -Eonly %s 2>&1 | grep error | wc -l | grep 1 &&
-// RUN: clang-cc -Eonly %s 2>&1 | grep 7:4 | wc -l | grep 1
-
-#define BAR _Pragma ("GCC poison XYZW")  XYZW /*NO ERROR*/
-XYZW   // NO ERROR
-BAR
-   XYZW   // ERROR
-

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=69538&r1=69537&r2=69538&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/macro_paste_bad.c (original)
+++ cfe/trunk/test/Preprocessor/macro_paste_bad.c Sun Apr 19 15:15:59 2009
@@ -4,7 +4,6 @@
 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}}
@@ -19,4 +18,3 @@
 #define i   ##      // expected-error {{'##' cannot appear at start of macro expansion}}
 #define j() ##      // expected-error {{'##' cannot appear at start of macro expansion}}
 
-

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

==============================================================================
--- cfe/trunk/test/Preprocessor/poison.c (original)
+++ cfe/trunk/test/Preprocessor/poison.c Sun Apr 19 15:15:59 2009
@@ -1,4 +1,20 @@
-// RUN: clang-cc %s -E 2>&1 | grep error
+// RUN: clang-cc %s -Eonly -verify
 
 #pragma GCC poison rindex
-rindex(some_string, 'h');
+rindex(some_string, 'h');   // expected-error {{attempt to use a poisoned identifier}}
+
+#define BAR _Pragma ("GCC poison XYZW")  XYZW /*NO ERROR*/
+  XYZW      // ok
+BAR
+  XYZW      // expected-error {{attempt to use a poisoned identifier}}
+
+// Pragma poison shouldn't warn from macro expansions defined before the token
+// is poisoned.
+
+#define strrchr rindex2
+#pragma GCC poison rindex2
+
+// Can poison multiple times.
+#pragma GCC poison rindex2
+
+strrchr(some_string, 'h');   // ok.

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

==============================================================================
--- cfe/trunk/test/Preprocessor/poison_expansion.c (original)
+++ cfe/trunk/test/Preprocessor/poison_expansion.c (removed)
@@ -1,9 +0,0 @@
-// RUN: clang-cc %s -E 2>&1 | not grep error
-
-#define strrchr rindex
-#pragma GCC poison rindex
-
-// Can poison multiple times.
-#pragma GCC poison rindex
-
-strrchr(some_string, 'h');





More information about the cfe-commits mailing list