From b94290eb9ad2e84db78a1bd2ba7d7499cc8f2e2c Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 28 Sep 2025 22:46:16 +0800 Subject: [PATCH] [CodeGen][test] Fix Buildbot failure due to uninitialized variables Under some options used by LLVM Buildbot, an uninitialized variable (recently added to the test suite) caused constant evaluation failure, despite the type of that variable is an empty class. This PR explicitly initializes the variables with `{}` to fix the error. --- llvm/unittests/CodeGen/TypeTraitsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/unittests/CodeGen/TypeTraitsTest.cpp b/llvm/unittests/CodeGen/TypeTraitsTest.cpp index 1c8852fc1f071..f0ed0e870cbb3 100644 --- a/llvm/unittests/CodeGen/TypeTraitsTest.cpp +++ b/llvm/unittests/CodeGen/TypeTraitsTest.cpp @@ -39,7 +39,7 @@ static_assert(std::is_trivially_copyable_v, template constexpr bool CheckStdCmpRequirements() { // std::less and std::equal_to are literal, default constructible, and // copyable classes. - Fn f1; + Fn f1{}; auto f2 = f1; auto f3 = std::move(f2); f2 = f3;