summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/new.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/new.cpp')
-rw-r--r--test/CodeGenCXX/new.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp
index 3f191de..13f26b2 100644
--- a/test/CodeGenCXX/new.cpp
+++ b/test/CodeGenCXX/new.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
+// RUN: clang-cc -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
#include <stddef.h>
void t1() {
@@ -72,3 +72,21 @@ void t8(int n) {
new U[10];
new U[n];
}
+
+void t9() {
+ bool b;
+
+ new bool(true);
+ new (&b) bool(true);
+}
+
+struct A {
+ void* operator new(__typeof(sizeof(int)), int, float, ...);
+ A();
+};
+
+A* t10() {
+ // CHECK: @_ZN1AnwEmifz
+ return new(1, 2, 3.45, 100) A;
+}
+
OpenPOWER on IntegriCloud