devel/llvm13: fix build with clang 21 Recent versions of clang complain about explicit copy constructors, leading to errors similar to: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:16: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/MC/MCContext.h:12: /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable] 128 | unsigned NumEntries = getNumEntries(); | ^ /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization 512 | return SpecialCaseList::createOrDie({{ClBlacklist}}, | ^~~~~~~~~~~~~ /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, `ClBlacklist` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value.
Created attachment 266736 [details] devel/llvm13: fix build with clang 21
LGTM
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d3097136efd1edc01760f7659ff6c9ded2594d96 commit d3097136efd1edc01760f7659ff6c9ded2594d96 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-01-01 14:23:20 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-01-14 17:36:43 +0000 devel/llvm13: fix build with clang 21 Recent versions of clang complain about explicit copy constructors, leading to errors similar to: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:16: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/MC/MCContext.h:12: /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable] 128 | unsigned NumEntries = getNumEntries(); | ^ /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization 512 | return SpecialCaseList::createOrDie({{ClBlacklist}}, | ^~~~~~~~~~~~~ /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, `ClBlacklist` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value. PR: 292109 Approved by: brooks (maintainer) MFH: 2026Q1 devel/llvm13/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=9e9915a4ab01368007c3f0f4c2c3abb2afef7ea1 commit 9e9915a4ab01368007c3f0f4c2c3abb2afef7ea1 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-01-01 14:23:20 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-01-14 17:40:16 +0000 devel/llvm13: fix build with clang 21 Recent versions of clang complain about explicit copy constructors, leading to errors similar to: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:16: In file included from /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/MC/MCContext.h:12: /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16: warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable] 128 | unsigned NumEntries = getNumEntries(); | ^ /wrkdirs/usr/ports/devel/llvm13/work/llvm-project-13.0.1.src/llvm/tools/sancov/sancov.cpp:512:42: error: chosen constructor is explicit in copy-initialization 512 | return SpecialCaseList::createOrDie({{ClBlacklist}}, | ^~~~~~~~~~~~~ /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, `ClBlacklist` is an instance of `cl::opt`, not a `std::string` as expected. Use `getValue()` to get the actual `std::string` value. PR: 292109 Approved by: brooks (maintainer) MFH: 2026Q1 (cherry picked from commit d3097136efd1edc01760f7659ff6c9ded2594d96) devel/llvm13/files/patch-llvm_tools_sancov_sancov.cpp (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)