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