[cfe-commits] r84446 - /cfe/trunk/test/CodeGenCXX/temporaries.cpp
Anders Carlsson
andersca at mac.com
Sun Oct 18 14:11:11 PDT 2009
Author: andersca
Date: Sun Oct 18 16:11:11 2009
New Revision: 84446
URL: http://llvm.org/viewvc/llvm-project?rev=84446&view=rev
Log:
Convert temporaries.cpp to using FileCheck.
Modified:
cfe/trunk/test/CodeGenCXX/temporaries.cpp
Modified: cfe/trunk/test/CodeGenCXX/temporaries.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/temporaries.cpp?rev=84446&r1=84445&r2=84446&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/temporaries.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/temporaries.cpp Sun Oct 18 16:11:11 2009
@@ -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 @@
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 @@
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 @@
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 @@
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 @@
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();
}
More information about the cfe-commits
mailing list