summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/new.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-12-01 11:08:04 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-12-01 11:08:04 +0000
commit1569ce68681d909594d64f9b056d71f5dd7563bf (patch)
tree867cbbe32a66fd7d62dd9ce9df23a23fefdb8290 /test/CodeGenCXX/new.cpp
parentf5bd02d290ff15268853e0456c130a1afa15e907 (diff)
downloadsrc-test2-1569ce68681d909594d64f9b056d71f5dd7563bf.tar.gz
src-test2-1569ce68681d909594d64f9b056d71f5dd7563bf.zip
Notes
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 3f191de23bcf..13f26b253cd9 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;
+}
+