blob: 248cc9e0b93095f16c5b59f2086d26704dae10eb [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm -o - %s
Fariborz Jahanian498429f2009-11-19 18:39:40 +00002// pr5547
3
4struct A {
5 void* operator new(__typeof(sizeof(int)));
6 A();
7};
8
9A* x() {
10 return new A;
11}
12
13struct B {
14 void* operator new(__typeof(sizeof(int)), int = 1, int = 4);
15 B(float);
16};
17
18B* y() {
19 new (3,4) B(1);
20 return new(1) B(2);
21}
22
23struct C {
24 void* operator new(__typeof(sizeof(int)), int, int = 4);
25 C();
26};
27
28C* z() {
29 new (3,4) C;
30 return new(1) C;
31}
32
33