Recent versions of clang complain about explicit copy constructors, leading to errors similar to: /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization 521 | return SpecialCaseList::createOrDie({{ClIgnorelist}}, | ^~~~~~~~~~~~~~ /usr/include/c++/v1/string:1153:64: note: explicit constructor declared here 1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) { | ^ /usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here 276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) { | ^ In this case, `ClIgnoreList` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value.
Created attachment 266740 [details] devel/llvm17: fix build with clang 21
LGTM All of these need minor commit message tweaks due to 2026Q3, but are otherwise good to go.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=39d6b5aaaf453db99e7834e643563381ecfa19e3 commit 39d6b5aaaf453db99e7834e643563381ecfa19e3 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-01-01 20:11:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-01-14 17:36:44 +0000 devel/llvm17: fix build with clang 21 Recent versions of clang complain about explicit copy constructors, leading to errors similar to: /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization 521 | return SpecialCaseList::createOrDie({{ClIgnorelist}}, | ^~~~~~~~~~~~~~ /usr/include/c++/v1/string:1153:64: note: explicit constructor declared here 1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) { | ^ /usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here 276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) { | ^ In this case, `ClIgnoreList` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value. PR: 292113 Approved by: brooks (maintainer) MFH: 2026Q1 devel/llvm17/files/patch-llvm_tools_sancov_sancov.cpp (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)
A commit in branch 2026Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f1ff9a74483519d4a0a5148e8c9440124713d96e commit f1ff9a74483519d4a0a5148e8c9440124713d96e Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-01-01 20:11:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-01-14 17:40:40 +0000 devel/llvm17: fix build with clang 21 Recent versions of clang complain about explicit copy constructors, leading to errors similar to: /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp /wrkdirs/usr/ports/devel/llvm17/work-default/llvm-project-17.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization 521 | return SpecialCaseList::createOrDie({{ClIgnorelist}}, | ^~~~~~~~~~~~~~ /usr/include/c++/v1/string:1153:64: note: explicit constructor declared here 1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) { | ^ /usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here 276 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) { | ^ In this case, `ClIgnoreList` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value. PR: 292113 Approved by: brooks (maintainer) MFH: 2026Q1 (cherry picked from commit 39d6b5aaaf453db99e7834e643563381ecfa19e3) devel/llvm17/files/patch-llvm_tools_sancov_sancov.cpp (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)