From ac2ee12f45719eddfa6afd2044864ebd306692f6 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Tue, 12 Jul 2022 18:28:23 -0700 Subject: [PATCH] Update clang-format assumptions pushed by current VS2022. (#625) --- azure-pipelines/Format-CxxCode.ps1 | 2 +- src/vcpkg/commands.porthistory.cpp | 2 +- src/vcpkg/registries.cpp | 2 +- src/vcpkg/vcpkgpaths.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines/Format-CxxCode.ps1 b/azure-pipelines/Format-CxxCode.ps1 index 2041ef0580..7c0e2bc698 100755 --- a/azure-pipelines/Format-CxxCode.ps1 +++ b/azure-pipelines/Format-CxxCode.ps1 @@ -3,7 +3,7 @@ [CmdletBinding()] $Root = Resolve-Path -LiteralPath "$PSScriptRoot/.." -$clangFormat = Get-Command 'clang-format-12' -ErrorAction 'SilentlyContinue' +$clangFormat = Get-Command 'clang-format-14' -ErrorAction 'SilentlyContinue' if ($null -eq $clangFormat) { $clangFormat = Get-Command 'clang-format' -ErrorAction 'SilentlyContinue' diff --git a/src/vcpkg/commands.porthistory.cpp b/src/vcpkg/commands.porthistory.cpp index 3ab8b359cd..f74282d498 100644 --- a/src/vcpkg/commands.porthistory.cpp +++ b/src/vcpkg/commands.porthistory.cpp @@ -112,7 +112,7 @@ namespace vcpkg::Commands::PortHistory if (auto output = maybe_output.get()) { auto commits = Util::fmap( - Strings::split(*output, '\n'), [](const std::string& line) -> auto { + Strings::split(*output, '\n'), [](const std::string& line) -> auto{ auto parts = Strings::split(line, ' '); return std::make_pair(parts[0], parts[1]); }); diff --git a/src/vcpkg/registries.cpp b/src/vcpkg/registries.cpp index ab90bcd77a..f1388a0f2e 100644 --- a/src/vcpkg/registries.cpp +++ b/src/vcpkg/registries.cpp @@ -1186,7 +1186,7 @@ namespace vcpkg if (auto pversions = maybe_versions.get()) { return Util::fmap( - *pversions, [](auto&& entry) -> auto { + *pversions, [](auto&& entry) -> auto{ return std::make_pair(SchemedVersion{entry.scheme, entry.version}, entry.git_tree); }); } diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp index 35e473400c..ba640cb812 100644 --- a/src/vcpkg/vcpkgpaths.cpp +++ b/src/vcpkg/vcpkgpaths.cpp @@ -886,7 +886,7 @@ namespace vcpkg const Path VcpkgPaths::get_triplet_file_path(Triplet triplet) const { return m_pimpl->m_triplets_cache.get_lazy( - triplet, [&]() -> auto { + triplet, [&]() -> auto{ for (const auto& triplet_dir : m_pimpl->triplets_dirs) { auto path = triplet_dir / (triplet.canonical_name() + ".cmake");