ci: Update Clang in "tidy" job

This change switches to the latest IWYU 0.23, which is compatible with
Clang 19.

Fixed new "modernize-use-starts-ends-with" warnings.

The new "bugprone-use-after-move" warning in `result_tests.cpp` is a
false positive caused by a bug in Boost.Test versions < 1.87. This has
been addressed by introducing a local variable.
See upstream references:
 - Issue: https://github.com/boostorg/test/issues/343
 - Fix: https://github.com/boostorg/test/pull/348

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
This commit is contained in:
Hennadii Stepanov
2024-12-05 14:37:47 +00:00
parent e8cc790fe2
commit fe9bc5abef
5 changed files with 8 additions and 6 deletions

View File

@@ -356,7 +356,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe
std::string socks_location;
if (reply.code == 250) {
for (const auto& line : reply.lines) {
if (0 == line.compare(0, 20, "net/listeners/socks=")) {
if (line.starts_with("net/listeners/socks=")) {
const std::string port_list_str = line.substr(20);
std::vector<std::string> port_list = SplitString(port_list_str, ' ');
@@ -367,7 +367,7 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe
if (portstr.empty()) continue;
}
socks_location = portstr;
if (0 == portstr.compare(0, 10, "127.0.0.1:")) {
if (portstr.starts_with("127.0.0.1:")) {
// Prefer localhost - ignore other ports
break;
}