[C++20] [Coroutines] Disable to take the address of labels in coroutines
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 17 Jan 2023 03:31:24 +0000 (11:31 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 17 Jan 2023 03:35:32 +0000 (11:35 +0800)
commitcc526e346debbaf1d2d32a59230288a4e98294c7
tree8e1d8b8f3a9513ff9b0112234cb70f80a7d06884
parentae53c7f4a21104e2eb84139f3ce4c468e2632590
[C++20] [Coroutines] Disable to take the address of labels in coroutines

Closing https://github.com/llvm/llvm-project/issues/56436

We can't support the GNU address of label extension in coroutines well
in current architecture. Since the coroutines are going to split into
pieces in the middle end so the address of labels are ambiguous that
time.

To avoid any further misunderstanding, we try to emit an error here.

Differential Revision: https://reviews.llvm.org/D131938
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/ScopeInfo.h
clang/lib/Sema/ScopeInfo.cpp
clang/lib/Sema/SemaCoroutine.cpp
clang/lib/Sema/SemaExpr.cpp
clang/test/SemaCXX/addr-label-in-coroutines.cpp [new file with mode: 0644]