summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/new-operator-phi.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
commit741c13ecc20fb35b836ad690aeecd402f002d654 (patch)
tree60a1694bec5a44d15456acc880cb2f91619f66aa /test/CodeGenCXX/new-operator-phi.cpp
parentb3a51061b1b9c4add078237850649f7c9efb13ab (diff)
downloadFreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.zip
FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.tar.gz
Update clang to r89205.
Diffstat (limited to 'test/CodeGenCXX/new-operator-phi.cpp')
-rw-r--r--test/CodeGenCXX/new-operator-phi.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/new-operator-phi.cpp b/test/CodeGenCXX/new-operator-phi.cpp
new file mode 100644
index 0000000..a5eed28
--- /dev/null
+++ b/test/CodeGenCXX/new-operator-phi.cpp
@@ -0,0 +1,11 @@
+// RUN: clang-cc -emit-llvm-only -verify %s
+// PR5454
+#include <stddef.h>
+
+class X {static void * operator new(size_t size) throw(); X(int); };
+int a(), b();
+void b(int x)
+{
+ new X(x ? a() : b());
+}
+
OpenPOWER on IntegriCloud