2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm-only -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-11-11 06:39:09 +08:00
|
|
|
// PR5454
|
2009-11-12 06:49:09 +08:00
|
|
|
#include <stddef.h>
|
2009-11-11 06:39:09 +08:00
|
|
|
|
2010-04-10 03:03:51 +08:00
|
|
|
struct X {static void * operator new(size_t size) throw(); X(int); };
|
2009-11-11 06:39:09 +08:00
|
|
|
int a(), b();
|
|
|
|
void b(int x)
|
|
|
|
{
|
|
|
|
new X(x ? a() : b());
|
|
|
|
}
|
|
|
|
|