Skip to content
Snippets Groups Projects
Commit c3e511ef authored by Richard Smith's avatar Richard Smith
Browse files

Add a test to ensure that pass_object_size is handled properly by a delegate constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272605 91177308-0d34-0410-b5e6-96231b3b80d8
parent ade89cd3
No related branches found
No related tags found
No related merge requests found
......@@ -43,3 +43,13 @@ void Test() {
(&OvlFoo)(nullptr);
}
}
namespace delegate {
struct A {
A(void *const p __attribute__((pass_object_size(0))));
};
A::A(void *const p __attribute__((pass_object_size(0)))) {}
// Ensure that we forward the size through a delegating constructor call.
// CHECK: define void @_ZN8delegate1AC1EPvU17pass_object_size0({{[^,]*}}, i8*{{[^,]*}}, i64{{[^,]*}})
// CHECK: call void @_ZN8delegate1AC2EPvU17pass_object_size0({{[^,]*}}, i8*{{[^,]*}}, i64{{[^,]*}})
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment