aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/pass-object-size.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/pass-object-size.cpp')
-rw-r--r--clang/test/CodeGenCXX/pass-object-size.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/pass-object-size.cpp b/clang/test/CodeGenCXX/pass-object-size.cpp
index 2c7f974..0a093c8 100644
--- a/clang/test/CodeGenCXX/pass-object-size.cpp
+++ b/clang/test/CodeGenCXX/pass-object-size.cpp
@@ -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{{[^,]*}})
+}