diff options
Diffstat (limited to 'clang/test/Modules/templates.mm')
-rw-r--r-- | clang/test/Modules/templates.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Modules/templates.mm b/clang/test/Modules/templates.mm index 9c3f327acb7..95e7a9caea5 100644 --- a/clang/test/Modules/templates.mm +++ b/clang/test/Modules/templates.mm @@ -122,3 +122,13 @@ void testWithAttributes() { static_assert(alignof(decltype(a)) == 2, ""); static_assert(alignof(decltype(b)) == 2, ""); } + +// Check that returnNonTrivial doesn't return Class0<S0> directly in registers. + +// CHECK: declare void @_Z16returnNonTrivialv(%struct.Class0* sret) + +@import template_nontrivial0; +@import template_nontrivial1; + +S1::S1() : a(returnNonTrivial()) { +} |