From 08c8280d5d8af7fb995aec8fc00b8cfbca4e9505 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 16 Dec 2022 09:40:51 -0800 Subject: [PATCH] Undo one llvm::Optional => std::optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Using std::optional in Support/TypeTraitsTest.cpp causes gcc 7.5 to complain. No public bots run a gcc that old, but we have internal bots that do. /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp: In instantiation of ‘void {anonymous}::triviality::TrivialityTester() [with T = std::optional; bool IsTriviallyCopyConstructible = true; bool IsTriviallyMoveConstructible = true]’: /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:121:52: required from here /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:29:3: error: static assertion failed: Mismatch in expected trivial copy construction! static_assert(llvm::is_trivially_copy_constructible::value == ^~~~~~~~~~~~~ /home/probinson/projects/llvm-org/llvm-project/llvm/unittests/Support/TypeTraitsTest.cpp:32:3: error: static assertion failed: Mismatch in expected trivial move construction! static_assert(llvm::is_trivially_move_constructible::value == ^~~~~~~~~~~~~ --- llvm/unittests/Support/TypeTraitsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/unittests/Support/TypeTraitsTest.cpp b/llvm/unittests/Support/TypeTraitsTest.cpp index 71383ac..734e50a 100644 --- a/llvm/unittests/Support/TypeTraitsTest.cpp +++ b/llvm/unittests/Support/TypeTraitsTest.cpp @@ -118,7 +118,7 @@ TEST(Triviality, ADT) { TrivialityTester(); TrivialityTester, true, true>(); TrivialityTester, true, true>(); - TrivialityTester, true, true>(); + TrivialityTester, true, true>(); } } // namespace triviality -- 2.7.4