[llvm] [LLVM][ADT] Add helper class for working with caches (PR #171008)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 6 20:48:12 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 97009 tests passed
* 1807 tests skipped
All tests passed but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o</summary>
```
FAILED: unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/ADT -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googletest/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googlemock/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o -MF unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o.d -o unittests/ADT/CMakeFiles/ADTTests.dir/STLExtrasTest.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:9:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2627:12: error: cannot initialize return object of type 'int' with an rvalue of type 'void'
2627 | return std::forward<FnT>(Fn)();
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/tuple:2268:9: note: in instantiation of function template specialization 'llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)>::operator int<int>' requested here
2268 | second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...)
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/tuple:2255:9: note: in instantiation of function template specialization 'std::pair<const int, int>::pair<int &&, 0UL, llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&, 0UL>' requested here
2255 | : pair(__first, __second,
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/new_allocator.h:191:23: note: in instantiation of function template specialization 'std::pair<const int, int>::pair<int &&, llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&>' requested here
191 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:538:8: note: in instantiation of function template specialization 'std::__new_allocator<std::__detail::_Hash_node<std::pair<const int, int>, false>>::construct<std::pair<const int, int>, const std::piecewise_construct_t &, std::tuple<int &&>, std::tuple<llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&>>' requested here
538 | __a.construct(__p, std::forward<_Args>(__args)...);
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:1995:27: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<const int, int>, false>>>::construct<std::pair<const int, int>, const std::piecewise_construct_t &, std::tuple<int &&>, std::tuple<llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&>>' requested here
1995 | __node_alloc_traits::construct(_M_node_allocator(),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:307:19: note: in instantiation of function template specialization 'std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<const int, int>, false>>>::_M_allocate_node<const std::piecewise_construct_t &, std::tuple<int &&>, std::tuple<llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&>>' requested here
307 | _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...))
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:954:39: note: in instantiation of function template specialization 'std::_Hashtable<int, std::pair<const int, int>, std::allocator<std::pair<const int, int>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::_Scoped_node::_Scoped_node<const std::piecewise_construct_t &, std::tuple<int &&>, std::tuple<llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)> &&>>' requested here
954 | typename __hashtable::_Scoped_node __node {
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unordered_map.h:488:16: note: in instantiation of function template specialization 'std::__detail::_Insert_base<int, std::pair<const int, int>, std::allocator<std::pair<const int, int>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::try_emplace<int, llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)>>' requested here
488 | return _M_h.try_emplace(cend(), std::move(__k),
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1707:9: note: in instantiation of function template specialization 'std::unordered_map<int, int>::try_emplace<llvm::defer<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/ADT/STLExtrasTest.cpp:1708:16)>>' requested here
1707 | Cache.try_emplace(
| ^
1 error generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/171008
More information about the llvm-commits
mailing list