[clang] [clang] Fix error in gcc 7.5. on arm32-linux (PR #73702)
https://github.com/steven-johnson created https://github.com/llvm/llvm-project/pull/73702 Apparently the gcc 7.5 compiler for arm32-linux fails to implicitly convert to std::optional; this inserts an explicit constructor to unbreak that compiler. [Injection from https://reviews.llvm.org/rG4142a64ae3ca4856e6a5ffae9e40014ef5cf9db5] >From 87af40c987eb546bc3a3f022256d6d3b23340307 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Tue, 28 Nov 2023 13:44:00 -0800 Subject: [PATCH] [clang] Fix error in gcc 7.5. on arm32-linux Apparently the gcc 7.5 compiler for arm32-linux fails to implicitly convert to std::optional; this inserts an explicit constructor to unbreak that compiler. --- clang/lib/Sema/SemaDeclCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 7385eac48d8c895..f80de2b88b5ef68 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -17299,7 +17299,7 @@ bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, OverloadCandidateSet::CSK_Normal); if (MemberLookup.empty()) return std::nullopt; -return std::move(MemberLookup); +return std::move(std::optional(MemberLookup)); }; bool SizeNotFound, DataNotFound; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Fix error in gcc 7.5. on arm32-linux (PR #73702)
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Johnson (steven-johnson) Changes Apparently the gcc 7.5 compiler for arm32-linux fails to implicitly convert to std::optional; this inserts an explicit constructor to unbreak that compiler. [Injection from https://reviews.llvm.org/rG4142a64ae3ca4856e6a5ffae9e40014ef5cf9db5] --- Full diff: https://github.com/llvm/llvm-project/pull/73702.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaDeclCXX.cpp (+1-1) ``diff diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 7385eac48d8c895..f80de2b88b5ef68 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -17299,7 +17299,7 @@ bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message, OverloadCandidateSet::CSK_Normal); if (MemberLookup.empty()) return std::nullopt; -return std::move(MemberLookup); +return std::move(std::optional(MemberLookup)); }; bool SizeNotFound, DataNotFound; `` https://github.com/llvm/llvm-project/pull/73702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Fix error in gcc 7.5. on arm32-linux (PR #73702)
https://github.com/steven-johnson closed https://github.com/llvm/llvm-project/pull/73702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits