// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++20 -emit-llvm %s -o - -disable-llvm-passes | FileCheck %s
using namespace std;
// end namespace std
// Required when get_return_object_on_allocation_failure() is defined by
// the promise.
void* operator new noexcept;
void operator delete noexcept;
;
;
// Verify that the RVO is applied.
// CHECK-LABEL: define{{.*}} void @_Z1fi(%struct.coro* noalias sret(%struct.coro) align 8 %agg.result, i32 noundef %0)
coro
;
;
// Verify that the RVO is applied.
// CHECK-LABEL: define{{.*}} void @_Z1hi(%struct.coro_two* noalias sret(%struct.coro_two) align 8 %agg.result, i32 noundef %0)
coro_two