[llvm] 99f296d - [CodeGen][test] Fix Buildbot failure due to uninitialized variables (#161085)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 06:01:53 PDT 2025
Author: A. Jiang
Date: 2025-09-29T21:01:48+08:00
New Revision: 99f296d2a8119fabbc9cbf6e16a3521d920a44e5
URL: https://github.com/llvm/llvm-project/commit/99f296d2a8119fabbc9cbf6e16a3521d920a44e5
DIFF: https://github.com/llvm/llvm-project/commit/99f296d2a8119fabbc9cbf6e16a3521d920a44e5.diff
LOG: [CodeGen][test] Fix Buildbot failure due to uninitialized variables (#161085)
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.
Follows-up a558d656043734cc4d02e0a0a12e4c308c28f8c7.
Added:
Modified:
llvm/unittests/CodeGen/TypeTraitsTest.cpp
Removed:
################################################################################
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<IdentifyingPassPtr>,
template <class Fn> 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;
More information about the llvm-commits
mailing list