annotate clang/test/CodeGenCXX/new-with-default-arg.cpp @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -emit-llvm -o - %s
anatofuz
parents:
diff changeset
2 // pr5547
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 struct A {
anatofuz
parents:
diff changeset
5 void* operator new(__typeof(sizeof(int)));
anatofuz
parents:
diff changeset
6 A();
anatofuz
parents:
diff changeset
7 };
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 A* x() {
anatofuz
parents:
diff changeset
10 return new A;
anatofuz
parents:
diff changeset
11 }
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 struct B {
anatofuz
parents:
diff changeset
14 void* operator new(__typeof(sizeof(int)), int = 1, int = 4);
anatofuz
parents:
diff changeset
15 B(float);
anatofuz
parents:
diff changeset
16 };
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 B* y() {
anatofuz
parents:
diff changeset
19 new (3,4) B(1);
anatofuz
parents:
diff changeset
20 return new(1) B(2);
anatofuz
parents:
diff changeset
21 }
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 struct C {
anatofuz
parents:
diff changeset
24 void* operator new(__typeof(sizeof(int)), int, int = 4);
anatofuz
parents:
diff changeset
25 C();
anatofuz
parents:
diff changeset
26 };
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 C* z() {
anatofuz
parents:
diff changeset
29 new (3,4) C;
anatofuz
parents:
diff changeset
30 return new(1) C;
anatofuz
parents:
diff changeset
31 }
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33