Skip to content

Commit c174b86

Browse files
authored
Merge pull request #77500 from nate-chandler/rdar139105149
Work around clang miscompile.
2 parents 5bd4113 + 525cfe3 commit c174b86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/TypeCheckRequests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,9 @@ void RequiresOpaqueAccessorsRequest::cacheResult(bool value) const {
823823
// RequiresOpaqueModifyCoroutineRequest computation.
824824
//----------------------------------------------------------------------------//
825825

826-
std::optional<bool>
826+
// NOTE: The [[clang::optnone]] annotation works around a miscompile in clang
827+
// version 13.0.0 affecting at least Ubuntu 20.04, 22.04, and UBI 9.
828+
[[clang::optnone]] std::optional<bool>
827829
RequiresOpaqueModifyCoroutineRequest::getCachedResult() const {
828830
auto *storage = std::get<0>(getStorage());
829831
auto isUnderscored = std::get<1>(getStorage());

0 commit comments

Comments
 (0)