aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-10-18 21:11:11 +0000
committerAnders Carlsson <andersca@mac.com>2009-10-18 21:11:11 +0000
commitfa4f55067bb62a61eb48f77b0216ab1bb1168d27 (patch)
treec791b74090d8582eb5dedfa2d2409d213a63830a
parentbd339f71c7a5a3e2b883f4306689c8bc39077895 (diff)
Convert temporaries.cpp to using FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84446 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGenCXX/temporaries.cpp38
1 files changed, 25 insertions, 13 deletions
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp
index 9b97f0083c..03fbd4b8d9 100644
--- a/test/CodeGenCXX/temporaries.cpp
+++ b/test/CodeGenCXX/temporaries.cpp
@@ -1,14 +1,17 @@
-// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 &&
+// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
struct A {
A();
~A();
void f();
};
-// RUN: grep "call void @_ZN1AC1Ev" %t | count 2 &&
-// RUN: grep "call void @_ZN1AD1Ev" %t | count 2 &&
void f1() {
+ // CHECK: call void @_ZN1AC1Ev
+ // CHECK: call void @_ZN1AD1Ev
(void)A();
+
+ // CHECK: call void @_ZN1AC1Ev
+ // CHECK: call void @_ZN1AD1Ev
A().f();
}
@@ -20,9 +23,9 @@ struct B {
B g();
-// RUN: grep "call void @_ZN1BC1Ev" %t | count 0 &&
-// RUN: grep "call void @_ZN1BD1Ev" %t | count 1 &&
void f2() {
+ // CHECK-NOT: call void @_ZN1BC1Ev
+ // CHECK: call void @_ZN1BD1Ev
(void)g();
}
@@ -34,9 +37,10 @@ struct C {
C f();
};
-// RUN: grep "call void @_ZN1CC1Ev" %t | count 1 &&
-// RUN: grep "call void @_ZN1CD1Ev" %t | count 2 &&
void f3() {
+ // CHECK: call void @_ZN1CC1Ev
+ // CHECK: call void @_ZN1CD1Ev
+ // CHECK: call void @_ZN1CD1Ev
C().f();
}
@@ -48,9 +52,10 @@ struct D {
D operator()();
};
-// RUN: grep "call void @_ZN1DC1Ev" %t | count 1 &&
-// RUN: grep "call void @_ZN1DD1Ev" %t | count 2 &&
void f4() {
+ // CHECK call void @_ZN1DC1Ev
+ // CHECK call void @_ZN1DD1Ev
+ // CHECK call void @_ZN1DD1Ev
D()();
}
@@ -62,10 +67,17 @@ struct E {
E operator!();
};
-// RUN: grep "call void @_ZN1EC1Ev" %t | count 3 &&
-// RUN: grep "call void @_ZN1ED1Ev" %t | count 5 &&
void f5() {
+ // CHECK: call void @_ZN1EC1Ev
+ // CHECK: call void @_ZN1EC1Ev
+ // CHECK: call void @_ZN1ED1Ev
+ // CHECK: call void @_ZN1ED1Ev
+ // CHECK: call void @_ZN1ED1Ev
E() + E();
+
+ // CHECK: call void @_ZN1EC1Ev
+ // CHECK: call void @_ZN1ED1Ev
+ // CHECK: call void @_ZN1ED1Ev
!E();
}
@@ -75,9 +87,9 @@ struct F {
F& f();
};
-// RUN: grep "call void @_ZN1FC1Ev" %t | count 1 &&
-// RUN: grep "call void @_ZN1FD1Ev" %t | count 1
void f6() {
+ // CHECK: call void @_ZN1FC1Ev
+ // CHECK: call void @_ZN1FD1Ev
F().f();
}