1 // Tests that we wouldn't generate an allocation call in global scope with (std::size_t, p0, ..., pn)
2 // RUN: %clang_cc1 %s -std=c++20 -triple x86_64 -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
3 #include "Inputs/coroutine.h"
6 typedef decltype(sizeof(int)) size_t;
14 resumable
get_return_object() { return {}; }
15 auto initial_suspend() { return std::suspend_always(); }
16 auto final_suspend() noexcept
{ return std::suspend_always(); }
17 void unhandled_exception() {}
22 void *operator new(std::size_t, void *);
24 resumable
f1(void *) {
29 // CHECK-NEXT: [[SIZE:%.+]] = call [[BITWIDTH:.+]] @llvm.coro.size.[[BITWIDTH]]()
30 // CHECK-NEXT: call {{.*}} ptr @_Znwm([[BITWIDTH]] noundef [[SIZE]])