Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm-only -verify %s |
Eli Friedman | 7f1de45 | 2009-11-10 22:39:09 +0000 | [diff] [blame] | 2 | // PR5454 |
Fariborz Jahanian | f42d74f | 2009-11-11 22:49:09 +0000 | [diff] [blame] | 3 | #include <stddef.h> |
Eli Friedman | 7f1de45 | 2009-11-10 22:39:09 +0000 | [diff] [blame] | 4 | |
John McCall | 7002f4c | 2010-04-09 19:03:51 +0000 | [diff] [blame] | 5 | struct X {static void * operator new(size_t size) throw(); X(int); }; |
Eli Friedman | 7f1de45 | 2009-11-10 22:39:09 +0000 | [diff] [blame] | 6 | int a(), b(); |
| 7 | void b(int x) |
| 8 | { |
| 9 | new X(x ? a() : b()); |
| 10 | } |
| 11 | |