blob: 641734d223ad718955f83956d87240d625566df6 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedman7f1de452009-11-10 22:39:09 +00003// PR5454
Fariborz Jahanianf42d74f2009-11-11 22:49:09 +00004#include <stddef.h>
Eli Friedman7f1de452009-11-10 22:39:09 +00005
John McCall7002f4c2010-04-09 19:03:51 +00006struct X {static void * operator new(size_t size) throw(); X(int); };
Eli Friedman7f1de452009-11-10 22:39:09 +00007int a(), b();
8void b(int x)
9{
10 new X(x ? a() : b());
11}
12