diff options
author | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-10-27 03:47:36 +0000 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-10-27 03:47:36 +0000 |
commit | 9b0cffe19ea19e29e3d868e25605278b0a48638b (patch) | |
tree | fa265c4cdee4d9186ad9058b47525c04da7e9cde | |
parent | 86fb835194f54ccecc33bfaf71f38b636993baab (diff) |
Convert Preprocessor Clang tests to FileCheck in regards to PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85201 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Preprocessor/assembler-with-cpp.c | 34 | ||||
-rw-r--r-- | test/Preprocessor/comment_save_macro.c | 10 |
2 files changed, 21 insertions, 23 deletions
diff --git a/test/Preprocessor/assembler-with-cpp.c b/test/Preprocessor/assembler-with-cpp.c index f7706ca676..78a58b0565 100644 --- a/test/Preprocessor/assembler-with-cpp.c +++ b/test/Preprocessor/assembler-with-cpp.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=0 -E %s > %t && +// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=0 -E %s > %t | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s && #ifndef __ASSEMBLER__ #error "__ASSEMBLER__ not defined" @@ -6,72 +6,70 @@ // Invalid token pasting is ok. -// RUN: grep '1: X .' %t && #define A X ## . 1: A +// CHECK-Identifiers-False: 1: X . // Line markers are not linemarkers in .S files, they are passed through. -// RUN: grep '# 321' %t && # 321 +// CHECK-Identifiers-False: # 321 // Unknown directives are passed through. -// RUN: grep '# B C' %t && # B C +// CHECK-Identifiers-False: # B C // Unknown directives are expanded. -// RUN: grep '# BAR42' %t && #define D(x) BAR ## x # D(42) +// CHECK-Identifiers-False: # BAR42 // Unmatched quotes are permitted. -// RUN: grep "2: '" %t && -// RUN: grep '3: "' %t && 2: ' 3: " +// CHECK-Identifiers-False: 2: ' +// CHECK-Identifiers-False: 3: " // (balance quotes to keep editors happy): "' // Empty char literals are ok. -// RUN: grep "4: ''" %t && 4: '' +// CHECK-Identifiers-False: 4: '' // Portions of invalid pasting should still expand as macros. // rdar://6709206 -// RUN: grep "5: expanded (" %t && #define M4 expanded #define M5() M4 ## ( 5: M5() +// CHECK-Identifiers-False: 5: expanded ( // rdar://6804322 -// RUN: grep -F "6: blarg $foo" %t && #define FOO(name) name ## $foo 6: FOO(blarg) +// CHECK-Identifiers-False: 6: blarg $foo -// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=1 -E %s > %t && -// RUN: grep -F "7: blarg$foo" %t && +// RUN: clang-cc -x assembler-with-cpp -fdollars-in-identifiers=1 -E %s > %t | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s && #define FOO(name) name ## $foo 7: FOO(blarg) - +// CHECK-Identifiers-True: 7: blarg$foo // #define T6() T6 #nostring #define T7(x) T7 #x 8: T6() 9: T7(foo) -// RUN: grep '8: T6 #nostring' %t && -// RUN: grep '9: T7 "foo"' %t && +// CHECK-Identifiers-True: 8: T6 #nostring +// CHECK-Identifiers-True: 9: T7 "foo" // Concatenation with period doesn't leave a space -// RUN: grep -F '10: .T8' %t && #define T8(A,B) A ## B 10: T8(.,T8) - +// CHECK-Identifiers-True: 10: .T8 // This should not crash. -// RUN: grep '11: #0' %t && #define T11(a) #0 11: T11(b) +// CHECK-Identifiers-True: 11: #0 // RUN: true diff --git a/test/Preprocessor/comment_save_macro.c b/test/Preprocessor/comment_save_macro.c index 47113a3e6c..f2a669a4c1 100644 --- a/test/Preprocessor/comment_save_macro.c +++ b/test/Preprocessor/comment_save_macro.c @@ -1,10 +1,10 @@ -// RUN: clang-cc -E -C %s | FileCheck -strict-whitespace %s && -// CHECK: boo bork bar // zot +// RUN: clang-cc -E -C %s | FileCheck check-prefix=CHECK-C -strict-whitespace %s && +// CHECK-C: boo bork bar // zot -// RUN: clang-cc -E -CC %s | FileCheck -strict-whitespace %s && -// CHECK: boo bork /* blah*/ bar // zot +// RUN: clang-cc -E -CC %s | FileCheck check-prefix=CHECK-CC -strict-whitespace %s && +// CHECK-CC: boo bork /* blah*/ bar // zot -// RUN: clang-cc -E %s | FileCheck -strict-whitespace %s +// RUN: clang-cc -E %s | FileCheck check-prefix=CHECK -strict-whitespace %s // CHECK: boo bork bar |