11Auto generated patch. Do not edit or delete it, even if empty.
2- diff -ruN --strip-trailing-cr a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp
3- --- a/clang/lib/Sema/SemaCoroutine.cpp
4- +++ b/clang/lib/Sema/SemaCoroutine.cpp
5- @@ -1488,6 +1488,8 @@
6- if (FoundAllocations) {
7- IAP = FoundAllocations->IAP;
8- OperatorNew = FoundAllocations->OperatorNew;
9- + } else {
10- + OperatorNew = nullptr;
11- }
12- assert(!OperatorNew || !OperatorNew->isTypeAwareOperatorNewOrDelete());
13- };
14- diff -ruN --strip-trailing-cr a/clang/test/SemaCXX/coroutine-new-operator.cpp b/clang/test/SemaCXX/coroutine-new-operator.cpp
15- --- a/clang/test/SemaCXX/coroutine-new-operator.cpp
16- +++ b/clang/test/SemaCXX/coroutine-new-operator.cpp
17- @@ -0,0 +1,49 @@
18- + // RUN: %clang_cc1 -std=c++20 -fcoro-aligned-allocation -fsyntax-only -verify %s
19- + // expected-no-diagnostics
20- +
21- + namespace std {
22- + template <typename R, typename... Args>
23- + struct coroutine_traits {
24- + using promise_type = typename R::promise_type;
25- + };
26- +
27- + template <class Promise = void> struct coroutine_handle {
28- + coroutine_handle() = default;
29- + static coroutine_handle from_address(void *) noexcept;
30- + };
31- + template <> struct coroutine_handle<void> {
32- + static coroutine_handle from_address(void *) noexcept;
33- + coroutine_handle() = default;
34- + template <class Promise>
35- + coroutine_handle(coroutine_handle<Promise>) noexcept;
36- + };
37- +
38- + struct suspend_always {
39- + bool await_ready() const noexcept { return false; }
40- + void await_suspend(coroutine_handle<>) const noexcept {}
41- + void await_resume() const noexcept {}
42- + };
43- +
44- + enum class align_val_t : decltype(sizeof(0)) {};
45- + } // namespace std
46- +
47- + using size_t = decltype(sizeof(0));
48- +
49- + struct Task {
50- + struct promise_type {
51- + std::suspend_always initial_suspend() noexcept { return {}; }
52- + std::suspend_always final_suspend() noexcept { return {}; }
53- + void return_void() {}
54- + void unhandled_exception() {}
55- + Task get_return_object() noexcept { return {}; }
56- +
57- + void* operator new(size_t n, void* buf, size_t capacity) noexcept {
58- + return buf;
59- + }
60- + void operator delete(void*) noexcept {}
61- + };
62- + };
63- +
64- + Task CoGetReturnAddress(void* buf, size_t capacity) {
65- + co_return;
66- + }
672diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
683--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
694+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -83,23 +18,6 @@ diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.baze
8318 ],
8419 )
8520
86- @@ -2741,7 +2738,7 @@
87- ],
88- "@platforms//os:macos": [
89- "src/__support/OSUtil/darwin/syscall.h",
90- - "src/__support/OSUtil/darwin/arm/syscall.h",
91- + "src/__support/OSUtil/darwin/aarch64/syscall.h",
92- ],
93- "@platforms//os:windows": [],
94- }),
95- @@ -3748,6 +3745,7 @@
96- ":__support_libc_errno",
97- ":__support_macros_attributes",
98- ":__support_macros_config",
99- + ":__support_macros_hardening",
100- ":__support_macros_optimization",
101- ":__support_macros_properties_architectures",
102- ":__support_macros_properties_compiler",
10321diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
10422--- a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
10523+++ b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
0 commit comments