aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGen/2010-02-10-PointerName.c4
-rw-r--r--test/CodeGenObjC/encode-test-3.m8
-rw-r--r--test/CodeGenObjC/objc-align.m18
-rw-r--r--test/CodeGenObjC/synthesize_ivar-cont-class.m4
-rw-r--r--test/Driver/clang_cpp.c5
-rw-r--r--test/Frontend/rewrite-macros.c14
-rw-r--r--test/Preprocessor/cxx_oper_spelling.cpp3
7 files changed, 33 insertions, 23 deletions
diff --git a/test/CodeGen/2010-02-10-PointerName.c b/test/CodeGen/2010-02-10-PointerName.c
index 2837de4b8b..2321c01c6f 100644
--- a/test/CodeGen/2010-02-10-PointerName.c
+++ b/test/CodeGen/2010-02-10-PointerName.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 %s -emit-llvm -g -o - | grep DW_TAG_pointer_type | grep -v {"char"}
+// RUN: %clang_cc1 %s -emit-llvm -g -o - | FileCheck %s
+// CHECK: DW_TAG_pointer_type
+// CHECK-NOT: {"char"}
char i = 1;
void foo() {
diff --git a/test/CodeGenObjC/encode-test-3.m b/test/CodeGenObjC/encode-test-3.m
index 4b39cd718e..b76063ffd3 100644
--- a/test/CodeGenObjC/encode-test-3.m
+++ b/test/CodeGenObjC/encode-test-3.m
@@ -1,12 +1,14 @@
-// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s
-// RUN: grep -e "\^i" %t | count 1
-// RUN: grep -e "\[0i\]" %t | count 1
+// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
int main() {
int n;
const char * inc = @encode(int[]);
+// CHECK: ^i
+// CHECK-NOT: ^i
const char * vla = @encode(int[n]);
+// CHECK: [0i]
+// CHECK-NOT: [0i]
}
// PR3648
diff --git a/test/CodeGenObjC/objc-align.m b/test/CodeGenObjC/objc-align.m
index 1a9e882a13..1a96f34c5d 100644
--- a/test/CodeGenObjC/objc-align.m
+++ b/test/CodeGenObjC/objc-align.m
@@ -1,14 +1,14 @@
// 32-bit
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
-// RUN: grep '@"\\01L_OBJC_CATEGORY_A_Cat" = internal global .*, section "__OBJC,__category,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_CLASS_A" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_CLASS_C" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_CLASS_PROTOCOLS_C" = internal global .*, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_METACLASS_A" = internal global .*, section "__OBJC,__meta_class,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_METACLASS_C" = internal global .*, section "__OBJC,__meta_class,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_MODULES" = internal global .*, section "__OBJC,__module_info,regular,no_dead_strip", align 4' %t
-// RUN: grep '@"\\01L_OBJC_PROTOCOL_P" = internal global .*, section "__OBJC,__protocol,regular,no_dead_strip", align 4' %t
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
+// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = internal global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_METACLASS_C" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_C" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
// 64-bit
diff --git a/test/CodeGenObjC/synthesize_ivar-cont-class.m b/test/CodeGenObjC/synthesize_ivar-cont-class.m
index 9822702331..393ec3650c 100644
--- a/test/CodeGenObjC/synthesize_ivar-cont-class.m
+++ b/test/CodeGenObjC/synthesize_ivar-cont-class.m
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o %t %s
-// RUN: grep '@"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"' %t
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// PR13820
// REQUIRES: LP64
@@ -17,5 +16,6 @@
@implementation XCOrganizerDeviceNodeInfo
@synthesize viewController;
+// CHECK: @"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"
@end
diff --git a/test/Driver/clang_cpp.c b/test/Driver/clang_cpp.c
index 79b2f55131..bf31800566 100644
--- a/test/Driver/clang_cpp.c
+++ b/test/Driver/clang_cpp.c
@@ -1,4 +1,5 @@
// Verify that -include isn't included twice with -save-temps.
// RUN: %clang -S -o - %s -include %t.h -save-temps -### 2> %t.log
-// RUN: grep '"-include' %t.log | count 1
-
+// RUN: FileCheck %s < %t.log
+// CHECK: "-include
+// CHECK-NOT: "-include
diff --git a/test/Frontend/rewrite-macros.c b/test/Frontend/rewrite-macros.c
index bc7479693b..18c50342f4 100644
--- a/test/Frontend/rewrite-macros.c
+++ b/test/Frontend/rewrite-macros.c
@@ -1,17 +1,21 @@
-// RUN: %clang_cc1 -verify -rewrite-macros -o %t %s
+// RUN: %clang_cc1 %s -verify -rewrite-macros -o %t
+// RUN: FileCheck %s < %t
+
+// Any CHECK line comments are included in the output, so we use some extra
+// regex brackets to make sure we don't match the CHECK lines themselves.
#define A(a,b) a ## b
-// RUN: grep '12 */\*A\*/ /\*(1,2)\*/' %t
+// CHECK: 12{{ *}}/*A*/ /*(1,2)*/
A(1,2)
-// RUN: grep '/\*_Pragma("mark")\*/' %t
+// CHECK: /*_Pragma("{{mark}}")*/
_Pragma("mark")
-// RUN: grep "//#warning eek" %t
+// CHECK: /*#warning {{eek}}*/
/* expected-warning {{eek}} */ #warning eek
-// RUN: grep "//#pragma mark mark" %t
+// CHECK: //#pragma mark {{mark}}
#pragma mark mark
diff --git a/test/Preprocessor/cxx_oper_spelling.cpp b/test/Preprocessor/cxx_oper_spelling.cpp
index 0ae9afd7ee..5152977ba2 100644
--- a/test/Preprocessor/cxx_oper_spelling.cpp
+++ b/test/Preprocessor/cxx_oper_spelling.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -E %s | grep 'a: "and"'
+// RUN: %clang_cc1 -E %s | FileCheck %s
#define X(A) #A
@@ -8,4 +8,5 @@
//
// This should be spelled as 'and', not '&&'
a: X(and)
+// CHECK: a: "and"