[cfe-commits] r39680 - in /cfe/cfe/trunk/test/Lexer: badstring_in_if0.c block_cmt_end.c escape_newline.c unknown-char.c
bwendlin at cs.uiuc.edu
bwendlin at cs.uiuc.edu
Wed Jul 11 09:47:05 PDT 2007
Author: bwendlin
Date: Wed Jul 11 11:47:04 2007
New Revision: 39680
URL: http://llvm.org/viewvc/llvm-project?rev=39680&view=rev
Log:
Submitted by: Bill Wendling
- Convert to using the -parse-ast-check method to check warnings and
errors.
Modified:
cfe/cfe/trunk/test/Lexer/badstring_in_if0.c
cfe/cfe/trunk/test/Lexer/block_cmt_end.c
cfe/cfe/trunk/test/Lexer/escape_newline.c
cfe/cfe/trunk/test/Lexer/unknown-char.c
Modified: cfe/cfe/trunk/test/Lexer/badstring_in_if0.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Lexer/badstring_in_if0.c?rev=39680&r1=39679&r2=39680&view=diff
==============================================================================
--- cfe/cfe/trunk/test/Lexer/badstring_in_if0.c (original)
+++ cfe/cfe/trunk/test/Lexer/badstring_in_if0.c Wed Jul 11 11:47:04 2007
@@ -1,4 +1,4 @@
-// RUN: clang -E %s 2>&1 | not grep error
+// RUN: clang -parse-ast-check %s
#if 0
"
@@ -6,3 +6,4 @@
'
#endif
+/* expected-warning {{ISO C forbids an empty source file}} */
Modified: cfe/cfe/trunk/test/Lexer/block_cmt_end.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Lexer/block_cmt_end.c?rev=39680&r1=39679&r2=39680&view=diff
==============================================================================
--- cfe/cfe/trunk/test/Lexer/block_cmt_end.c (original)
+++ cfe/cfe/trunk/test/Lexer/block_cmt_end.c Wed Jul 11 11:47:04 2007
@@ -1,15 +1,14 @@
/*
-RUN: clang -E %s | grep bar &&
-RUN: clang -E %s | grep foo &&
-RUN: clang -E %s | not grep abc &&
-RUN: clang -E %s | not grep xyz
-*/
+ RUN: clang -parse-ast-check %s
+ */
/* abc
ends with normal escaped newline:
*\
-/
+/ \
+/* expected-warning {{escaped newline between}} \
+ expected-warning {{backslash and newline separated by space}} */
bar
@@ -18,7 +17,12 @@
ends with a trigraph escaped newline:
*??/
-/
-
-foo
+/ \
+/* expected-warning {{escaped newline between}} \
+ expected-warning {{backslash and newline separated by space}} \
+ expected-warning {{trigraph ends block comment}} */
+
+foo \
+/* expected-error \
+ {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}} */
Modified: cfe/cfe/trunk/test/Lexer/escape_newline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Lexer/escape_newline.c?rev=39680&r1=39679&r2=39680&view=diff
==============================================================================
--- cfe/cfe/trunk/test/Lexer/escape_newline.c (original)
+++ cfe/cfe/trunk/test/Lexer/escape_newline.c Wed Jul 11 11:47:04 2007
@@ -1,7 +1,7 @@
-// RUN: clang -E %s | grep -- ' ->' &&
-// RUN: clang -E %s 2>&1 | grep 'backslash and newline separated by space' &&
-// RUN: clang -E %s 2>&1 | grep 'trigraph converted'
+// RUN: clang -parse-ast-check %s
// This is an ugly way to spell a -> token.
- -??/
+/* expected-warning {{trigraph converted to '\' character}} \
+ expected-warning {{backslash and newline separated by space}} \
+ expected-error {{expected identifier or '('}} */ -??/
>
Modified: cfe/cfe/trunk/test/Lexer/unknown-char.c
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/test/Lexer/unknown-char.c?rev=39680&r1=39679&r2=39680&view=diff
==============================================================================
--- cfe/cfe/trunk/test/Lexer/unknown-char.c (original)
+++ cfe/cfe/trunk/test/Lexer/unknown-char.c Wed Jul 11 11:47:04 2007
@@ -1,2 +1,2 @@
-// RUN: clang -E %s 2>&1 | not grep error
- ` ` ` `
+// RUN: clang -parse-ast-check %s
+` ` ` ` // expected-error {{expected identifier or '('}}
More information about the cfe-commits
mailing list