[llvm-branch-commits] [llvm] [Object][ELF] Pass Error to WarningHandler (PR #191707)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Apr 12 06:39:18 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 7943 tests passed
* 409 tests skipped
All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.
<details>
<summary>tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ObjDumper.cpp.o</summary>
```
FAILED: tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ObjDumper.cpp.o
sccache /opt/llvm/bin/clang++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/llvm-readobj -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/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 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ObjDumper.cpp.o -MF tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ObjDumper.cpp.o.d -o tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ObjDumper.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ObjDumper.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ObjDumper.cpp:51:12: error: no matching function for call to object of type 'const std::function<Error (Error)>'
51 | cantFail(WarningHandler(Msg),
| ^~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:587:7: note: candidate function not viable: no known conversion from 'const Twine' to 'llvm::Error' for 1st argument
587 | operator()(_ArgTypes... __args) const
| ^ ~~~~~~~~~~~~~~~~~~~
1 error generated.
```
</details>
<details>
<summary>tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o</summary>
```
FAILED: tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o
sccache /opt/llvm/bin/clang++ -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/llvm-readobj -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/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 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -MF tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o.d -o tools/llvm-readobj/CMakeFiles/llvm-readobj.dir/ELFDumper.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54: error: no viable conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'WarningHandler' (aka 'llvm::function_ref<Error (Error)>')
2031 | auto MappedAddrOrError = Obj.toMappedAddr(VAddr, [&](const Twine &Msg) {
| ^~~~~~~~~~~~~~~~~~~~~~~
2032 | this->reportUniqueWarning(Msg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2033 | return Error::success();
| ~~~~~~~~~~~~~~~~~~~~~~~~
2034 | });
| ~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2030:76: note: while substituting into a lambda expression here
2030 | auto toMappedAddr = [&](uint64_t Tag, uint64_t VAddr) -> const uint8_t * {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1906:7: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>::parseDynamicTable' requested here
1906 | parseDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2026:3: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>::loadDynamicTable' requested here
2026 | loadDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:623:9: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>::ELFDumper' requested here
623 | : ELFDumper<ELFT>(ObjF, Writer),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: note: in instantiation of member function '(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>::GNUELFDumper' requested here
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:857:17: note: in instantiation of function template specialization 'std::make_unique<(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>, const llvm::object::ELFObjectFile<llvm::object::ELFType<llvm::endianness::little, false>> &, llvm::ScopedPrinter &>' requested here
857 | return std::make_unique<GNUELFDumper<ELFT>>(Obj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:867:12: note: in instantiation of function template specialization 'llvm::createELFDumper<llvm::object::ELFType<llvm::endianness::little, false>>' requested here
867 | return createELFDumper(*ELFObj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'const function_ref<llvm::Error (llvm::Error)> &' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit move constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'function_ref<llvm::Error (llvm::Error)> &&' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:52:3: note: candidate constructor not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'std::nullptr_t' for 1st argument
52 | function_ref(std::nullptr_t) {}
| ^ ~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: note: candidate template ignored: substitution failure [with Callable = (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)]: no matching function for call to object of type '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)'
55 | function_ref(
| ^
56 | Callable &&callable LLVM_LIFETIME_BOUND,
57 | // This is not the copy-constructor.
58 | std::enable_if_t<!std::is_same<remove_cvref_t<Callable>,
59 | function_ref>::value> * = nullptr,
60 | // Functor must be callable and return a suitable type.
61 | std::enable_if_t<std::is_void<Ret>::value ||
62 | std::is_convertible<decltype(std::declval<Callable>()(
| ~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Object/ELF.h:412:31: note: passing argument to parameter 'WarnHandler' here
412 | WarningHandler WarnHandler = &defaultWarningHandler) const;
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54: error: no viable conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'WarningHandler' (aka 'llvm::function_ref<Error (Error)>')
2031 | auto MappedAddrOrError = Obj.toMappedAddr(VAddr, [&](const Twine &Msg) {
| ^~~~~~~~~~~~~~~~~~~~~~~
2032 | this->reportUniqueWarning(Msg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2033 | return Error::success();
| ~~~~~~~~~~~~~~~~~~~~~~~~
2034 | });
| ~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2030:76: note: while substituting into a lambda expression here
2030 | auto toMappedAddr = [&](uint64_t Tag, uint64_t VAddr) -> const uint8_t * {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1906:7: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>::parseDynamicTable' requested here
1906 | parseDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2026:3: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>::loadDynamicTable' requested here
2026 | loadDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:623:9: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>::ELFDumper' requested here
623 | : ELFDumper<ELFT>(ObjF, Writer),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: note: in instantiation of member function '(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>::GNUELFDumper' requested here
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:857:17: note: in instantiation of function template specialization 'std::make_unique<(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>, const llvm::object::ELFObjectFile<llvm::object::ELFType<llvm::endianness::big, false>> &, llvm::ScopedPrinter &>' requested here
857 | return std::make_unique<GNUELFDumper<ELFT>>(Obj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:871:12: note: in instantiation of function template specialization 'llvm::createELFDumper<llvm::object::ELFType<llvm::endianness::big, false>>' requested here
871 | return createELFDumper(*ELFObj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'const function_ref<llvm::Error (llvm::Error)> &' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit move constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'function_ref<llvm::Error (llvm::Error)> &&' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:52:3: note: candidate constructor not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'std::nullptr_t' for 1st argument
52 | function_ref(std::nullptr_t) {}
| ^ ~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: note: candidate template ignored: substitution failure [with Callable = (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)]: no matching function for call to object of type '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)'
55 | function_ref(
| ^
56 | Callable &&callable LLVM_LIFETIME_BOUND,
57 | // This is not the copy-constructor.
58 | std::enable_if_t<!std::is_same<remove_cvref_t<Callable>,
59 | function_ref>::value> * = nullptr,
60 | // Functor must be callable and return a suitable type.
61 | std::enable_if_t<std::is_void<Ret>::value ||
62 | std::is_convertible<decltype(std::declval<Callable>()(
| ~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Object/ELF.h:412:31: note: passing argument to parameter 'WarnHandler' here
412 | WarningHandler WarnHandler = &defaultWarningHandler) const;
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54: error: no viable conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'WarningHandler' (aka 'llvm::function_ref<Error (Error)>')
2031 | auto MappedAddrOrError = Obj.toMappedAddr(VAddr, [&](const Twine &Msg) {
| ^~~~~~~~~~~~~~~~~~~~~~~
2032 | this->reportUniqueWarning(Msg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2033 | return Error::success();
| ~~~~~~~~~~~~~~~~~~~~~~~~
2034 | });
| ~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2030:76: note: while substituting into a lambda expression here
2030 | auto toMappedAddr = [&](uint64_t Tag, uint64_t VAddr) -> const uint8_t * {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1906:7: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>::parseDynamicTable' requested here
1906 | parseDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2026:3: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>::loadDynamicTable' requested here
2026 | loadDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:623:9: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>::ELFDumper' requested here
623 | : ELFDumper<ELFT>(ObjF, Writer),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: note: in instantiation of member function '(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>::GNUELFDumper' requested here
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:857:17: note: in instantiation of function template specialization 'std::make_unique<(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>, const llvm::object::ELFObjectFile<llvm::object::ELFType<llvm::endianness::little, true>> &, llvm::ScopedPrinter &>' requested here
857 | return std::make_unique<GNUELFDumper<ELFT>>(Obj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:875:12: note: in instantiation of function template specialization 'llvm::createELFDumper<llvm::object::ELFType<llvm::endianness::little, true>>' requested here
875 | return createELFDumper(*ELFObj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'const function_ref<llvm::Error (llvm::Error)> &' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit move constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'function_ref<llvm::Error (llvm::Error)> &&' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:52:3: note: candidate constructor not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'std::nullptr_t' for 1st argument
52 | function_ref(std::nullptr_t) {}
| ^ ~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: note: candidate template ignored: substitution failure [with Callable = (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)]: no matching function for call to object of type '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)'
55 | function_ref(
| ^
56 | Callable &&callable LLVM_LIFETIME_BOUND,
57 | // This is not the copy-constructor.
58 | std::enable_if_t<!std::is_same<remove_cvref_t<Callable>,
59 | function_ref>::value> * = nullptr,
60 | // Functor must be callable and return a suitable type.
61 | std::enable_if_t<std::is_void<Ret>::value ||
62 | std::is_convertible<decltype(std::declval<Callable>()(
| ~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Object/ELF.h:412:31: note: passing argument to parameter 'WarnHandler' here
412 | WarningHandler WarnHandler = &defaultWarningHandler) const;
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54: error: no viable conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'WarningHandler' (aka 'llvm::function_ref<Error (Error)>')
2031 | auto MappedAddrOrError = Obj.toMappedAddr(VAddr, [&](const Twine &Msg) {
| ^~~~~~~~~~~~~~~~~~~~~~~
2032 | this->reportUniqueWarning(Msg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2033 | return Error::success();
| ~~~~~~~~~~~~~~~~~~~~~~~~
2034 | });
| ~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2030:76: note: while substituting into a lambda expression here
2030 | auto toMappedAddr = [&](uint64_t Tag, uint64_t VAddr) -> const uint8_t * {
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:1906:7: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>::parseDynamicTable' requested here
1906 | parseDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2026:3: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>::loadDynamicTable' requested here
2026 | loadDynamicTable();
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:623:9: note: in instantiation of member function '(anonymous namespace)::ELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>::ELFDumper' requested here
623 | : ELFDumper<ELFT>(ObjF, Writer),
| ^
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070:34: note: in instantiation of member function '(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>::GNUELFDumper' requested here
1070 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:857:17: note: in instantiation of function template specialization 'std::make_unique<(anonymous namespace)::GNUELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>, const llvm::object::ELFObjectFile<llvm::object::ELFType<llvm::endianness::big, true>> &, llvm::ScopedPrinter &>' requested here
857 | return std::make_unique<GNUELFDumper<ELFT>>(Obj, Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:878:10: note: in instantiation of function template specialization 'llvm::createELFDumper<llvm::object::ELFType<llvm::endianness::big, true>>' requested here
878 | return createELFDumper(*cast<ELF64BEObjectFile>(&Obj), Writer);
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'const function_ref<llvm::Error (llvm::Error)> &' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:40:24: note: candidate constructor (the implicit move constructor) not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'function_ref<llvm::Error (llvm::Error)> &&' for 1st argument
40 | class LLVM_GSL_POINTER function_ref<Ret(Params...)> {
| ^~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:52:3: note: candidate constructor not viable: no known conversion from '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)' to 'std::nullptr_t' for 1st argument
52 | function_ref(std::nullptr_t) {}
| ^ ~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: note: candidate template ignored: substitution failure [with Callable = (lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)]: no matching function for call to object of type '(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llvm-readobj/ELFDumper.cpp:2031:54)'
55 | function_ref(
| ^
56 | Callable &&callable LLVM_LIFETIME_BOUND,
57 | // This is not the copy-constructor.
58 | std::enable_if_t<!std::is_same<remove_cvref_t<Callable>,
59 | function_ref>::value> * = nullptr,
60 | // Functor must be callable and return a suitable type.
61 | std::enable_if_t<std::is_void<Ret>::value ||
62 | std::is_convertible<decltype(std::declval<Callable>()(
| ~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Object/ELF.h:412:31: note: passing argument to parameter 'WarnHandler' here
412 | WarningHandler WarnHandler = &defaultWarningHandler) const;
| ^
4 errors 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/191707
More information about the llvm-branch-commits
mailing list