summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/new.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/new.cpp')
-rw-r--r--clang/test/CodeGenCXX/new.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/new.cpp b/clang/test/CodeGenCXX/new.cpp
index 480bbcefc08..2cb3b00edf1 100644
--- a/clang/test/CodeGenCXX/new.cpp
+++ b/clang/test/CodeGenCXX/new.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o %t &&
+// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
void t1() {
int* a = new int;
@@ -32,7 +32,7 @@ struct T {
};
void t4() {
- // RUN: grep "call void @_ZN1TC1Ev" %t | count 1 &&
+ // CHECK: call void @_ZN1TC1Ev
T *t = new T;
}
@@ -42,7 +42,7 @@ struct T2 {
};
void t5() {
- // RUN: grep "call void @_ZN2T2C1Eii" %t | count 1
+ // CHECK: call void @_ZN2T2C1Eii
T2 *t2 = new T2(10, 10);
}
@@ -54,3 +54,12 @@ int *t6() {
void t7() {
new int();
}
+
+void t8(int n) {
+ new int[10];
+ new int[n];
+
+ // Non-POD
+ new T[10];
+ new T[n];
+}
OpenPOWER on IntegriCloud